/* Same restrained dark palette as the app (src/styles.css); green is the mark's. */
:root {
  color-scheme: dark;
  --bg: #1e1f22;
  --panel: #252629;
  --raised: #2b2d31;
  --line: #393b40;
  --text: #bfc3ca;
  --strong: #e1e4ea;
  --muted: #858994;
  --brand: #c8ed94;
  --brand-ink: #1c2a17;
  --accent: #78a8ef;
  /* Syntax and diff colours taken from the app's editor. */
  --kw: #cf8e6d;
  --num: #2aacb8;
  --hit: #3b2d26;
  --add: rgba(106, 171, 115, .16);
  --add-ink: #8fc58f;
  --del: rgba(214, 102, 102, .15);
  --del-ink: #e08a8a;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); line-height: 1.55; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font: 0.92em var(--mono); color: var(--strong); }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.nav, main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--strong); text-decoration: none; }
.nav nav { display: flex; gap: 24px; font-size: 14px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--strong); }

/* A faint green glow behind the hero, the only decoration on the page. */
.hero { position: relative; text-align: center; padding: 72px 0 56px; }
.hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -120px; width: min(1100px, 100vw); height: 760px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(200, 237, 148, .11), transparent 70%); pointer-events: none; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(37, 38, 41, .7); font-size: 12px; letter-spacing: .04em; color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(200, 237, 148, .15); }
.eyebrow { margin: 0 0 14px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0 auto; max-width: 15ch; font-size: clamp(38px, 6.4vw, 66px); line-height: 1.05; font-weight: 650; letter-spacing: -.025em; color: var(--strong); text-wrap: balance; }
h1 em { font-style: normal; color: var(--brand); }
.lede { max-width: 60ch; margin: 24px auto 0; font-size: 18px; color: var(--text); text-wrap: pretty; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--strong); font-size: 15px; font-weight: 550; text-decoration: none; transition: border-color .15s, transform .15s, filter .15s; }
.button svg { width: 18px; height: 18px; stroke-width: 2.2; }
.button:hover { border-color: #50535a; transform: translateY(-1px); }
.button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 28px rgba(200, 237, 148, .18); }
.button.primary:hover { filter: brightness(1.05); }
.button.wide { width: 100%; }
.fine { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* Screenshot in a window frame; the inner frame clips the demo footer strip. */
.shot { position: relative; margin: 0; border: 1px solid #44474d; border-radius: 12px; overflow: hidden; background: #222326; box-shadow: 0 40px 120px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .4); }
.window-bar { display: flex; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #26272b; }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3c3e43; }
.shot-frame { aspect-ratio: 2880 / 1690; overflow: hidden; }
.shot-frame img { display: block; width: 100%; height: auto; }

.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; margin: 36px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.proof li { display: flex; align-items: center; gap: 9px; }
.proof svg { width: 18px; height: 18px; color: var(--brand); }

/* Feature spotlights: copy beside a static mock-up, alternating sides. */
.spotlights { display: grid; gap: 112px; margin-top: 128px; }
.spotlight { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.spotlight.flip .copy { order: 2; }
.kicker { margin: 0 0 10px; font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.spotlight h2 { margin: 0 0 14px; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; font-weight: 650; letter-spacing: -.015em; color: var(--strong); text-wrap: balance; }
.spotlight p { margin: 0; font-size: 16px; text-wrap: pretty; }
.spotlight .note { margin-top: 16px; padding-left: 14px; border-left: 2px solid var(--line); font-size: 14px; color: var(--muted); }

.mock { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; font: 12.5px/1 var(--mono); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.mock code { display: block; white-space: pre; font: inherit; color: var(--text); padding: 6px 12px; line-height: 1.5; }
.mock code i { display: inline-block; width: 2.2em; font-style: normal; color: #5f636c; text-align: right; margin-right: 12px; }
.mock .k { font-weight: inherit; color: var(--kw); }
.mock .n { font-weight: inherit; color: var(--num); }

.merge-mock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.merge-mock .col { border-right: 1px solid var(--line); padding-bottom: 10px; min-width: 0; }
.merge-mock .col:last-child { border-right: 0; }
.merge-mock header { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); background: var(--panel); font: 600 12px -apple-system, BlinkMacSystemFont, sans-serif; color: var(--strong); }
.merge-mock header small { font-size: 9px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.merge-mock code { padding: 4px 8px; overflow: hidden; text-overflow: clip; }
.merge-mock code i { width: 1.4em; margin-right: 8px; }
.merge-mock .hit { position: relative; background: var(--hit); }
.merge-mock .done { background: rgba(200, 237, 148, .08); box-shadow: inset 2px 0 0 var(--brand); }
.merge-mock .ok { color: var(--brand); margin-right: 6px; }
.merge-mock .ctl { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 1px 5px; border-radius: 4px; background: #4a3a31; color: var(--strong); }
.merge-mock .ctl.left { position: static; transform: none; margin-right: 6px; }
.merge-mock .col:first-child .hit { padding-right: 50px; }

.hunk-mock { padding-bottom: 8px; }
.hunk-mock .file { display: flex; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--strong); }
.hunk-mock .file small { color: var(--muted); font-size: 11px; }
.hunk-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-top: 6px; background: #23262d; color: #8a9bb8; }
.hunk-head code { padding: 0; flex: 1; color: inherit; }
.hunk-head.staged { margin-top: 14px; }
.pill, .tag { padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; font: 500 11px -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text); background: var(--raised); }
.pill.on { border-color: #4f6a3a; background: #2f3b27; color: var(--brand); }
.tag { border-color: transparent; background: transparent; color: var(--add-ink); }
.hunk-mock .add { background: var(--add); color: var(--add-ink); }
.hunk-mock .del { background: var(--del); color: var(--del-ink); }
.hunk-mock .ctx { color: #9aa0aa; }
.hunk-mock code i { width: 1.6em; margin-right: 6px; }

.log-mock .filters { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.log-mock .filters span { flex: 1; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; font: 12px -apple-system, BlinkMacSystemFont, sans-serif; color: #6f737c; white-space: nowrap; overflow: hidden; }
.log { display: flex; padding: 6px 0 10px; }
.lanes { flex: 0 0 44px; height: 168px; margin-left: 4px; stroke-width: 2; }
.lanes circle { stroke-width: 2.4; fill: var(--bg); }
.lane-a { stroke: var(--accent); }
.lane-b { stroke: #8fc58f; }
.log ol { flex: 1; min-width: 0; margin: 0; padding: 0 14px 0 4px; list-style: none; font: 13px -apple-system, BlinkMacSystemFont, sans-serif; }
.log li { display: flex; align-items: center; gap: 7px; height: 28px; white-space: nowrap; }
.log .msg { overflow: hidden; text-overflow: ellipsis; color: var(--strong); }
.log time { margin-left: auto; padding-left: 10px; color: var(--muted); font-size: 12px; }
.ref { flex-shrink: 0; padding: 1px 6px; border: 1px solid; border-radius: 4px; font-size: 11px; }
.ref.head { color: #e5c07b; border-color: #6b5a36; background: #3a3223; }
.ref.main, .ref.feat { color: #a6d189; border-color: #4a6138; background: #2a3324; }
.ref.tag { color: #9cb8e8; border-color: #3e5274; background: #262f40; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 128px 0 0; }
.features article { padding: 26px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, var(--panel), var(--bg)); }
.features svg { width: 22px; height: 22px; color: var(--brand); }
.features h3 { margin: 14px 0 8px; font-size: 17px; font-weight: 600; color: var(--strong); }
.features p { margin: 0; font-size: 15px; }

.pricing { display: flex; justify-content: center; padding: 128px 0 0; }
.price-card { position: relative; width: 100%; max-width: 440px; padding: 34px; border: 1px solid #4b5a3c; border-radius: 12px; background: linear-gradient(180deg, #262a24, var(--panel) 45%); box-shadow: 0 30px 90px rgba(200, 237, 148, .07); }
.price { margin: 0 0 22px; color: var(--muted); }
.price span { font-size: 46px; font-weight: 650; letter-spacing: -.02em; color: var(--strong); margin-right: 6px; }
.price-card ul { margin: 0 0 28px; padding: 0; list-style: none; }
.price-card li { padding: 9px 0 9px 26px; border-top: 1px solid var(--line); position: relative; font-size: 15px; }
.price-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--brand); }

.faq { max-width: 720px; margin: 0 auto; padding: 112px 0 0; }
.faq h2 { font-size: 26px; color: var(--strong); margin: 0 0 16px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 550; color: var(--strong); }
.faq details p { margin: 10px 0 0; }

.closing { position: relative; text-align: center; margin-top: 128px; padding: 72px 24px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, rgba(200, 237, 148, .10), transparent 65%), var(--panel); }
.closing h2 { margin: 18px 0 8px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; color: var(--strong); }
.closing p { margin: 0 0 28px; color: var(--muted); }

/* Side margins instead of padding so the top rule lines up with the content. */
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1072px; margin: 72px max(24px, calc((100% - 1072px) / 2)) 0; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.fine a, .faq a { color: var(--text); }

/* Policy pages. */
.doc { max-width: 720px; padding-top: 56px; }
.doc h1 { margin: 0; max-width: none; font-size: clamp(34px, 5vw, 46px); text-align: left; }
.doc .lead { margin: 18px 0 0; font-size: 18px; color: var(--strong); text-wrap: pretty; }
.doc h2 { margin: 44px 0 10px; font-size: 19px; font-weight: 600; color: var(--strong); }
.doc p, .doc li { font-size: 16px; text-wrap: pretty; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--brand); }
.doc a { color: var(--accent); }
.doc strong { color: var(--strong); font-weight: 600; }

@media (max-width: 900px) {
  .spotlight { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .spotlight.flip .copy { order: 0; }
  .spotlights { gap: 80px; margin-top: 96px; }
}
@media (max-width: 640px) {
  .nav, main { padding: 0 16px; }
  .footer { margin: 56px 16px 0; }
  .nav nav { gap: 16px; }
  .hero { padding: 44px 0 36px; }
  .lede { font-size: 16px; }
  .actions .button { flex: 1 1 100%; }
  .proof { justify-content: flex-start; gap: 10px; margin-top: 28px; }
  .proof li { flex: 1 1 100%; }
  .mock { font-size: 11px; }
  /* Two columns are enough to show the idea on a phone. */
  .merge-mock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merge-mock .incoming { display: none; }
  .merge-mock .result { border-right: 0; }
  .merge-mock { font-size: 10px; }
  .merge-mock .col:first-child .hit { padding-right: 40px; }
  .log-mock .filters span:nth-child(3) { display: none; }
  .features, .pricing, .faq { margin-top: 0; }
  .features { margin-top: 80px; }
  .pricing, .faq { padding-top: 80px; }
  .price-card { padding: 26px; }
  .closing { margin-top: 80px; padding: 52px 20px; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:hover { transform: none; } }

/* ---------- Motion ----------
   CSS only (the CSP allows no scripts). Every element's resting style is its
   final state, so with reduced motion, or in browsers without scroll-driven
   animations, the page is simply static and complete. */
.stack { display: inline-grid; }
.stack > * { grid-area: 1 / 1; }
.s-a { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance, staggered. */
  .hero > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero > :nth-child(2) { animation-delay: .08s; }
  .hero > :nth-child(3) { animation-delay: .16s; }
  .hero > :nth-child(4) { animation-delay: .24s; }
  .hero > :nth-child(5) { animation-delay: .32s; }
  .hero::before { animation: glow 14s ease-in-out infinite alternate; }
  .dot { animation: pulse 2.4s ease-in-out infinite; }
  h1 em { background: linear-gradient(100deg, var(--brand) 20%, #f0ffd6 45%, var(--brand) 70%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s ease-in-out 1s infinite; }
  .proof li { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .proof li:nth-child(1) { animation-delay: .5s; }
  .proof li:nth-child(2) { animation-delay: .58s; }
  .proof li:nth-child(3) { animation-delay: .66s; }
  .proof li:nth-child(4) { animation-delay: .74s; }
  .closing img { animation: float 6s ease-in-out infinite; }

  /* Merge mock loop (8s): unresolved → « pressed → incoming value accepted. */
  .res-line { animation: res-bg 8s infinite; }
  .res-line .s-a { animation: show-a 8s infinite; }
  .res-line .s-b { animation: show-b 8s infinite; }
  .inc-line { animation: inc-bg 8s infinite; }
  .press { display: inline-block; border-radius: 3px; animation: press 8s infinite; }
  /* Once the change is accepted the conflict is decided, so both sides drop their controls. */
  .merge-mock .ctl { animation: show-a 8s infinite; }
  .loc-line { animation: loc-bg 8s infinite; }

  /* Hunk mock loop (8s, offset): Stage pressed → hunk becomes staged. */
  .hunk-head.first { animation: hunk-bg 8s 1.5s infinite both; }
  .hunk-head.first .s-a { animation: show-a 8s 1.5s infinite both; }
  .hunk-head.first .s-b { animation: show-b 8s 1.5s infinite both; }
  .hunk-head.first .s-a.pill { animation-name: show-a, press-pill; }
  .hunk-head.first .appear { animation: show-b 8s 1.5s infinite both; }
  .hunk-head.first .fade { animation: show-a 8s 1.5s infinite both; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes glow { from { transform: translateX(-56%) scale(1); opacity: .8; } to { transform: translateX(-44%) scale(1.12); opacity: 1; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(200, 237, 148, 0); } 0%, 100% { box-shadow: 0 0 0 3px rgba(200, 237, 148, .18); } }
@keyframes shine { 0% { background-position: 100% 0; } 40%, 100% { background-position: 0 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }

@keyframes show-a { 0%, 36% { opacity: 1; } 42%, 92% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes show-b { 0%, 36% { opacity: 0; } 42%, 92% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes res-bg {
  0%, 36%, 98%, 100% { background: var(--hit); box-shadow: inset 0 0 0 transparent; }
  42%, 92% { background: rgba(200, 237, 148, .08); box-shadow: inset 2px 0 0 var(--brand); }
}
@keyframes loc-bg { 0%, 36%, 98%, 100% { background: var(--hit); opacity: 1; } 42%, 92% { background: transparent; opacity: .5; } }
@keyframes inc-bg { 0%, 36%, 98%, 100% { background: var(--hit); } 42%, 92% { background: rgba(200, 237, 148, .06); } }
@keyframes press {
  0%, 26%, 44%, 100% { background: transparent; color: inherit; transform: none; }
  32% { background: var(--brand); color: var(--brand-ink); transform: scale(1.25); }
  37% { background: var(--brand); color: var(--brand-ink); transform: scale(.9); }
}
@keyframes press-pill { 0%, 26%, 44%, 100% { transform: none; filter: none; } 32% { transform: scale(1.08); filter: brightness(1.3); } 37% { transform: scale(.94); } }
@keyframes hunk-bg { 0%, 36%, 98%, 100% { background: #23262d; } 42%, 92% { background: #233026; } }

/* Scroll-driven reveals where supported (Chromium, Safari 26+). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .reveal-kids > * { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .reveal-kids > :nth-child(2) { animation-range: entry 8% cover 34%; }
    .reveal-kids > :nth-child(3) { animation-range: entry 16% cover 38%; }
    /* The screenshot tilts up into place as it scrolls in. */
    .shot { animation: tilt linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; transform-origin: 50% 0; }
    /* Rows only fade in, never move sideways: staggered offsets would skew the
       right-aligned time column mid-scroll. Everything settles by full entry. */
    .log-mock .draw { stroke-dasharray: 1; animation: draw linear both; animation-timeline: view(); animation-range: entry 10% entry 90%; }
    .log li { animation: fade linear both; animation-timeline: view(); }
    .log li:nth-child(1) { animation-range: entry 10% entry 40%; }
    .log li:nth-child(2) { animation-range: entry 20% entry 50%; }
    .log li:nth-child(3) { animation-range: entry 30% entry 60%; }
    .log li:nth-child(4) { animation-range: entry 40% entry 70%; }
    .log li:nth-child(5) { animation-range: entry 50% entry 80%; }
    .log li:nth-child(6) { animation-range: entry 60% entry 90%; }
  }
}
@keyframes tilt { from { opacity: .3; transform: perspective(1800px) rotateX(16deg) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
