/* Macrophone — sameer.us/macrophone
   One look with the apps (Macrophone docs/DESIGN.md): ink ground, the Filament,
   serif for the words, mono for the machine. System fonts only; no web fonts. */

:root {
  color-scheme: dark;
  --ground: #05060d;
  --sunk: #090a13;
  --raised: #131520;
  --raised-2: #1a1d2b;
  --ink: #f4f2fa;
  --ink-2: #c9c8cf;
  --ink-3: #9e9da5;
  --line: rgba(244, 242, 250, 0.08);
  --line-2: rgba(244, 242, 250, 0.14);
  --line-3: rgba(244, 242, 250, 0.22);

  --cyan: #58b9de;
  --teal: #5cd3c3;
  --mint: #5ed6a2;
  --gold: #e8c06c;
  --ember: #e9714f;
  --violet: #9a86e6;
  --rose: #e66e7e;
  --ochre: #c99d68;
  --filament: linear-gradient(90deg, var(--cyan), var(--teal) 22%, var(--mint) 42%, var(--gold) 62%, var(--ember) 80%, var(--violet));

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --r1: 14px;
  --r2: 18px;
  --r3: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1160px;
  --measure: 40rem;
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font: 400 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--line-3); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(92, 211, 195, 0.3); color: var(--ink); }
strong { color: var(--ink); font-weight: 600; }
code, kbd, pre { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.36em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
kbd {
  border: 1px solid var(--line-3);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 0.35em;
  color: var(--ink);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--ground); padding: 8px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 6, 13, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; }
.brand span { font-family: var(--serif); font-size: 1.22rem; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.94rem; padding: 8px 12px; border-radius: 999px;
}
.site-nav a:hover { color: var(--ink); background: var(--raised); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .nav-cta { color: var(--ink); border: 1px solid var(--line-2); margin-left: 6px; }
.site-nav .nav-cta:hover { border-color: var(--line-3); }
@media (max-width: 560px) {
  .site-nav .hide-sm { display: none; }
  .site-nav a { padding: 8px 10px; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease-settle), box-shadow 0.25s var(--ease-settle), border-color 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #07080f; background: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 10px 40px -12px rgba(92, 211, 195, 0.55), 0 2px 30px -10px rgba(233, 113, 79, 0.45);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset, 0 14px 48px -12px rgba(92, 211, 195, 0.7), 0 2px 36px -10px rgba(233, 113, 79, 0.55); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: var(--line-3); background: var(--raised); }
.appstore { display: inline-block; border-radius: 10px; line-height: 0; }
.appstore img { height: 48px; width: auto; }
.req { font-size: 0.86rem; color: var(--ink-3); margin: 18px 0 0; line-height: 1.55; }
.req span { white-space: nowrap; }
.req span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-3); margin: 0 10px 0.2em; vertical-align: middle; }
@media (max-width: 560px) { .req span { white-space: normal; } .req span + span::before { display: none; } .req span { display: block; } }

/* ---------- Type ---------- */
h1, h2, h3, h4 { color: var(--ink); margin: 0; }
.display {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 1.3rem + 4.2vw, 4.4rem);
  line-height: 1.04; letter-spacing: -0.025em;
  max-width: 24ch;
}
.br-lg { display: none; }
@media (min-width: 900px) { .br-lg { display: inline; } }
.lede { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); line-height: 1.55; color: var(--ink-2); max-width: 36rem; margin: 22px 0 32px; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); line-height: 1.08; letter-spacing: -0.02em; }
.h3 { font: 600 1.08rem/1.35 var(--sans); letter-spacing: -0.005em; }
.sec { padding: clamp(72px, 10vw, 128px) 0 0; }
.sec-intro { max-width: var(--measure); margin-bottom: 40px; }
.sec-intro p { margin: 14px 0 0; }
.muted { color: var(--ink-3); }

