/* ============================================================
   CMMS Hasfarm — Landing Page Stylesheet
   Mobile-first · Self-contained (no Tailwind CDN)
   Design tokens konsisten dengan UI Android aplikasi
   ============================================================ */

:root {
    --app-bg: #f4f5fa;
    --app-text: #001737;
    --app-text-2: #64748b;
    --app-card: #ffffff;
    --app-border: #e4e4f4;
    --app-topbar: rgba(244, 245, 250, 0.92);
    --app-topbar-border: #e4e4f4;
    --app-accent: #7c3aed;
    --app-accent-2: #6d28d9;
    --app-accent-soft: rgba(124, 58, 237, 0.08);
    --app-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --grad-brand: linear-gradient(135deg, #7c3aed, #6d28d9);
    --grad-text: linear-gradient(135deg, #a78bfa, #06b6d4);
    --ok: #10b981;
}
html.dark {
    --app-bg: #0f172a;
    --app-text: #f1f5f9;
    --app-text-2: #94a3b8;
    --app-card: #1e293b;
    --app-border: #334155;
    --app-topbar: rgba(15, 23, 42, 0.92);
    --app-topbar-border: #1e293b;
    --app-accent: #a78bfa;
    --app-accent-2: #8b5cf6;
    --app-accent-soft: rgba(124, 58, 237, 0.14);
    --app-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--app-bg);
    color: var(--app-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container { max-width: 1024px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto; }
.label {
    font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; color: var(--app-accent);
}
h2 { font-size: clamp(20px, 4.5vw, 28px); line-height: 1.25; letter-spacing: -0.02em; margin-top: 6px; }
.lead { font-size: 15px; color: var(--app-text-2); margin-top: 8px; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 16px;
    background: var(--app-topbar);
    border-bottom: 1px solid var(--app-topbar-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; white-space: nowrap; min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #7c3aed, #06b6d4); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
}
.nav-links { display: none; }
.actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
    width: 44px; height: 44px; border: none; background: transparent;
    border-radius: 12px; color: var(--app-text); font-size: 17px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--app-accent-soft); }
@media (max-width: 479px) {
    .topbar { padding: 0 12px; gap: 8px; }
    .brand { font-size: 14px; gap: 8px; }
    .brand-logo { width: 32px; height: 32px; }
    .actions { gap: 2px; }
    .actions .btn { padding: 0 12px; }
    .btn-label { display: none; }
}
@media (min-width: 768px) {
    .nav-links { display: flex; gap: 22px; }
    .nav-links a { font-size: 14px; color: var(--app-text-2); transition: color 0.15s; }
    .nav-links a:hover { color: var(--app-accent); }
}

/* ---------- Buttons (tap target min 44px) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 12px;
    font-size: 15px; font-weight: 600; border: none; cursor: pointer;
    transition: transform 0.1s, filter 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 2px 10px rgba(109, 40, 217, 0.25); }
.btn-ghost { background: var(--app-card); border: 1px solid var(--app-border); color: var(--app-text); }
.btn-white { background: #fff; color: var(--app-accent-2); }

/* ---------- Cards ---------- */
.card {
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--app-shadow);
}
.icon-badge {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    background: var(--app-accent-soft); color: var(--app-accent);
    display: flex; align-items: center; justify-content: center; font-size: 19px;
}

/* ---------- Hero ---------- */
.hero { padding: 36px 0 8px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
    background: var(--app-accent-soft); color: var(--app-accent);
}
h1 { font-size: clamp(26px, 6.5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin-top: 16px; font-weight: 700; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { font-size: 15px; color: var(--app-text-2); margin-top: 14px; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.stat { padding: 14px; }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--app-text-2); margin-top: 2px; }
.hero-media { position: relative; }
.hero-media img {
    width: 100%; border-radius: 16px; object-fit: cover; aspect-ratio: 4 / 3;
    border: 1px solid var(--app-border); box-shadow: var(--app-shadow);
}
.hero-float {
    position: absolute; left: 16px; bottom: -16px;
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
}
.hero-float .icon-badge { width: 38px; height: 38px; font-size: 15px; }
.hero-float p { font-size: 13px; font-weight: 600; line-height: 1.3; }
.hero-float span { font-size: 11.5px; color: var(--app-text-2); }
@media (min-width: 768px) {
    .hero { padding: 52px 0 12px; }
    .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
    .hero-stats { grid-template-columns: repeat(4, 1fr); }
    .stat-num { font-size: 28px; }
}

/* ---------- Stats band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 24px 0; }
.stats-band .stat { text-align: center; padding: 16px; }
@media (min-width: 768px) { .stats-band { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Features ---------- */
.grid-features { display: grid; gap: 14px; margin-top: 28px; }
.feature { padding: 18px; }
.feature h3 { font-size: 15.5px; font-weight: 600; margin-top: 12px; }
.feature p { font-size: 13.5px; color: var(--app-text-2); margin-top: 6px; line-height: 1.6; }
@media (min-width: 640px) { .grid-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-features { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Steps (cara kerja) ---------- */
.steps { display: grid; gap: 14px; margin-top: 28px; }
.step { position: relative; padding-top: 26px; }
.step-num {
    position: absolute; top: -14px; left: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #06b6d4); color: #fff;
    font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 15.5px; font-weight: 600; }
.step p { font-size: 13.5px; color: var(--app-text-2); margin-top: 6px; line-height: 1.6; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- About ---------- */
.about { display: grid; gap: 28px; align-items: center; }
.about ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; font-size: 13.5px; color: var(--app-text-2); }
.about li { display: flex; gap: 10px; align-items: flex-start; }
.about li i { margin-top: 4px; color: var(--ok); }
.about-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.about-cards .card i { color: var(--app-accent); font-size: 18px; }
.about-cards h3 { font-size: 14px; font-weight: 600; margin-top: 8px; }
.about-cards p { font-size: 12px; color: var(--app-text-2); margin-top: 2px; }
@media (min-width: 768px) { .about { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA ---------- */
.cta-card {
    background: linear-gradient(135deg, #7c3aed, #6d28d9); border: none;
    text-align: center; padding: 40px 20px; border-radius: 20px; margin: 48px 0;
}
.cta-card h2 { color: #fff; font-size: clamp(20px, 4.5vw, 26px); margin-top: 0; }
.cta-card p { color: rgba(255, 255, 255, 0.88); font-size: 14px; margin-top: 8px; }
.cta-card .btn { margin-top: 20px; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 28px; }
.contact-list { display: grid; gap: 14px; margin-top: 18px; font-size: 14.5px; }
.contact-list p { display: flex; gap: 12px; align-items: flex-start; }
.contact-list i { width: 20px; text-align: center; color: var(--app-accent); margin-top: 4px; flex-shrink: 0; }
.contact-list a { font-weight: 500; }
.map {
    min-height: 260px; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--app-border); box-shadow: var(--app-shadow);
}
.map iframe { width: 100%; height: 100%; min-height: 260px; border: 0; display: block; }
@media (min-width: 768px) { .contact { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--app-border); background: var(--app-card); }
.foot { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; padding: 28px 0; }
.foot-brand { font-size: 14px; font-weight: 600; text-align: center; }
.foot-brand span { font-weight: 400; color: var(--app-text-2); }
.foot-links { display: flex; gap: 20px; font-size: 12px; color: var(--app-text-2); }
.foot-links a:hover { opacity: 0.7; }
.foot-copy {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--app-border);
    font-size: 12px; color: var(--app-text-2); text-align: center;
}
@media (min-width: 768px) {
    .foot { flex-direction: row; }
    .foot-copy { text-align: left; }
}

/* ---------- A11y ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}
