/* Same visual language as the app: warm near-black ground, Instrument Sans for
   text, JetBrains Mono for times and numbers, plan colors that mean "which plan
   this came from", and one red NOW line. See documents/DESIGN_SPEC.md §6. */
:root {
    --ground: #0A0A0C;
    --surface: #141418;
    --surface-raised: #1C1C21;
    --border: #26262B;
    --border-strong: #2C2C33;

    --text: #EDEDEF;
    --text-2: #A8A8B0;
    --text-3: #8A8A93;

    --indigo: #6B6CF5;
    --indigo-deep: #3B36D6;
    --plan-a: #7498FF;
    --plan-b: #E99B2A;
    --plan-c: #06BFA8;
    --plan-d: #D57CCE;
    --positive: #55C975;
    --now: #F3625D;

    --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    /* Names the policy and 404 pages still use. */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --space-xs: var(--spacing-xs);
    --space-sm: var(--spacing-sm);
    --space-md: var(--spacing-md);
    --space-lg: var(--spacing-lg);
    --color-text-light: var(--text);
    --color-text-dim: var(--text-2);
    --text-muted: var(--text-2);
    --accent: var(--indigo);
    --secondary: var(--plan-c);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--ground);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p a, li a { color: var(--plan-a); }
p a:hover, li a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.1; font-weight: 600; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* Header */
.glass-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 10, 12, 0.78);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-content { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo, .logo a { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; }
.logo img { width: 32px; height: 32px; }
nav { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; color: var(--text-2); }
nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 999px;
    font-weight: 600; font-size: 0.95rem; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text); color: var(--ground); }
.btn-primary:hover { background: #fff; }
.btn-secondary { border: 1px solid var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--text-3); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn svg { width: 18px; height: 18px; }

/* Section rhythm */
section { padding: 112px 0; }
.eyebrow {
    font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 16px; display: block;
}
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 560px; }

/* Hero */
.hero { padding: 88px 0 96px; position: relative; }
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(600px 400px at 78% 30%, rgba(107, 108, 245, 0.18), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--text-3); }
.hero .lead { margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 0.875rem; color: var(--text-3); }

/* Phone mock of the Today timeline */
.phone {
    width: 340px; max-width: 100%; margin: 0 auto;
    background: var(--ground); border: 1px solid var(--border-strong); border-radius: 44px;
    padding: 22px 18px 26px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 8px #16161A;
}
.phone-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.phone-top b { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.phone-top span { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); }
.week { display: flex; justify-content: space-between; margin: 14px 0 18px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); width: 34px; }
.week div.on { color: var(--text); }
.week div.on i { background: var(--text); color: var(--ground); }
.week i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.week s { display: flex; gap: 2px; text-decoration: none; }
.week s u { width: 4px; height: 4px; border-radius: 50%; }

.timeline { position: relative; display: grid; grid-template-columns: 38px 1fr; }
.hours { display: grid; grid-auto-rows: 80px; font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); }
.hours span { transform: translateY(-0.55em); }
.lane { position: relative; border-left: 1px solid var(--border); }
.lane::before {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 80px);
    opacity: 0.6;
}
.blk {
    position: absolute; left: 8px; right: 0; border-radius: 10px;
    background: var(--surface-raised); padding: 5px 10px 5px 10px;
    display: flex; gap: 10px; align-items: flex-start; overflow: hidden;
}
.blk .sw { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; }
.blk .sw svg { width: 13px; height: 13px; }
.blk b { display: block; font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.blk small { display: block; font-family: var(--mono); font-size: 0.66rem; line-height: 1.35; color: var(--text-3); }
.blk b small { display: inline; }
.blk.done b { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }
.now-line { position: absolute; left: -44px; right: 0; height: 2px; background: var(--now); z-index: 2; }
.now-line span {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    background: var(--now); color: #fff; font-family: var(--mono); font-size: 0.64rem; font-weight: 700;
    padding: 2px 5px; border-radius: 5px;
}

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-top: 56px; }
.step { background: var(--ground); padding: 32px 28px 36px; }
.step .n { font-family: var(--mono); font-size: 0.8rem; color: var(--text-3); display: block; margin-bottom: 40px; }
.step p { color: var(--text-2); }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.feature + .feature { margin-top: 136px; }
.feature.flip .feature-copy { order: 2; }
.feature-copy p { color: var(--text-2); font-size: 1.05rem; margin-bottom: 20px; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; color: var(--text-2); }
.ticks li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.62em; border-radius: 50%; background: var(--text-3); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.panel-label { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; display: block; }

/* Import visual */
.source {
    background: var(--ground); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 16px 18px; font-size: 0.9rem; color: var(--text-2); margin-bottom: 18px;
}
.source .from { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-3); margin-bottom: 8px; font-family: var(--mono); }
.source mark { background: rgba(116, 152, 255, 0.16); color: var(--text); border-radius: 3px; padding: 0 2px; }
.arrow { text-align: center; color: var(--text-3); margin: -4px 0 14px; font-family: var(--mono); font-size: 0.8rem; }
.extracted { display: grid; gap: 8px; }
.ex { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: start; background: var(--surface-raised); border-radius: 12px; padding: 12px 14px; }
.ex time { font-family: var(--mono); font-size: 0.78rem; color: var(--plan-a); padding-top: 1px; }
.ex b { font-size: 0.92rem; font-weight: 600; display: block; }
.ex q { display: block; font-size: 0.78rem; color: var(--text-3); margin-top: 3px; quotes: "\201C" "\201D"; }

