/* Fully Funded landing page. Colours and type follow the app (src/lib/theme.ts). */
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/landing/fonts/SpaceGrotesk_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/landing/fonts/SpaceGrotesk_600SemiBold.ttf') format('truetype'); }

:root {
  --bg: #0F0F0D; --surface: #1A1A17; --raised: #24241F; --border: #33322D; --input: #767469;
  --text: #F5F4EF; --muted: #A8A69E; --green: #16A34A; --green-fill: #15803D; --green-text: #4ADE80;
  --red-text: #F87171; --radius: 16px; --radius-sm: 12px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Light scheme, from the app's light tokens. The phone and its screens stay dark: they show the app as screenshotted. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F5F5F3; --surface: #FFFFFF; --raised: #ECEBE7; --border: #E4E3DF; --input: #868580;
    --text: #141413; --muted: #6B6A66; --green-text: #15803D; --red-text: #B91C1C;
    --header-bg: rgba(245, 245, 243, 0.88);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.55; }
::selection { background: rgba(22, 163, 74, 0.45); color: var(--text); }
a { color: var(--green-text); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--green-text); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
.green { color: var(--green-text); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: var(--header-bg, rgba(15, 15, 13, 0.88)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.wordmark.small { font-size: 20px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 10px 0; }
.top nav a:hover { color: var(--text); }
@media (max-width: 640px) { .top nav { display: none; } .top .btn-small { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: var(--radius-sm); background: var(--green-fill); color: #fff; font-family: var(--display); font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap; transition: transform 140ms cubic-bezier(0.16, 1, 0.3, 1), background 140ms; }
.btn:hover { background: #166534; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-outline { background: transparent; border: 1px solid var(--input); color: var(--text); }
.btn-outline:hover { background: var(--raised); }

/* Phone frame around a screenshot */
.phone { margin: 0; padding: 10px; border-radius: 44px; background: #26251F; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.phone img { border-radius: 34px; width: 100%; }
.phone.small { padding: 7px; border-radius: 30px; }
.phone.small img { border-radius: 24px; }

/* Hero */
.hero { overflow-x: clip; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34em; margin: 22px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hero-phone { max-width: 360px; justify-self: center; position: relative; }
.hero-phone::before { content: ''; position: absolute; inset: -12% -20%; background: radial-gradient(closest-side, rgba(22, 163, 74, 0.28), transparent); z-index: -1; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .hero-phone { max-width: 300px; }
}

/* Hero demo: the app's own setup screens, drawn in HTML so they stay sharp.
   Sizes are in container units so the screen scales with the phone. */
.hero-phone { container-type: inline-size; width: 100%; }
.demo { display: none; }
.demo-on > img { visibility: hidden; }
/* The phone always shows the app in its dark scheme, whatever the page uses */
.demo { --bg: #0F0F0D; --surface: #1A1A17; --border: #33322D; --input: #767469; --text: #F5F4EF; --muted: #A8A69E; --green-text: #4ADE80; }
.demo-on .demo { display: block; position: absolute; inset: 10px; border-radius: 34px; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--body); }
.demo-top { display: flex; align-items: center; justify-content: space-between; padding: 7.5cqw 7cqw 0; }
.demo-mark { font-family: var(--display); font-weight: 700; font-size: 5.4cqw; letter-spacing: -0.02em; }
.demo-mark b { color: var(--green-text); font-weight: 700; }
.demo-steps { display: flex; gap: 1.4cqw; }
.demo-steps i { width: 5cqw; height: 1.1cqw; border-radius: 1cqw; background: var(--border); }
.demo-steps i.on { background: var(--green); }
.demo-scene { position: absolute; left: 7cqw; right: 7cqw; top: 22cqw; opacity: 0; }
.demo-scene h4 { margin: 0 0 2.6cqw; font-family: var(--display); font-weight: 700; font-size: 7.4cqw; line-height: 1.12; letter-spacing: -0.02em; }
.demo-scene p { margin: 0; color: var(--muted); font-size: 3.9cqw; line-height: 1.4; }
.demo-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; margin-top: 7cqw; }
.demo-tile { border: 1px solid var(--input); border-radius: 4cqw; padding: 4.2cqw 4.5cqw; background: var(--surface); display: flex; flex-direction: column; gap: 0.6cqw; transition: background 140ms cubic-bezier(0.16, 1, 0.3, 1), border-color 140ms cubic-bezier(0.16, 1, 0.3, 1); }
.demo-tile b { font-family: var(--display); font-weight: 700; font-size: 7cqw; font-variant-numeric: tabular-nums; }
.demo-tile span { color: var(--muted); font-size: 3.4cqw; }
.demo-tile.on { border-color: var(--green); background: rgba(22, 163, 74, 0.16); }
.demo-tile.on b { color: var(--green-text); }
.demo-rows { margin-top: 7cqw; border: 1px solid var(--border); border-radius: 4cqw; background: var(--surface); }
.demo-row { display: flex; justify-content: space-between; align-items: center; gap: 3cqw; padding: 4.6cqw 4.5cqw; font-size: 3.9cqw; }
.demo-row + .demo-row { border-top: 1px solid var(--border); }
.demo-row b { font-family: var(--display); font-weight: 600; font-size: 4.6cqw; font-variant-numeric: tabular-nums; }
.demo-eyebrow { display: block; color: var(--muted); font-size: 3.9cqw; margin-bottom: 2cqw; }
.demo-scene h4.demo-verdict { color: var(--green-text); font-size: 8cqw; }
.demo-meta { margin-top: 3cqw !important; padding-top: 3cqw; border-top: 1px solid var(--border); }
.demo-chart { display: block; width: 100%; height: auto; margin-top: 6cqw; overflow: visible; }
.demo-grid line { stroke: var(--border); stroke-width: 1; }
.demo-grid text, .demo-marker text { fill: var(--muted); font-size: 10px; font-family: var(--body); }
.demo-marker line { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: 0.8; }
.demo-marker { opacity: 0; }
.demo-legend { display: flex; align-items: center; gap: 2.4cqw; margin-top: 4cqw; font-size: 3.9cqw; }
.demo-legend i { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: #8A8A82; }
.demo-legend span { flex: 1; }
.demo-legend b { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-cta { position: absolute; left: 7cqw; right: 7cqw; bottom: 8cqw; padding: 4.2cqw 0; border-radius: 999px; background: var(--green-fill); color: #fff; text-align: center; font-family: var(--display); font-weight: 600; font-size: 4.4cqw; opacity: 0; transition: background 140ms cubic-bezier(0.16, 1, 0.3, 1); }
.demo-cta.pressed { background: #166534; }
.demo-tabs { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 4cqw 3cqw 6.5cqw; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 3.3cqw; opacity: 0; }
.demo-tabs .on { color: var(--green-text); }


.speed { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.speed-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 26px; padding-bottom: 26px; }
.speed-row div { display: flex; flex-direction: column; gap: 2px; }
.speed-row strong { font-family: var(--display); font-size: 30px; color: var(--green-text); font-variant-numeric: tabular-nums; }
.speed-row span { color: var(--muted); font-size: 15px; }
@media (max-width: 640px) { .speed-row { grid-template-columns: repeat(2, 1fr); row-gap: 20px; } }

/* Features */
.features { padding-top: 88px; padding-bottom: 40px; }
.features > h2, .pricing > h2, .faq > h2, .fit > h2 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 14px; }
.feature { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: center; margin-top: 64px; }
.feature.flip { grid-template-columns: 340px 1fr; }
.feature.flip .feature-text { order: 2; }
.feature h3, .card h3 { font-size: 30px; margin-bottom: 12px; }
.feature p, .card p { color: var(--muted); margin: 0; max-width: 34em; }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; margin-top: 56px; }
  .feature.flip .feature-text { order: 0; }
  .feature .phone { max-width: 300px; }
}
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 88px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.card .phone { max-width: 220px; margin: 0 auto 12px; }
.card h3 { font-size: 22px; margin: 0; }
/* The feature grid: the stress test leads across the full width, three cards follow */
.grid-features { grid-template-columns: repeat(3, 1fr); margin-top: 40px; }
.card-lead { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 40px; padding: 32px; }
.card-lead .phone { width: 240px; max-width: 240px; flex-shrink: 0; margin: 0; }
.card-lead .card-text { display: flex; flex-direction: column; gap: 12px; }
.card-lead h3 { font-size: clamp(26px, 3vw, 34px); }
.card-lead p { font-size: 18px; }
@media (max-width: 860px) {
  .card-lead { flex-direction: column; align-items: stretch; padding: 22px; gap: 16px; }
  .card-lead .phone { margin: 0 auto; }
}
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.also { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; margin-top: 48px; }
.also-group h3 { font-size: 20px; margin-bottom: 12px; }
.also-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.also li { color: var(--muted); padding-left: 28px; position: relative; }
.also li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--green); }
.also strong { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .also { grid-template-columns: 1fr; } }

/* Who it's for */
.fit { padding-top: 72px; padding-bottom: 40px; }
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
.fit-box { border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); background: var(--surface); }
.fit-box.yes { border-color: rgba(22, 163, 74, 0.55); }
.fit-box h3 { font-size: 21px; margin-bottom: 10px; }
.fit-box ul { margin: 0; padding-left: 20px; color: var(--muted); }
.fit-box li { margin: 6px 0; }
@media (max-width: 760px) { .fit-grid { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { padding-top: 72px; padding-bottom: 40px; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 40em; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan.pro { border-color: var(--green); background: linear-gradient(180deg, rgba(22, 163, 74, 0.10), var(--surface) 45%); }
.plan h3 { font-size: 24px; }
.price { font-family: var(--display); font-weight: 700; font-size: 46px; margin: 0; letter-spacing: -0.02em; }
.price span { font-size: 18px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.price-alt { margin: -6px 0 4px; color: var(--muted); }
.plan ul { margin: 6px 0 14px; padding-left: 20px; color: var(--muted); }
.plan li { margin: 6px 0; }
.plan .btn { align-self: flex-start; }
.badge { align-self: flex-start; margin: 0; font-size: 13px; font-weight: 700; color: #fff; background: var(--green-fill); border-radius: 999px; padding: 4px 10px; }
.founding { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.founding strong { color: var(--text); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

.early { max-width: 760px; background: linear-gradient(180deg, rgba(22, 163, 74, 0.12), var(--surface) 60%); border: 1px solid var(--green); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.early h3 { font-size: clamp(24px, 3vw, 30px); }
/* Body text in the card; the badge keeps its own white-on-green */
.early > p:not(.badge) { margin: 0; color: var(--muted); }
.early .fine { font-size: 14px; }

/* FAQ */
.faq { padding-top: 72px; padding-bottom: 40px; max-width: 820px; }
details { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-family: var(--display); font-weight: 600; font-size: 19px; position: relative; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 26px; color: var(--green-text); transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 18px; color: var(--muted); max-width: 40em; }
@media (prefers-reduced-motion: reduce) { summary::after, .btn { transition: none; } }

/* Final call and footer */
.final { text-align: center; padding-top: 80px; padding-bottom: 88px; }
.final h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 26px; }
.foot { border-top: 1px solid var(--border); padding: 28px 0 40px; }
.foot-row { display: flex; align-items: center; gap: 20px; }
.foot nav { margin-left: auto; display: flex; gap: 20px; }
.foot nav a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.disclaimer { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* Light scheme: a softer shadow under the phone */
@media (prefers-color-scheme: light) { .phone { box-shadow: 0 24px 48px rgba(20, 20, 19, 0.18); } }
