/* =========================================================================
   Landing page — ui-redesign phase 1 (IMPLEMENTATION_PLAN_ui-redesign.md)
   Colours, fonts and theme come from /ui/tokens.css: only token variables
   here, no hard-coded colours, so light and dark both work.
   Class names are unchanged (landing.js and Test/ui/* rely on them).
   ========================================================================= */

:root {
    --container: 1200px;
    --hatch-band: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 7px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--canvas);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- shared icon tile (features, steps, paths) ---------- */
.fc-icon, .step-icon, .path-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--frame);
    color: var(--text);
}
.fc-icon svg, .step-icon svg, .path-icon svg { width: 20px; height: 20px; }

/* =================== NAVBAR =================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--canvas) 86%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo { width: 30px; height: 30px; border-radius: 8px; }
.nav-text { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.accent { color: var(--text-3); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
    padding: 7px 12px;
    border-radius: var(--r-control);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-link:hover { background: var(--accent-soft); color: var(--text); }
.nav-cta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--r-control);
    background: var(--accent);
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 600;
    transition: opacity .15s var(--ease);
}
.nav-cta:hover { opacity: .88; }

/* =================== HERO =================== */
.hero { padding: 72px 24px 56px; }
.hero-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}
.hero-content { min-width: 0; }
.hero-visual { display: flex; justify-content: center; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 12px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--panel);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}
.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--up);
    box-shadow: 0 0 0 3px var(--up-soft);
}
#badge-users { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.06;
    font-weight: 600;
    letter-spacing: -.035em;
    color: var(--text);
    margin-bottom: 20px;
}
.hero-em { color: var(--text-3); }

.hero-desc {
    max-width: 620px;
    color: var(--text-2);
    font-size: 16.5px;
    line-height: 1.65;
    margin-bottom: 32px;
}
.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

/* hero metrics: frame card, inner panel split by hairlines */
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--r-frame);
    background: var(--frame);
}
.hm-item {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--panel);
    min-width: 0;
}
.hm-value {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.hm-value.up { color: var(--up); }
.hm-value.down { color: var(--down); }
.hm-label {
    margin-top: 6px;
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
}
.hero-disclosure {
    max-width: 620px;
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-3);
}

/* phone mock-up */
.phone-frame {
    width: 260px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--frame);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.phone-notch { width: 72px; height: 5px; border-radius: 3px; background: var(--line-strong); }
.phone-img { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--line); }

/* =================== TRUST STRIP =================== */
.trust-strip { padding: 0 24px 24px; }
.trust-strip-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--r-frame);
    background: var(--frame);
}
.ts-item {
    flex: 1;
    min-width: 0;
    padding: 18px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--panel);
    text-align: center;
}
.ts-value {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.ts-label {
    margin-top: 6px;
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
}
.ts-divider { display: none; } /* cells are separated by the frame gap */

/* =================== SECTIONS =================== */
.section { padding: 88px 24px; }
.section-alt { background: var(--frame); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-header { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-header h2 {
    font-size: clamp(28px, 3.4vw, 38px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.03em;
    color: var(--text);
    margin-bottom: 10px;
}
.section-header p { color: var(--text-3); font-size: 16px; }

/* cards: panel with a hatched header band (reference A) */
.feature-card, .step-card, .path-card {
    position: relative;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-frame);
    background: var(--hatch-band) top / 100% 64px no-repeat, var(--panel);
    transition: border-color .15s var(--ease);
}
.feature-card:hover, .step-card:hover, .path-card:hover { border-color: var(--line-strong); }
.feature-card h3, .step-card h3, .path-card h3 {
    margin: 20px 0 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--text);
}
.feature-card p, .step-card p, .path-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* how it works */
.steps-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}
.step-card { background: var(--hatch-band) top / 100% 64px no-repeat, var(--panel); }
.step-num {
    position: absolute;
    top: 22px;
    right: 20px;
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: .06em;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}
.step-arrow { display: flex; align-items: center; color: var(--text-4); font-size: 18px; }
.steps-cta { display: flex; justify-content: center; margin-top: 40px; }

/* app download */
.app-section { padding-top: 32px; }
.app-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 40px 48px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--hatch-band), var(--frame);
}
.app-content { min-width: 0; }
.app-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--panel);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
}
.app-content h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.03em;
    color: var(--text);
    margin-bottom: 14px;
}
.app-content p { color: var(--text-2); font-size: 16px; margin-bottom: 28px; max-width: 460px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.app-visual { display: flex; justify-content: center; }

/* paths */
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.path-card { display: flex; flex-direction: column; }
.path-card p { flex: 1; margin-bottom: 20px; }
.path-card .btn { align-self: flex-start; }

/* faq: one frame, items split by hairlines */
.faq-list {
    max-width: 760px;
    margin: 0 auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--r-frame);
    background: var(--frame);
}
.faq-item {
    padding: 18px 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
}
.faq-item + .faq-item { margin-top: 4px; }
.faq-q { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.faq-a { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.faq-a a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.faq-a a:hover { text-decoration-color: var(--text); }

/* final call to action */
.cta-banner { padding: 24px 24px 88px; }
.cta-banner-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 56px 32px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--hatch-band), var(--frame);
}
.cta-banner-inner h2 {
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.03em;
    color: var(--text);
    margin-bottom: 12px;
}
.cta-banner-inner p { max-width: 620px; margin: 0 auto 28px; color: var(--text-2); font-size: 16px; }
.cta-banner-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* =================== BUTTONS =================== */
.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 9px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease);
}
.btn-sub { font-size: 12px; font-weight: 400; opacity: .72; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: var(--frame); }
.btn-secondary:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.btn-ghost { background: var(--panel); }
.btn-ghost:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.btn-ghost-white { background: var(--panel); }
.btn-ghost-white:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13.5px; border-radius: var(--r-control); }

/* =================== FOOTER =================== */
.footer { border-top: 1px solid var(--line); padding: 32px 24px; }
.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.footer-logo { width: 26px; height: 26px; border-radius: 7px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; color: var(--text-3); font-size: 12.5px; }

/* =================== RESPONSIVE =================== */
@media (max-width: 1000px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .hero { padding: 48px 20px 40px; }
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .hero-visual { order: 2; }
    .steps-grid { grid-template-columns: minmax(0, 1fr); }
    .step-arrow { justify-content: center; transform: rotate(90deg); }
    .app-inner { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; gap: 32px; }
    .path-grid { grid-template-columns: minmax(0, 1fr); }
    .trust-strip-inner { flex-wrap: wrap; }
    .ts-item { flex: 1 1 calc(33.333% - 4px); }
}

@media (max-width: 600px) {
    .nav-inner { padding: 0 16px; }
    .nav-link { display: none; }
    .hero { padding: 36px 16px 32px; }
    .hero-desc br { display: none; }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-value { font-size: 22px; }
    .trust-strip { padding: 0 16px 16px; }
    .ts-item { flex: 1 1 calc(50% - 4px); }
    .ts-value { font-size: 22px; }
    .section { padding: 64px 16px; }
    .feature-grid { grid-template-columns: minmax(0, 1fr); }
    .cta-banner { padding: 16px 16px 64px; }
    .cta-banner-inner { padding: 40px 20px; }
    .cta-banner-actions .btn { flex: 1 1 100%; }
    .footer { padding: 28px 16px; }
}