/* Clash visual */
.clash-row { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; margin-bottom: 8px; }
.clash-row time { font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chip { background: var(--surface-raised); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chip i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip.warn { outline: 1.5px solid var(--now); outline-offset: -1.5px; }
.fix {
    margin: 18px 0; padding: 14px 16px; border-radius: 12px;
    background: rgba(243, 98, 93, 0.08); border: 1px solid rgba(243, 98, 93, 0.25);
    font-size: 0.88rem; color: var(--text-2);
}
.fix b { color: var(--text); font-weight: 600; }
.fix .acts { display: flex; gap: 8px; margin-top: 12px; }
.fix .acts span { font-size: 0.8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); }
.fix .acts span:first-child { background: var(--text); color: var(--ground); border-color: var(--text); }
.moved { color: var(--positive); font-family: var(--mono); font-size: 0.72rem; }

/* Do-it visual */
.do-grid { display: grid; gap: 14px; }
.live {
    background: rgba(28, 28, 33, 0.9); border-radius: 22px; padding: 16px 18px;
    display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
}
.live .sw { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.live b { display: block; font-size: 0.95rem; }
.live small { color: var(--text-3); font-size: 0.8rem; }
.live .timer { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--plan-c); }
.bar { height: 4px; border-radius: 2px; background: var(--border-strong); grid-column: 1 / -1; overflow: hidden; }
.bar u { display: block; height: 100%; width: 62%; background: var(--plan-c); }
.stats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; }
.stats div { display: grid; gap: 8px; justify-items: center; font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.stats i { width: 100%; max-width: 34px; border-radius: 6px; background: var(--border-strong); position: relative; height: 84px; overflow: hidden; }
.stats i u { position: absolute; left: 0; right: 0; bottom: 0; background: var(--plan-a); }
.stats-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.stats-head b { font-family: var(--mono); font-size: 1.5rem; }
.stats-head span { color: var(--text-3); font-size: 0.85rem; }

/* Library */
.library { border-top: 1px solid var(--border); }
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 48px; }
.cat { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 18px 22px; background: var(--surface); }
.cat .sw { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 36px; }
.cat .sw svg { width: 20px; height: 20px; }
.cat b { display: block; font-weight: 600; margin-bottom: 4px; }
.cat span { font-size: 0.85rem; color: var(--text-3); }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.plan { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; background: var(--surface); }
.plan.pro { border-color: rgba(107, 108, 245, 0.55); background: linear-gradient(180deg, rgba(107, 108, 245, 0.10), var(--surface) 60%); }
.plan h3 { font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.plan h3 small { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; color: var(--indigo); border: 1px solid rgba(107, 108, 245, 0.5); padding: 2px 8px; border-radius: 999px; letter-spacing: 0.02em; }
.price { margin: 18px 0 6px; display: flex; align-items: baseline; gap: 6px; }
.price b { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; }
.price span { color: var(--text-3); }
.price-alt { font-size: 0.875rem; color: var(--text-3); margin-bottom: 24px; min-height: 1.4em; }
.plan .ticks li::before { background: var(--positive); }
.plan.pro .ticks li::before { background: var(--indigo); }

/* CTA */
.cta { text-align: center; border-top: 1px solid var(--border); }
.cta img { width: 88px; height: 88px; margin-bottom: 28px; }
.cta .lead { margin: 0 auto 32px; }
.cta .hero-actions { justify-content: center; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 0.875rem; color: var(--text-3); }
.footer-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.footer-logo img { width: 22px; height: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a:hover { color: var(--text); }
.copyright { width: 100%; }

/* Policy pages keep their own inline layout; this only aligns the type. */
.policy-container h1 { letter-spacing: -0.02em; }
.policy-container p, .policy-container li { color: var(--text-2); }
.policy-container p { margin-bottom: 0.9rem; }
.policy-section h2 { margin-top: 2.5rem; }
.policy-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.policy-table th, .policy-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.table-scroll { overflow-x: auto; }

@media (max-width: 960px) {
    .hero-grid, .feature { grid-template-columns: 1fr; gap: 48px; }
    .feature.flip .feature-copy { order: 0; }
    .cats { grid-template-columns: repeat(2, 1fr); }
    .cats .cat:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    section { padding: 80px 0; }
    .hero { padding: 56px 0 72px; }
    .container { padding: 0 16px; }
    nav a:not(.btn) { display: none; }
    .steps, .plans { grid-template-columns: 1fr; }
    .step .n { margin-bottom: 20px; }
    .feature + .feature { margin-top: 96px; }
    .panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
