/* Trace site, second version (plan/13-site-2.md).
   Colours and type are the app's (Trace/DesignSystem/Tokens.swift, plan/02-design-system.md): one black, one white,
   one accent. Ice means the trace, the lined-up state and Pro, and here also the focus ring. Nothing else. */

@font-face { font-family: "Geist"; src: url("/fonts/Geist-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
/* Arial sized to Geist's measured widths, so the swap to Geist moves nothing. */
@font-face { font-family: "Geist Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400; size-adjust: 103.2%; ascent-override: 97.9%; descent-override: 29%; line-gap-override: 0%; }
@font-face { font-family: "Geist Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 500; size-adjust: 105.6%; ascent-override: 95.6%; descent-override: 28.4%; line-gap-override: 0%; }

:root {
  --cam: #050506;
  --fg: #F3F3F1;
  --dim: rgba(243, 243, 241, .6);     /* secondary text: 7:1 on --cam */
  --unlit: rgba(243, 243, 241, .4);   /* large type waiting to be lit: 3.6:1, large text only */
  --line: rgba(243, 243, 241, .14);
  --fill: rgba(255, 255, 255, .08);
  --ice: #A9D2FF;
  --sans: "Geist", "Geist Fallback", "SF Pro Text", system-ui, -apple-system, sans-serif;

  /* The app's two curves (plan/12-motion.md): arrivals settle, state changes are quick. */
  --settle: cubic-bezier(.19, 1, .22, 1);
  --state: .36s;

  --gutter: 16px;
  --gap: 16px;
  --mast: 56px;
  --section: clamp(104px, 15vw, 208px);

  /* Type. Display sizes are fluid; tracking tightens as the size grows, as in the app. */
  --t-hero: clamp(2rem, calc((100vw - 32px) / 8.15), 4rem);   /* "Anyone can take it." is 8.03 em wide: it fills the measure on a phone */
  --t-title: clamp(2.125rem, 6.2vw, 4.5rem);
  --t-fact: clamp(1.75rem, 5.4vw, 4rem);
  --t-step: clamp(1.5rem, 3.1vw, 2.5rem);
  --t-lead: clamp(1.125rem, 1.5vw, 1.3125rem);

  /* Agent V's modules read these (site/js/trace/README.md). Photographs are square-cornered, as in a camera. */
  --trace-ice: var(--ice);
  --trace-fg: var(--fg);
  --trace-bg: var(--cam);
  --trace-radius: 0px;
  --trace-tile-radius: 0px;
  --trace-pair-gap: 8px;
  --trace-pair-pad: 16px;
  --trace-label-font: var(--sans);
}
@media (min-width: 700px) { :root { --gutter: 32px; --gap: 24px; --mast: 64px; } }
@media (min-width: 1000px) { :root { --gutter: 48px; --mast: 72px; --trace-pair-pad: 32px; --trace-pair-gap: 12px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--cam); color-scheme: dark; scrollbar-color: rgba(243, 243, 241, .28) var(--cam); }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--cam);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
main { flex: 1 0 auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
::selection { background: rgba(169, 210, 255, .32); color: var(--fg); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(243, 243, 241, .4); transition: text-decoration-color .14s ease-out, opacity .14s ease-out; }
a:active { opacity: .55; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: currentColor; } }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 4px; }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: 10px; z-index: 10; padding: 8px 14px; border-radius: 999px; background: var(--fg); color: #0B0B0C; font-weight: 500; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; outline-offset: 2px; }

/* One left edge for everything: the gutter, and a 12-column grid from 1000px up. */
.mast, .foot, .app, .ways, .pairs, .facts, .asks, .end, .prose {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.mast { display: flex; align-items: center; height: var(--mast); }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-size: 22px; font-weight: 500; letter-spacing: -.045em; text-decoration: none; }

h1, h2 { font-weight: 500; text-wrap: balance; }
.lead { max-width: 30em; color: var(--dim); font-size: var(--t-lead); line-height: 1.4; letter-spacing: -.005em; text-wrap: pretty; }
.note { max-width: 32em; color: var(--dim); font-size: 15px; line-height: 1.45; text-wrap: pretty; }

/* The launch switch (site.config.json LIVE): text until the app is live, then Apple's badge. */
.soon { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform .14s ease-out; }
.badge:active { transform: scale(.97); opacity: 1; }
.badge img { height: 52px; width: auto; }


/* 1. The viewfinder. On a phone it fills the first screen as the camera does, and the headline sits under its lower edge. */

.hero { display: flex; flex-direction: column; }
.hero__view { width: 100%; }
.hero .trace-viewfinder {
  --copy: 222px;                       /* room kept under it for the headline, the line and the call to action */
  width: 100%;
  height: min(133.334vw, calc(100vh - var(--mast) - var(--copy)));
  height: min(133.334vw, calc(100svh - var(--mast) - var(--copy)));
  min-height: 300px;
}
/* Where the camera does not run (no script, reduced motion, no WebGL) the box holds the still pair, so it is only
   as tall as the pair: two 3:4 tiles, their captions, and trace.css's room under them. */
.hero .trace-viewfinder { --still: calc((100vw - 2 * var(--trace-pair-pad) - var(--trace-pair-gap)) * 2 / 3 + 2 * var(--trace-pair-pad) + 86px); }
@media (max-width: 999.98px) {
  html:not(.trace-js) .hero .trace-viewfinder, html .hero .trace-viewfinder[data-state="still"] { height: var(--still); min-height: 0; }
}
@media (max-width: 999.98px) and (prefers-reduced-motion: reduce) {
  html .hero .trace-viewfinder { height: var(--still); min-height: 0; }
}
.hero:has(.badge) .trace-viewfinder { --copy: 254px; }   /* Apple's badge is taller than the line it replaces */
.hero__copy { padding: 22px max(var(--gutter), env(safe-area-inset-left)) 0; }
.hero h1 { font-size: var(--t-hero); letter-spacing: -.045em; line-height: 1; }
.hero h1 span { display: block; transition: color .9s var(--settle); }
.hero__sub { margin-top: 14px; max-width: 24em; color: var(--dim); text-wrap: balance; }
.hero .cta { margin-top: 18px; }

/* The second sentence waits for the shot (site.js lights it on trace:pair). Only where the demo will run:
   boot.js has put .trace-js on <html>, and the visitor has not asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .trace-js .hero:not([data-lit]) h1 span { color: var(--unlit); }
}

@media (min-width: 700px) and (max-width: 999.98px) {
  .hero .trace-viewfinder { --copy: 300px; height: min(110vw, calc(100svh - var(--mast) - var(--copy))); }
  .hero:has(.badge) .trace-viewfinder { --copy: 336px; }
  .hero__copy { padding-top: 32px; }
  :root { --t-hero: clamp(3.5rem, 9vw, 5rem); }
}

@media (min-width: 1000px) {
  .hero {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: end;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .hero__copy { grid-column: 1 / span 5; grid-row: 1; padding: 0 0 6px; }
  .hero__view { grid-column: 6 / -1; grid-row: 1; }
  .hero .trace-viewfinder { height: clamp(460px, calc(100svh - var(--mast) - 48px), 860px); }
  .hero h1 { font-size: clamp(3.5rem, 6.7vw, 6.25rem); letter-spacing: -.05em; line-height: .96; }
  .hero__sub { margin-top: 28px; font-size: var(--t-lead); max-width: 17em; }
  .hero .cta { margin-top: 28px; }
}


/* 2. The real app. Apple's iPhone frame, whole and straight; the clip is cut to the phone's outline by a mask.
   Nothing is drawn over it and it casts nothing. */

.app { padding-top: var(--section); display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
.app__title { font-size: var(--t-title); letter-spacing: -.045em; line-height: 1; }
.phone {
  height: min(58svh, 560px);
  aspect-ratio: 784 / 1600;
  max-width: 100%;
}
.phone__clip {
  width: 100%; height: 100%;
  object-fit: contain;
  -webkit-mask: url("/media/phone-mask.png") center / 100% 100% no-repeat;
  mask: url("/media/phone-mask.png") center / 100% 100% no-repeat;
}
/* A browser with no CSS masks would show a pale ring around the phone: it gets the still, which has its own alpha. */
@supports not ((mask-image: url("x")) or (-webkit-mask-image: url("x"))) {
  .phone__clip { display: none; }
  .phone { background: url("/media/phone-linedup.webp") center / contain no-repeat; }
}
.clip-toggle {
  margin-top: 6px; padding: 0; min-height: 44px;
  border: 0; background: none; color: var(--dim);
  font: inherit; font-size: 15px; text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(243, 243, 241, .3);
  transition: color .14s ease-out;
}
.clip-toggle[hidden] { display: none; }
/* On a phone the framed iPhone stands in the middle of the column, its button under it; the steps stay on the left edge. */
@media (max-width: 699.98px) {
  .phone { margin-inline: auto; }
  .clip-toggle { display: block; margin-inline: auto; text-align: center; }
}
@media (hover: hover) and (pointer: fine) { .clip-toggle:hover { color: var(--fg); } }

.steps { display: grid; row-gap: 22px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.1em minmax(0, 1fr); transition: color var(--state) ease-out; }
.steps li::before { content: counter(step); grid-row: 1 / span 2; padding-top: .5em; color: var(--dim); font-size: 15px; font-variant-numeric: tabular-nums; transition: color var(--state) ease-out; }
.steps h3 { font-size: var(--t-step); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.steps p { margin-top: 6px; color: var(--dim); transition: color var(--state) ease-out; }
/* While the clip plays, the step it is showing is lit and the others wait (site.js sets data-timed and .on). */
.steps[data-timed] li:not(.on) { color: var(--unlit); }
.steps[data-timed] li:not(.on) p, .steps[data-timed] li:not(.on)::before { color: rgba(243, 243, 241, .5); }   /* small text: stays above 4.5:1 */
.steps[data-timed] li.on::before { color: var(--fg); }

@media (min-width: 700px) {
  .app { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(40px, 8vw, 136px); align-items: center; row-gap: 0; }
  .app__phone { grid-column: 1; grid-row: 1 / span 2; }
  .app__title { grid-column: 2; align-self: end; margin-bottom: clamp(36px, 5vw, 72px); }
  .steps { grid-column: 2; align-self: start; row-gap: clamp(24px, 3vw, 40px); max-width: 34rem; }
  .phone { height: min(78svh, 760px); }
}


/* 3. The trace, three ways. */

.ways { padding-top: var(--section); display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
.ways h2 { font-size: var(--t-title); letter-spacing: -.045em; line-height: 1; max-width: 9em; }
.ways .lead { margin-top: 20px; }
.ways .note { margin-top: 14px; }
.ways__stage { position: relative; width: min(100%, 56svh); }
.trace-styles { width: 100%; }

@media (min-width: 1000px) {
  /* The words and the control are one block on the left, its bottom on the picture's bottom edge; the picture
     stands alone on the right. The control stays inside agent V's root in the markup (the module finds it there),
     so it is placed against the section: nothing between it and .ways may be positioned. */
  .ways { position: relative; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
  .ways__copy { grid-column: 1 / span 5; }
  .ways__stage { position: static; grid-column: 7 / -1; justify-self: end; width: min(100%, 60svh, 560px); }
  .ways .trace-styles__controls {
    --w: calc((100% - 2 * var(--gutter) - 11 * var(--gap)) * 5 / 12 + 4 * var(--gap));   /* five columns */
    position: absolute; left: max(var(--gutter), env(safe-area-inset-left)); bottom: 0;
    width: min(var(--w), 28rem); margin: 0;
  }
  /* Room for it under the words, only once the module has shown it (it is 106px tall: 50 + 12 + 44). */
  .ways:has([data-trace-controls]:not([hidden])) .ways__copy { padding-bottom: 138px; }
}

/* The two controls, as the app's trace drawer has them: the style pills and the Opacity slider.
   trace.css leaves the fieldset alone; the module shows it when it can draw. */
.trace-styles__controls { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; font-size: 15px; }
.trace-styles__controls[hidden] { display: none; }
.trace-styles__controls legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 12px; background: var(--fill); }
.seg label { position: relative; display: grid; place-items: center; min-height: 44px; border-radius: 9px; color: var(--dim); font-weight: 500; letter-spacing: -.01em; cursor: pointer; transition: background-color .2s ease-out, color .2s ease-out; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg label:has(input:checked) { background: rgba(255, 255, 255, .16); color: var(--fg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--ice); outline-offset: 2px; }
.seg label:active span { opacity: .6; }

.dial { display: grid; grid-template-columns: auto minmax(0, 1fr) 3.2em; align-items: center; column-gap: 14px; min-height: 44px; color: var(--dim); }
.dial output { color: var(--fg); font-variant-numeric: tabular-nums; text-align: right; }
.dial input {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer;
  --at: calc((var(--trace-opacity, .45) - .1) / .9);
}
.dial input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--fg) calc(11px + var(--at) * (100% - 22px)), rgba(255, 255, 255, .16) 0); }
.dial input::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .16); }
.dial input::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--fg); }
.dial input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 0; border-radius: 50%; background: var(--fg); transition: transform .14s ease-out; }
.dial input::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--fg); }
.dial input:active::-webkit-slider-thumb { transform: scale(1.12); }
.dial input:focus-visible { outline: none; }
.dial input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ice); outline-offset: 3px; }
.dial input:focus-visible::-moz-range-thumb { outline: 2px solid var(--ice); outline-offset: 3px; }


