/* ShotOps landing page. No build step, no web fonts, no libraries.

   The look follows docs/design.md (the app's own design system): ink on warm
   paper, 1 px hairlines instead of boxes, light headlines, pill buttons, and
   one accent ("signal") kept for things that are live, like recording.
   Motion lives at the bottom of this file and in site.js; all of it is
   switched off under "Reduce motion". */

:root {
  /* The shared tokens. Same names and values as integrations/share-server/theme.mjs
     and ThemeCSS in Sources/RetakeRender/Theme.swift; change all three together. */
  color-scheme: light dark;
  --canvas: #fdfcfc;
  --surface: #f5f3f1;
  --raised: #ffffff;
  --line: #e5e5e5;
  --line-soft: #eeece9;
  --ink: #0a0a0a;
  --ink-2: #777169;
  --ink-3: #a59f97;
  --on-ink: #ffffff;
  --signal: #e8522b;
  --positive: #2f7d4f;
  --negative: #c8331e;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --r-xs: 4px;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --r-pill: 999px;
  --fast: 120ms;
  --base: 200ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* This page's own. */
  --wrap: 1160px;
  --pad: clamp(20px, 4vw, 48px);
}
/* Dark: follows the system, unless the visitor picked a theme with the
   toggle (site.js stores it; index.html applies it before the first paint). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0e0e0d;
    --surface: #181716;
    --raised: #242321;
    --line: #2c2b29;
    --line-soft: #211f1e;
    --ink: #f5f3f1;
    --ink-2: #a59f97;
    --ink-3: #6e6961;
    --on-ink: #0a0a0a;
    --signal: #ff6a3d;
    --positive: #5bbf85;
    --negative: #ff7a66;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0e0e0d;
  --surface: #181716;
  --raised: #242321;
  --line: #2c2b29;
  --line-soft: #211f1e;
  --ink: #f5f3f1;
  --ink-2: #a59f97;
  --ink-3: #6e6961;
  --on-ink: #0a0a0a;
  --signal: #ff6a3d;
  --positive: #5bbf85;
  --negative: #ff7a66;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
h3 { font-weight: 400; letter-spacing: -0.01em; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface); padding: 0.1em 0.4em; border-radius: var(--r-xs); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* The content column: a 1 px frame down both sides, the full length of the page. */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
main > section { border-top: 1px solid var(--line); }
main > section:first-child { border-top: 0; }
main > section > .wrap { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }

.label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.lede { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 18px); max-width: 52ch; text-wrap: pretty; }
.fine { color: var(--ink-2); font-size: 13.5px; }
.textlink { text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.textlink:hover { text-decoration-color: var(--ink); }
.sec-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2, .private h2, .mac h2, .faq h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; margin-top: 12px; }
.sec-head .lede, .private .lede, .mac .lede { margin-top: 16px; }

kbd {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  font: 500 13px/1 var(--font);
  background: var(--raised); border-radius: var(--r-s); box-shadow: 0 0 0 1px var(--line), 0 1px 0 1px var(--line);
}
kbd + kbd { margin-left: 4px; }

/* ── Scroll position, drawn as a playhead ────────────────── */
.playhead { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 30; pointer-events: none; }
.playhead i { display: block; height: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ── Top bar ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--canvas) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); display: inline-block; }
.top nav { display: flex; gap: 26px; margin-left: auto; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.btn.icon, .btn.small.icon { width: 40px; padding: 0; }
.btn.icon svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon { fill: currentColor; stroke: none; }
.theme-toggle[data-showing="dark"] .moon, .theme-toggle[data-showing="light"] .sun { display: none; }
.top nav a, footer nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color var(--fast) var(--ease); }
.top nav a:hover, footer nav a:hover { color: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 20px;
  border-radius: var(--r-pill); border: 0;
  background: var(--raised); color: var(--ink); box-shadow: 0 0 0 1px var(--line);
  font-weight: 500; font-size: 14.5px; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.btn:hover { background: var(--surface); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.btn.primary:hover { opacity: 0.86; }
.btn.quiet { background: none; box-shadow: none; color: var(--ink-2); padding: 0 12px; }
.btn.quiet:hover { background: var(--surface); color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[hidden] { display: none; }
/* A link that hasn't been set in index.html. */
.btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.42; }
.btn[aria-disabled="true"]:hover { background: var(--raised); }
.btn.primary[aria-disabled="true"]:hover { opacity: 0.42; }
.btn[aria-disabled="true"]:active { transform: none; }

.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); flex: none; }