/* ---------- Hero ---------- */
.hero { padding: clamp(44px, 7vw, 88px) 0 0; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -60px 0 auto; height: 520px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 60% at 12% 10%, rgba(88, 185, 222, 0.10), transparent 70%),
    radial-gradient(35% 50% at 80% 0%, rgba(154, 134, 230, 0.08), transparent 70%);
}

/* ---------- The demo stage ---------- */
.stage {
  --cycle: 12s;
  position: relative; margin: clamp(40px, 6vw, 64px) 0 0;
  border: 1px solid var(--line); border-radius: var(--r3);
  background:
    radial-gradient(60% 80% at 50% 120%, rgba(92, 211, 195, 0.07), transparent 70%),
    linear-gradient(180deg, var(--sunk), var(--ground));
  padding: clamp(20px, 4vw, 48px);
  display: grid; grid-template-columns: 212px minmax(48px, 1fr) minmax(0, 2.6fr); align-items: center; gap: 0;
  overflow: hidden; isolation: isolate;
}
.stage figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* phone */
.phone {
  position: relative; aspect-ratio: 9 / 18.6; width: 100%;
  border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #2a2d3a, #12141c 40%, #1c1f2a);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.phone-screen {
  position: relative; height: 100%; border-radius: 30px; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 100%, rgba(92, 211, 195, 0.08), transparent 60%), var(--ground);
  display: flex; flex-direction: column; padding: 34px 16px 18px;
}
.phone-screen::before { content: ""; position: absolute; top: 10px; left: 50%; width: 30%; height: 18px; transform: translateX(-50%); border-radius: 12px; background: #000; }
.ph-status { position: relative; height: 16px; font: 500 9.5px/16px var(--mono); letter-spacing: 0.12em; color: var(--ink-3); }
.ph-status > span { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; opacity: 0; }
.ph-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.ph-status .s-ready { opacity: 1; animation: st-ready var(--cycle) infinite; }
.ph-status .s-listen { animation: st-listen var(--cycle) infinite; color: var(--ink-2); }
.ph-status .s-send { animation: st-send var(--cycle) infinite; color: var(--cyan); }
.ph-status .s-done { animation: st-done var(--cycle) infinite; color: var(--mint); }
.ph-words {
  position: relative; flex: 1; margin-top: 14px;
  font: 400 13px/1.5 var(--serif); color: var(--ink);
}
.ph-words span { display: block; opacity: 0; }
.ph-words .w1 { animation: w1 var(--cycle) infinite; }
.ph-words .w2 { animation: w2 var(--cycle) infinite; }
.ph-words .w3 { animation: w3 var(--cycle) infinite; }
.ph-words .w4 { animation: w4 var(--cycle) infinite; }
.ph-words .um { color: var(--ink-3); display: inline; opacity: 1; animation: none; }
.ph-words .pfx { color: var(--teal); display: inline; opacity: 1; animation: none; }
.ph-filament { position: relative; height: 70px; margin: 6px -16px 0; }
.ph-filament svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ph-filament .live { transform-origin: 50% 50%; transform-box: fill-box; }
.ph-filament .live-a { animation: fil-a var(--cycle) infinite; }
.ph-filament .live-b { animation: fil-b var(--cycle) infinite; }
.ph-filament .flat { opacity: 0.45; animation: fil-flat var(--cycle) infinite; }
.ph-filament .flat-done { opacity: 0; animation: fil-done var(--cycle) infinite; }
.ph-filament .wob { animation: wob 0.62s ease-in-out infinite alternate; transform-origin: 50% 50%; transform-box: fill-box; }
.ph-filament .wob2 { animation: wob 0.47s ease-in-out infinite alternate-reverse; transform-origin: 50% 50%; transform-box: fill-box; }
.ph-mic {
  margin: 14px auto 0; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(244, 242, 250, 0.06); border: 1px solid var(--line-2);
  animation: mic var(--cycle) infinite;
}
.ph-mic i { width: 18px; height: 18px; border-radius: 6px; background: var(--ember); display: block; animation: mic-i var(--cycle) infinite; }

/* the line between phone and Mac */
.link { position: relative; height: 100%; min-height: 40px; }
.link svg { position: absolute; top: 50%; left: -12px; width: calc(100% + 24px); height: 40px; transform: translateY(-50%); overflow: visible; }
.link .rail { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; }
.link .pulse { stroke-dasharray: 60 400; stroke-dashoffset: 60; animation: pulse var(--cycle) infinite; }
.link-v { display: none; }

/* Mac */
.mac { position: relative; border-radius: var(--r2); border: 1px solid var(--line-2); background: #0b0c15; overflow: hidden; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95); }
.menubar {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px; height: 26px; padding: 0 14px;
  background: rgba(244, 242, 250, 0.05); border-bottom: 1px solid var(--line);
  font: 500 11px/1 var(--sans); color: var(--ink-3);
}
.menubar .mb-icon { width: 18px; height: 14px; color: var(--ink); position: relative; }
.menubar .mb-icon::after { content: ""; position: absolute; right: -3px; bottom: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.desk { position: relative; padding: clamp(16px, 3vw, 32px); padding-top: clamp(56px, 6vw, 84px); min-height: 360px; background: radial-gradient(80% 90% at 70% 0%, rgba(154, 134, 230, 0.08), transparent 60%), radial-gradient(70% 80% at 10% 100%, rgba(88, 185, 222, 0.07), transparent 60%); }
.term { border-radius: 12px; border: 1px solid var(--line-2); background: #0e1019; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(244, 242, 250, 0.16); }
.term-bar b { flex: 1; text-align: center; margin-right: 44px; font: 500 11.5px/1 var(--sans); color: var(--ink-3); }
.term-body { padding: 16px 18px 20px; font: 400 13px/1.65 var(--mono); color: var(--ink-3); min-height: 168px; }
.term-body .prev { opacity: 0.7; }
.term-body .prompt { margin-top: 14px; display: flex; gap: 10px; color: var(--ink); }
.term-body .prompt > b { color: var(--teal); font-weight: 400; }
.term-body .typed { position: relative; }
.term-body .typed span { display: block; clip-path: inset(0 100% 0 0); }
.term-body .t1 { animation: t1 var(--cycle) infinite; }
.term-body .t2 { animation: t2 var(--cycle) infinite; }
.term-body .t3 { animation: t3 var(--cycle) infinite; }
.term-body .t4 { animation: t4 var(--cycle) infinite; }
.term-body .caret { display: inline-block; width: 7px; height: 1.1em; vertical-align: -0.2em; background: var(--ink-2); animation: blink 1s steps(1) infinite; }

.popup {
  position: absolute; top: 8px; right: 12px; width: min(300px, 70%);
  border-radius: var(--r1); padding: 12px 14px 12px;
  background: rgba(26, 29, 43, 0.82); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  transform-origin: 92% 0; opacity: 0; transform: scale(0.6) translateY(-10px);
  animation: popup var(--cycle) infinite;
}
.popup-head { position: relative; height: 18px; font: 600 12px/18px var(--sans); color: var(--ink); }
.popup-head > span { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; }
.popup-head .ph-a { animation: ph-a var(--cycle) infinite; }
.popup-head .ph-b { opacity: 0; animation: ph-b var(--cycle) infinite; }
.popup-head .ring { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-3); border-top-color: var(--mint); }
.popup-head .cancel { margin-left: auto; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px; line-height: 16px; font-size: 11px; }
.popup-head .ok { width: 16px; height: 16px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; color: #062014; }
.popup-head .ok svg { width: 10px; height: 10px; }
.popup p { margin: 6px 0 0; font: 400 12px/1.45 var(--serif); color: var(--ink-2); }
.popup .count { height: 2px; margin-top: 10px; border-radius: 2px; background: var(--line); overflow: hidden; }
.popup .count i { display: block; height: 100%; background: var(--mint); transform-origin: 0 50%; animation: countdown var(--cycle) infinite; }

/* The one loop: 12s. 0–5% ready, 5–44% listening, 44–54% sending, 54–92% delivered, fade, repeat. */
@keyframes st-ready { 0%, 4% { opacity: 1; } 5%, 96% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes st-listen { 0%, 4% { opacity: 0; } 5%, 43% { opacity: 1; } 44%, 100% { opacity: 0; } }
@keyframes st-send { 0%, 43% { opacity: 0; } 44%, 53% { opacity: 1; } 54%, 100% { opacity: 0; } }
@keyframes st-done { 0%, 53% { opacity: 0; } 54%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes w1 { 0%, 7% { opacity: 0; transform: translateY(4px); } 10%, 94% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes w2 { 0%, 16% { opacity: 0; transform: translateY(4px); } 19%, 94% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes w3 { 0%, 26% { opacity: 0; transform: translateY(4px); } 29%, 94% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes w4 { 0%, 35% { opacity: 0; transform: translateY(4px); } 38%, 94% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes fil-a { 0%, 4% { opacity: 0.25; transform: scaleY(0.06); } 6%, 42% { opacity: 1; transform: scaleY(1); } 46%, 100% { opacity: 0; transform: scaleY(0.04); } }
@keyframes fil-b { 0%, 4% { opacity: 0; transform: scaleY(0.06); } 8%, 40% { opacity: 0.7; transform: scaleY(1); } 45%, 100% { opacity: 0; transform: scaleY(0.04); } }
@keyframes fil-flat { 0%, 3% { opacity: 0.45; } 5%, 44% { opacity: 0; } 47%, 53% { opacity: 1; } 56%, 96% { opacity: 0; } 99%, 100% { opacity: 0.45; } }
@keyframes fil-done { 0%, 53% { opacity: 0; } 56%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes wob { from { transform: scaleY(0.55); } to { transform: scaleY(1.08); } }
@keyframes mic { 0%, 4% { box-shadow: 0 0 0 0 rgba(233, 113, 79, 0); } 6%, 42% { box-shadow: 0 0 0 6px rgba(233, 113, 79, 0.16), 0 0 30px rgba(233, 113, 79, 0.35); } 46%, 100% { box-shadow: 0 0 0 0 rgba(233, 113, 79, 0); } }
@keyframes mic-i { 0%, 4% { border-radius: 50%; transform: scale(0.9); } 6%, 43% { border-radius: 5px; transform: scale(0.8); } 46%, 100% { border-radius: 50%; transform: scale(0.9); } }
@keyframes pulse { 0%, 44% { stroke-dashoffset: 60; opacity: 0; } 44.5% { opacity: 1; } 54% { stroke-dashoffset: -200; opacity: 1; } 54.5%, 100% { stroke-dashoffset: -200; opacity: 0; } }
@keyframes popup { 0%, 53% { opacity: 0; transform: scale(0.6) translateY(-10px); } 57%, 90% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: scale(0.85) translateY(-6px); } }
@keyframes ph-a { 0%, 69% { opacity: 1; } 70%, 100% { opacity: 0; } }
@keyframes ph-b { 0%, 69% { opacity: 0; } 70%, 100% { opacity: 1; } }
@keyframes countdown { 0%, 56% { transform: scaleX(1); } 70%, 100% { transform: scaleX(0); } }
@keyframes t1 { 0%, 70% { clip-path: inset(0 100% 0 0); } 74%, 94% { clip-path: inset(0 0 0 0); opacity: 1; } 97%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes t2 { 0%, 74% { clip-path: inset(0 100% 0 0); } 78%, 94% { clip-path: inset(0 0 0 0); opacity: 1; } 97%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes t3 { 0%, 78% { clip-path: inset(0 100% 0 0); } 82%, 94% { clip-path: inset(0 0 0 0); opacity: 1; } 97%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes t4 { 0%, 82% { clip-path: inset(0 100% 0 0); } 84%, 94% { clip-path: inset(0 0 0 0); opacity: 1; } 97%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }

.stage-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 0.88rem; color: var(--ink-3); }
.stage-legend b { color: var(--ink-2); font-weight: 500; }
.motion-toggle { margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.motion-toggle:hover { border-color: var(--line-3); color: var(--ink); }
.stage.paused *, .stage.paused *::before, .stage.paused *::after { animation-play-state: paused !important; }

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; justify-items: center; padding: 24px 16px 20px; }
  .phone { width: min(236px, 68vw); aspect-ratio: 9 / 14; }
  .phone-screen { padding-top: 30px; }
  .link { width: 40px; height: 56px; min-height: 0; }
  .link-h { display: none; }
  .link-v { display: block; }
  .link svg.link-v { left: 50%; top: -6px; width: 40px; height: calc(100% + 12px); transform: translateX(-50%); }
  .mac { width: 100%; }
  .desk { min-height: 0; }
  .desk { padding: 150px 14px 16px; }
  .term-body { font-size: 11px; padding: 12px 12px 14px; min-height: 140px; }
  .term-body .prompt { gap: 8px; }
  .popup { right: 10px; left: 10px; width: auto; }
  .steps li::before { margin-bottom: 10px; }
}

/* Reduced motion (or paused): the finished state, still. */
@media (prefers-reduced-motion: reduce) {
  .stage *, .stage *::before, .stage *::after { animation: none !important; }
  .stage .ph-status .s-ready, .stage .ph-status .s-listen, .stage .ph-status .s-send { opacity: 0; }
  .stage .ph-status .s-done, .stage .ph-words span { opacity: 1; }
  .stage .ph-filament .live { opacity: 0; }
  .stage .ph-filament .flat { opacity: 0; }
  .stage .ph-filament .flat-done { opacity: 1; }
  .stage .term-body .typed span { clip-path: none; }
  .stage .popup { opacity: 1; transform: none; }
  .stage .popup .count i { transform: scaleX(0); }
  .stage .popup-head .ph-a { opacity: 0; }
  .stage .popup-head .ph-b { opacity: 1; }
  .motion-toggle { display: none; }
}

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); counter-reset: step; }
.steps li { padding: 28px 28px 8px 0; position: relative; counter-increment: step; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 18px;
  font: 400 2.4rem/1 var(--serif); color: transparent;
  background: var(--filament); -webkit-background-clip: text; background-clip: text;
  background-size: 300% 100%;
}
.steps li:nth-child(2)::before { background-position: 50% 0; }
.steps li:nth-child(3)::before { background-position: 100% 0; }
.steps p { margin: 8px 0 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 4px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
}

/* ---------- Audience ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); }
.split > div > p { margin: 12px 0 0; }
.split .lead-col .h2 { margin-bottom: 4px; }
.uses { list-style: none; padding: 0; margin: 18px 0 0; }
.uses li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.uses li:last-child { border-bottom: 1px solid var(--line); }
.uses li b { color: var(--ink); font-weight: 500; min-width: 9.5rem; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .uses li { flex-direction: column; gap: 2px; } }

/* ---------- Privacy statement ---------- */
.promise {
  position: relative; border-radius: var(--r3); padding: clamp(32px, 6vw, 72px);
  background: linear-gradient(180deg, var(--raised), var(--sunk));
  border: 1px solid var(--line);
  overflow: hidden;
}
.promise::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--filament); opacity: 0.7; }
.promise blockquote { margin: 0; font: 400 clamp(1.5rem, 1.1rem + 1.7vw, 2.35rem)/1.28 var(--serif); color: var(--ink); letter-spacing: -0.01em; max-width: 28em; }
.promise-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.promise-facts p { margin: 6px 0 0; font-size: 0.95rem; }
@media (max-width: 760px) { .promise-facts { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Cleanup dial (radio + :checked, no JS) ---------- */
.dial { border: 1px solid var(--line); border-radius: var(--r2); background: var(--sunk); padding: clamp(20px, 3vw, 32px); }
.dial fieldset { border: 0; margin: 0; padding: 0; }
.dial legend { font: 600 1.08rem/1.35 var(--sans); color: var(--ink); padding: 0; margin-bottom: 14px; }
.dial-stops { display: grid; grid-template-columns: repeat(4, 1fr); }
.dial-stops::before { content: ""; grid-row: 1; grid-column: 1 / -1; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.dial-stops input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dial-stops label { grid-row: 1; position: relative; margin: 4px; text-align: center; padding: 8px 4px; border-radius: 999px; cursor: pointer; font-size: 0.92rem; color: var(--ink-2); user-select: none; transition: background 0.2s, color 0.2s; }
.dial-stops label:nth-of-type(1) { grid-column: 1; }
.dial-stops label:nth-of-type(2) { grid-column: 2; }
.dial-stops label:nth-of-type(3) { grid-column: 3; }
.dial-stops label:nth-of-type(4) { grid-column: 4; }
.dial-stops label:hover { color: var(--ink); }
.dial-stops input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 2px; }
.dial-stops input:checked + label { background: var(--ink); color: #07080f; font-weight: 600; }
.dial-stops .dial-out { grid-row: 2; grid-column: 1 / -1; }
.dial-out { margin-top: 20px; min-height: 7.5em; }
.dial-out > div { display: none; }
.dial-out p { margin: 0; font: 400 1.18rem/1.5 var(--serif); color: var(--ink); }
.dial-out small { display: block; margin-top: 10px; color: var(--ink-3); font-size: 0.88rem; }
#lv-off:checked ~ .dial-out .o-off, #lv-light:checked ~ .dial-out .o-light, #lv-medium:checked ~ .dial-out .o-medium, #lv-heavy:checked ~ .dial-out .o-heavy { display: block; }
.dial .said { margin: 0 0 18px; font-size: 0.92rem; color: var(--ink-3); }
.dial .said q { font-family: var(--serif); color: var(--ink-2); font-size: 1.02rem; }

/* ---------- Feature list ---------- */
.features { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.flist { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.flist > div { padding: 18px 0; border-top: 1px solid var(--line); }
.flist dt { color: var(--ink); font-weight: 600; font-size: 1rem; }
.flist dd { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.55; }
@media (max-width: 920px) { .features { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .flist { grid-template-columns: 1fr; } }

/* ---------- Dev block ---------- */
.dev { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.dev .links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .dev { grid-template-columns: 1fr; } }

/* ---------- Code blocks ---------- */
.code { position: relative; margin: 18px 0 24px; border-radius: var(--r1); border: 1px solid var(--line-2); background: #0b0c15; overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); font: 500 0.74rem/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; }
.copy { font: 500 0.78rem/1 var(--sans); color: var(--ink-2); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--line-3); }
.copy.done { color: var(--mint); border-color: rgba(94, 214, 162, 0.45); }
.code pre code { font-size: inherit; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 0.86rem; line-height: 1.65; color: var(--ink); tab-size: 2; }
.code .c { color: var(--ink-3); }
.code .k { color: var(--teal); }
.code .s { color: var(--gold); }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font: 500 1.1rem/1.4 var(--serif); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg);
  transition: transform 0.3s var(--ease-settle);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 0 22px; max-width: 44rem; }
.faq .a p { margin: 0 0 10px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- Closing ---------- */
.closing { text-align: left; padding: clamp(80px, 12vw, 140px) 0 clamp(56px, 8vw, 96px); }
.closing .h2 { max-width: 18ch; margin-bottom: 28px; }
.filament-rule { height: 2px; border: 0; margin: 0; background: var(--filament); opacity: 0.5; border-radius: 2px; -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 40px; font-size: 0.9rem; color: var(--ink-3); }
.site-foot .wrap:first-child { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 28px; }
.site-foot h2 { font: 600 0.82rem/1.3 var(--sans); color: var(--ink-2); margin-bottom: 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: var(--ink-3); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot .legal { grid-column: 1 / -1; margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.78rem; line-height: 1.5; color: var(--ink-3); max-width: 60rem; }
.site-foot .fine { margin: 12px 0 0; max-width: 22rem; line-height: 1.5; }
@media (max-width: 760px) { .site-foot .wrap:first-child { grid-template-columns: 1fr 1fr; } .site-foot .wrap:first-child > :first-child { grid-column: 1 / -1; } }

/* ---------- Article pages (docs, recipes, guides, legal) ---------- */
.page { padding: clamp(40px, 6vw, 72px) 0 0; }
.page-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.page-grid.solo { grid-template-columns: minmax(0, 1fr); }
.sidenav { position: sticky; top: 84px; font-size: 0.93rem; }
.sidenav h2 { font: 600 0.8rem/1.3 var(--sans); color: var(--ink-3); margin: 22px 0 8px; }
.sidenav h2:first-child { margin-top: 0; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav a { display: block; padding: 6px 12px; margin-left: -12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.sidenav a:hover { color: var(--ink); background: var(--raised); }
.sidenav a[aria-current="page"] { color: var(--ink); background: var(--raised); box-shadow: inset 2px 0 0 var(--teal); }
@media (max-width: 860px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-grid > .sidenav { order: 2; margin-top: 8px; }
  .sidenav { position: static; border: 1px solid var(--line); border-radius: var(--r1); padding: 14px 16px; background: var(--sunk); }
  .sidenav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .sidenav a { margin-left: 0; padding: 5px 10px; border: 1px solid var(--line); }
  .sidenav h2 { margin-top: 14px; }
}

.prose { max-width: 46rem; min-width: 0; }
.prose > h1 { font: 500 clamp(2.1rem, 1.5rem + 2.4vw, 3.2rem)/1.06 var(--serif); letter-spacing: -0.02em; }
.prose > .kicker { font-size: 0.92rem; color: var(--ink-3); margin: 0 0 12px; }
.prose > .kicker a { color: var(--ink-3); }
.prose > .intro { font-size: 1.16rem; line-height: 1.6; color: var(--ink-2); margin: 18px 0 8px; }
.prose h2 { font: 500 1.7rem/1.2 var(--serif); letter-spacing: -0.01em; margin: 56px 0 12px; scroll-margin-top: 84px; }
.prose h3 { font: 600 1.06rem/1.4 var(--sans); margin: 32px 0 6px; scroll-margin-top: 84px; }
.prose h3 code { font-size: 0.92em; }
.prose p, .prose ul, .prose ol { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose .anchor { color: var(--ink-3); text-decoration: none; margin-left: 8px; opacity: 0; font-family: var(--sans); font-size: 0.8em; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }

.table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--r1); }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-weight: 600; color: var(--ink); background: var(--sunk); font-size: 0.86rem; }
.prose table.keyed th { background: transparent; font-weight: 500; color: var(--ink-3); font-size: 0.93rem; white-space: nowrap; }
.prose table.keyed tr:last-child th { border-bottom: 0; }
.prose td code { white-space: nowrap; }

.note { margin: 22px 0; padding: 16px 18px; border-radius: var(--r1); background: var(--raised); border: 1px solid var(--line); font-size: 0.97rem; }
.note.warn { border-color: rgba(201, 157, 104, 0.4); }
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }
.note strong:first-child { display: block; margin-bottom: 2px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.cards a { display: block; padding: 18px 20px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--sunk); text-decoration: none; color: var(--ink-2); transition: border-color 0.2s, background 0.2s; }
.cards a:hover { border-color: var(--line-3); background: var(--raised); }
.cards a b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.cards a span { font-size: 0.93rem; line-height: 1.5; display: block; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

.pager { display: flex; justify-content: space-between; gap: 16px; margin: 64px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; color: var(--ink); }
.pager small { display: block; color: var(--ink-3); font-size: 0.8rem; }
.pager .next { text-align: right; margin-left: auto; }

.prose .toc, .toc { margin: 24px 0 8px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.toc a { display: inline-block; font-size: 0.86rem; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.toc a:hover { border-color: var(--line-3); color: var(--ink); }

.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-list > li { counter-increment: s; position: relative; padding-left: 2.6em; margin: 18px 0; }
.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: -0.05em; width: 1.75em; height: 1.75em; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 500 0.86rem/1 var(--sans); color: var(--ink); }

/* Download page */
.dl-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.dl-card { border: 1px solid var(--line); border-radius: var(--r3); padding: 28px; background: linear-gradient(180deg, var(--raised), var(--sunk)); }
.dl-card .icon { width: 88px; height: 88px; margin-bottom: 18px; }
.dl-card dl { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 0.93rem; }
.dl-card dt { color: var(--ink-3); }
.dl-card dd { margin: 0; color: var(--ink); }
@media (max-width: 860px) { .dl-hero { grid-template-columns: 1fr; } }

.release { border-top: 1px solid var(--line); padding: 28px 0; }
.release h2 { margin: 0 0 4px !important; }
.release .when { color: var(--ink-3); font-size: 0.9rem; margin: 0 0 12px; }

/* Product screenshots (figure.shot). Popups and phone shots are 2x captures, shown at half size. */
.shot { margin: 28px 0; }
.shot img { width: 100%; height: auto; border-radius: var(--r1); border: 1px solid var(--line-2); background: var(--sunk); box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95); }
.shot-popup img { max-width: 350px; border: 0; background: transparent; border-radius: 28px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line-2); }
.shot-iphone img { max-width: 300px; border-radius: var(--r3); }
.shot figcaption { margin-top: 10px; font-size: 0.88rem; line-height: 1.5; color: var(--ink-3); max-width: 40rem; }
.shot-pair { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: flex-start; }
.shot-pair .shot { margin: 20px 0; flex: 0 1 auto; }

.prose details.more { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r1); padding: 10px 16px; }
.prose details.more summary { cursor: pointer; color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.prose details.more[open] summary { margin-bottom: 8px; }

/* Landing: app targeting */
.target-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.target-copy > p { margin: 14px 0 0; }
.target-apps { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.target-apps li { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; color: var(--ink); background: var(--raised); }
.target-apps li small { color: var(--ink-3); font-size: 0.82rem; margin-left: 4px; }
.say { margin: 24px 0 0; padding: 18px 20px; border-radius: var(--r2); border: 1px solid var(--line-2); background: var(--sunk); }
.say p { margin: 0; font: 400 1.18rem/1.45 var(--serif); color: var(--ink); }
.say p b { color: var(--teal); font-weight: 400; }
.say small { display: block; margin-top: 8px; font-size: 0.88rem; color: var(--ink-3); }
.target-visual { position: relative; display: flex; justify-content: center; padding-bottom: 40px; }
.target-visual .shot { margin: 0; }
.target-visual .shot-iphone img { max-width: 290px; }
.target-visual .shot-popup { position: absolute; left: 0; bottom: 0; width: min(330px, 62%); }
.target-visual .shot-popup img { max-width: 100%; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.trio > div { border-top: 1px solid var(--line-2); padding-top: 16px; }
.trio h3 { margin: 0; }
.trio p { margin: 6px 0 0; font-size: 0.95rem; line-height: 1.55; }
.trio a { font-size: 0.92rem; }
@media (max-width: 860px) {
  .target-sec { grid-template-columns: 1fr; }
  .target-visual { padding-bottom: 0; flex-direction: column; align-items: center; gap: 18px; }
  .target-visual .shot-popup { position: static; width: min(340px, 100%); }
  .trio { grid-template-columns: 1fr; gap: 4px; }
}


@media print {
  .site-head, .site-foot, .stage, .copy, .sidenav { display: none !important; }
  body { background: #fff; color: #000; }
}