/* 4. Pairs. Three photographs, stepping down the page, never a row of cards. */

.pairs { padding-top: var(--section); }
.pairs h2 { font-size: var(--t-title); letter-spacing: -.045em; line-height: 1; }
.pairs .lead { margin-top: 20px; }
.pairs__row { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pairs__row li { position: relative; }
.trace-wipe { width: 100%; }

@media (min-width: 700px) {
  .pairs__row { margin-top: clamp(48px, 6vw, 88px); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
  .pairs__row li:nth-child(2) { margin-top: clamp(40px, 7vw, 104px); }
  .pairs__row li:nth-child(3) { margin-top: clamp(80px, 14vw, 208px); }
}


/* 5. What else is true. Plain sentences, large. Each lights as the reader reaches it (site.js, data-light). */

.facts { padding-top: var(--section); }
.facts ul { display: grid; row-gap: clamp(20px, 2.6vw, 36px); max-width: 22em; font-size: var(--t-fact); }
.facts li { font-weight: 500; letter-spacing: -.04em; line-height: 1.06; text-wrap: balance; transition: color .7s var(--settle); }
.facts ul[data-lighting] li:not(.on) { color: var(--unlit); }


/* 6. Questions. */

.asks { padding-top: var(--section); display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
.asks h2 { font-size: var(--t-title); letter-spacing: -.045em; line-height: 1; }
.ask { padding: 22px 0 24px; border-top: 1px solid var(--line); }
.ask h3 { font-size: clamp(1.1875rem, 1.7vw, 1.4375rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.ask p { margin-top: 8px; max-width: 36em; color: var(--dim); text-wrap: pretty; }
.asks__more { padding-top: 22px; border-top: 1px solid var(--line); }
.asks__more a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 1000px) {
  .asks { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
  .asks h2 { grid-column: 1 / span 5; position: sticky; top: 40px; }
  .asks__list { grid-column: 7 / -1; }
  .ask { padding: 26px 0 30px; }
}


/* 7. The end. The page closes the way it opened: a photograph, and the words under its lower edge. */

.end { padding-top: var(--section); padding-bottom: clamp(72px, 10vw, 144px); display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
.end__photo { position: relative; margin-inline: calc(-1 * var(--gutter)); }
.end__photo img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.end h2 { font-size: clamp(3.5rem, 17vw, 8rem); letter-spacing: -.055em; line-height: .92; }
.end .cta { margin-top: 24px; }

@media (min-width: 700px) {
  .end { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
  .end__copy { grid-column: 1 / span 7; grid-row: 1; padding-bottom: 4px; }
  .end__photo { grid-column: 8 / -1; grid-row: 1; margin-inline: 0; }
  .end h2 { font-size: clamp(5rem, 11.5vw, 10.5rem); }
  .end .cta { margin-top: clamp(28px, 3vw, 44px); }
}


/* Type arrives plainly and quickly, once. site.js hides only what is still below the screen when it runs,
   so with no script, and for anything already in view, the words are simply there. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].pre { opacity: 0; transform: translateY(14px); }
  [data-reveal].in { transition: opacity .5s ease-out, transform .7s var(--settle); }
}


/* Fine print: privacy, support, not found. The same black, the same type, a narrow measure. */

.prose { padding-top: clamp(40px, 8vw, 104px); padding-bottom: clamp(72px, 10vw, 144px); }
.prose > * { max-width: 38rem; }
.prose h1 { max-width: none; font-size: var(--t-title); letter-spacing: -.045em; line-height: 1; }
.prose h2 { margin: 44px 0 8px; font-size: clamp(1.1875rem, 1.7vw, 1.4375rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; text-wrap: pretty; }
.prose p { margin: 0 0 12px; color: var(--dim); text-wrap: pretty; }
.prose strong { font-weight: 500; color: var(--fg); }
.prose a { color: var(--fg); }
.prose h1 + p { margin-top: 20px; }
.prose .meta { font-size: 15px; }
.prose .lead { font-size: 17px; }
.pending { color: var(--dim); }
@media (min-width: 1000px) {
  .prose { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-content: start; }
  .prose > * { grid-column: 7 / -1; }
  .prose h1 { grid-column: 1 / span 5; grid-row: 1 / span 40; position: sticky; top: 40px; align-self: start; }
  .prose > h1 + p { margin-top: calc(var(--t-title) * .78 - 1.15em); }   /* its first line sits on the title's baseline */
}

.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px;
  padding-top: 14px; padding-bottom: max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px;
}
.foot nav { display: flex; gap: 28px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { text-decoration: underline; } }