.unset { display: inline-block; margin-top: 16px; padding: 8px 14px; border: 1px dashed var(--ink-3); border-radius: var(--r-m); color: var(--ink-2); font-size: 13.5px; }
.unset[hidden] { display: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero .wrap { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(20px, 4vw, 48px); }
h1 { font-size: clamp(38px, 6.2vw, 80px); line-height: 1.04; letter-spacing: -0.02em; margin-top: 18px; }
h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
h1 .line > span { display: block; }
.hero .lede { margin-top: 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; align-items: center; }
.hero .fine { margin-top: 16px; }

/* ── Screenshots sit in a quiet panel ────────────────────── */
.shot { background: var(--surface); border-radius: var(--r-l); padding: clamp(12px, 2.6vw, 36px); }
.shot img { border-radius: var(--r-m); }
.shot figcaption { color: var(--ink-3); font-size: 13px; margin-top: clamp(10px, 1.6vw, 18px); text-align: center; }
.hero-shot { margin-top: clamp(40px, 6vw, 72px); padding: clamp(12px, 4vw, 56px) clamp(12px, 4vw, 56px) clamp(10px, 1.6vw, 20px); transform-origin: 50% 0; }

/* ── Moving strip ────────────────────────────────────────── */
.strip { overflow: hidden; padding: 0; }
.marquee { display: flex; gap: 0; width: max-content; }
.marquee li { padding: 18px 26px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; border-right: 1px solid var(--line); }

/* ── How it works ────────────────────────────────────────── */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.three li { padding: 28px 28px 8px 0; border-right: 1px solid var(--line); }
.three li + li { padding-left: 28px; }
.three li:last-child { border-right: 0; padding-right: 0; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.three h3 { font-size: 22px; font-weight: 300; letter-spacing: -0.02em; margin: 18px 0 8px; }
.three p { color: var(--ink-2); }

/* ── Feature showcase ────────────────────────────────────── */
.step { padding: 36px 0; border-top: 1px solid var(--line); }
.step h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 300; letter-spacing: -0.025em; line-height: 1.15; margin: 10px 0 14px; text-wrap: balance; }
.step p:not(.label) { color: var(--ink-2); max-width: 46ch; }
.step p + p { margin-top: 10px; }
.step .shot { margin-top: 26px; }
.stage { display: none; }

/* With scripts on and room to spare: the words scroll, the picture stays. */
@media (min-width: 901px) {
  .js .show-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 56px; align-items: start; }
  .js .step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; border-top: 0; padding: 0; opacity: 0.28; transition: opacity 0.4s var(--ease); }
  .js .step.on { opacity: 1; }
  .js .step .shot { display: none; }
  .js .stage { display: block; position: sticky; top: max(84px, calc(50vh - 240px)); margin: calc(37vh - 240px) 0; background: var(--surface); border-radius: var(--r-l); aspect-ratio: 16 / 11; overflow: hidden; }
  .stage img { position: absolute; inset: 20px 20px 38px; width: calc(100% - 40px); height: calc(100% - 58px); object-fit: contain; border-radius: var(--r-m); opacity: 0; transform: scale(0.965); transition: opacity 0.45s var(--ease), transform 0.6s var(--ease); }
  .stage img.on { opacity: 1; transform: none; }
  .stage .count { position: absolute; left: 16px; bottom: 10px; font-size: 12px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
  .stage .ticks { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 5px; }
  .stage .ticks i { width: 18px; height: 2px; background: var(--line); transition: background 0.3s ease-out; }
  .stage .ticks i.on { background: var(--ink); }
}

/* ── Privacy ─────────────────────────────────────────────── */
.private-grid, .mac-grid, .faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.ledger li { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-top: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 1px solid var(--line); }
.ledger span { color: var(--ink-2); }
.ledger b { font-weight: 500; text-align: right; }
.ledger .out b { color: var(--ink-2); font-weight: 400; }
.ledger .out b::before { content: "↗ "; color: var(--ink-3); }

/* ── And more ────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tiles li { padding: 26px 26px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background var(--base) var(--ease); }
.tiles li:hover { background: var(--surface); }
.tiles h3 { font-size: 17px; line-height: 22px; margin-bottom: 8px; }
.tiles p { color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ── Mac ─────────────────────────────────────────────────── */
.keys li { display: flex; align-items: center; gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.keys li:last-child { border-bottom: 1px solid var(--line); }
.combo { display: inline-flex; min-width: 132px; }

/* ── Pricing ─────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.plan { display: flex; flex-direction: column; padding: 28px 24px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan h3 { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.price { font-size: clamp(40px, 4.4vw, 56px); font-weight: 300; letter-spacing: -0.04em; line-height: 1.1; margin: 8px 0 20px; font-variant-numeric: tabular-nums; }
.plan ul { display: grid; gap: 8px; margin-bottom: 28px; font-size: 15px; color: var(--ink-2); }
.plan ul li { padding-left: 18px; position: relative; }
.plan ul li::before { content: ""; position: absolute; left: 1px; top: 0.72em; width: 8px; height: 1px; background: var(--ink-3); }
.plan .btn { margin-top: auto; width: 100%; }
.pricing .fine { margin-top: 22px; }

/* ── Questions ───────────────────────────────────────────── */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 19px 36px 19px 0; font-size: 17px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-54%); font-size: 22px; font-weight: 300; color: var(--ink-3); transition: transform var(--base) var(--ease); }
details[open] summary::after { transform: translateY(-54%) rotate(45deg); }
details p { color: var(--ink-2); padding-right: 36px; max-width: 62ch; }
details p + p { margin-top: 10px; }
details p:last-child { padding-bottom: 22px; }

/* ── Closing: a recording in progress ────────────────────── */
.closing h2 { font-size: clamp(32px, 5vw, 64px); line-height: 1.05; margin-top: 30px; }
.closing .fine { margin-top: 16px; }
.recbar { display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 8px 0 16px; border-radius: var(--r-pill); background: var(--raised); box-shadow: 0 0 0 1px var(--line); max-width: 100%; }
.rec-label { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.rec-time { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 2px; height: 100%; border-radius: 1px; background: var(--ink-3); transform: scaleY(0.25); }
.rec-keys { display: inline-flex; padding-left: 4px; }

/* ── Footer ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; padding-top: 28px; padding-bottom: 96px; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer .fine { margin-left: auto; color: var(--ink-3); }

/* ── The bar that follows you down the page ──────────────── */
.dock {
  position: fixed; left: 50%; bottom: 18px; z-index: 25;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px;
  border-radius: var(--r-pill); background: color-mix(in srgb, var(--raised) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px var(--line);
  transform: translate(-50%, 140%); opacity: 0; visibility: hidden;
  transition: transform 0.35s var(--ease), opacity 0.25s ease-out, visibility 0s 0.35s;
}
.dock.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 0.35s var(--ease), opacity 0.25s ease-out; }
.dock-name { font-size: 14px; font-weight: 500; padding-right: 6px; }

/* ── Narrow screens ──────────────────────────────────────── */
@media (max-width: 900px) {
  .private-grid, .mac-grid, .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three { grid-template-columns: 1fr; }
  .three li, .three li + li { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .three li:last-child { border-bottom: 0; padding-bottom: 0; }
  .top nav a:nth-child(1) { display: none; }
}
@media (max-width: 600px) {
  .wrap { border-left: 0; border-right: 0; }
  .top nav { display: none; }
  .top-actions { margin-left: auto; }
  .cta { flex-direction: column; align-items: stretch; }
  .tiles, .plans { grid-template-columns: 1fr; border-left: 0; }
  .tiles li, .plan { border-right: 0; padding-left: 0; padding-right: 0; }
  .tiles li:hover { background: none; }
  .ledger li { flex-direction: column; gap: 2px; }
  .ledger b { text-align: left; }
  .combo { min-width: 124px; }
  .recbar .wave i:nth-child(n + 9) { display: none; }
  .rec-keys { display: none; }
  .recbar { padding-right: 16px; }
  footer .fine { margin-left: 0; }
  .dock { left: 12px; right: 12px; bottom: 12px; transform: translateY(140%); }
  .dock-name { margin-right: auto; }
  .dock.on { transform: none; }
}

/* ── Motion ──────────────────────────────────────────────────
   Everything below only runs when scripts are on (.js) and the visitor has
   not asked for less motion. Without either, the page is simply still. */
@media (prefers-reduced-motion: no-preference) {
  /* First paint: the hero comes up line by line. */
  .js .rise { opacity: 0; transform: translateY(110%); animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  .js p.rise, .js div.rise { transform: translateY(14px); }
  @keyframes rise { to { opacity: 1; transform: none; } }

  /* On scroll: things fade up as they enter, in order. */
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].in { opacity: 1; transform: none; }

  /* The hero picture starts a little small and grows as you scroll to it. */
  .js .hero-shot { transform: scale(var(--grow, 1)); will-change: transform; }

  /* The strip drifts; it stops under the pointer. */
  .js .marquee { animation: drift 46s linear infinite; }
  .js .strip:hover .marquee { animation-play-state: paused; }
  @keyframes drift { to { transform: translateX(-50%); } }

  /* Record dots breathe. */
  .rec-dot { animation: breathe 1.8s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: 0.35; } }

  /* The closing bar's sound wave. */
  .js .wave i { animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--n) * -137ms); }
  @keyframes wave { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(var(--h, 0.9)); } }

  /* Shortcut keys press down, one after another, when their row arrives. */
  .js .keys li.in kbd { animation: press 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + var(--k, 0) * 60ms + 200ms); }
  @keyframes press { 0% { transform: none; } 40% { transform: translateY(2px); box-shadow: 0 0 0 1px var(--ink-3); } 100% { transform: none; } }
}

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