@import url("/site-tokens.css");

/* Anaphora public site — Part II, "The Fleet". DESIGN.md §10–17.
   Fonts, colours and type faces come from ui/tokens.css (shared with the working
   register). What stays here is the public register's own layout: the rail and gutter
   widths, the section and block rhythm, a narrower measure, and the ease. These
   override tokens.css's working-register values because this sheet loads after it.
   The public ground is its own: a sharp, bright purple. */

:root {
  --ground: #4426b8;
  --raised: #5233c9;
  --violet: #c6aaff;                 /* the mark's violet, lifted to read on the brighter ground */
  --rule: #5e44c2;                   /* the border: a step lighter than the ground */
  --ink-quiet: #b8ace7;              /* secondary text */
  --rule-strong: #9a89e6;            /* a 2px line that has to read against the ground */
  --rail: 0px;
  --gutter: max(32px, calc((100vw - 1200px) / 2));   /* a centred 1200px column */
  --radius-card: 16px;
  --radius-field: 12px;
  --section: clamp(96px, 14vh, 200px);
  --block: clamp(48px, 6vh, 88px);
  --measure: 62ch;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--ground); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: clamp(19px, 1.35vw, 22px);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--lime); color: var(--ground); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
input, textarea { caret-color: var(--lime); }
html { scrollbar-color: var(--ink-quiet) var(--ground); scrollbar-width: thin; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px;
  background: var(--ground); color: var(--ink); font: 500 15px/1 var(--font-ui);
  border: 1px solid var(--ink); border-radius: 4px;
}

/* The mark (shared with every surface) */
.white { color: var(--ink); stroke: currentColor; }
.purple { color: var(--violet); stroke: currentColor; }
.lime { color: var(--lime); stroke: currentColor; }
.mark-sm { width: 24px; height: 27px; overflow: visible; display: block; }
.mark-sm use { fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-width: 8.5; }

/* ---------- The field ---------- */

.fleet {
  position: fixed; inset: var(--bar, 80px) 0 0 0; z-index: 0;
  width: 100%; height: calc(100% - var(--bar, 80px));   /* under the top bar, so the mark fits whole */
  display: block; pointer-events: none;
}
.fleet-fallback {
  display: none;
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%; object-fit: cover;
}
html.no-webgl .fleet { display: none; }
html.no-webgl .fleet-fallback { display: block; }

/* ---------- Top bar ---------- */

/* One bar on every public page: the wordmark left, the demo request right, sticky over a
   translucent ground. */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(68, 38, 184, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-family: var(--font-ui);
}
.topbar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--bar, 80px); padding: 0 var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); text-decoration: none; }
.wordmark { font: 500 22px/1 var(--font-ui); letter-spacing: -0.01em; white-space: nowrap; }

/* ---------- Request a demo ---------- */

/* The lime pill, in the top bar, on the cover and on the form (lime is what acts). */
.demo {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 26px; min-height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--lime); color: var(--ground);
  font: 600 17px/1.5 var(--font-ui); text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(207, 227, 90, 0.55);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease);
}
.demo:hover, .demo:focus-visible { transform: translateY(-1px); background: #dbec74; box-shadow: 0 14px 36px -10px rgba(207, 227, 90, 0.7); }
.demo:focus-visible { outline-color: #fff; }
.demo:disabled { opacity: 0.6; cursor: progress; transform: none; }
@media (prefers-reduced-motion: reduce) { .demo { transition: none; } }

/* ---------- The cover (the home page's first screen) ---------- */

/* "Build more. File less." top-left, the crane and the steel it lifts bottom-right
   (cover-art-*.webp, drawn on the ground's own purple so it has no edge), the demo request
   bottom-left. The cover fills the screen under the top bar; the page scrolls on below it. */
.hero.cover {
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--bar, 80px));
  flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 32px;
  padding-top: clamp(16px, 5vh, 72px); padding-bottom: clamp(28px, 6vh, 72px);
}
.hero.cover > :not(.cover-art) { position: relative; z-index: 1; }
.cover-art {
  position: absolute; right: 0; bottom: 0; z-index: 0; pointer-events: none;
  display: block; width: min(100vw, calc((100svh - var(--bar, 80px)) * 1.19)); height: auto;
  /* Its left, top and bottom edges fade into the ground: no seam at any size. */
  --fade: linear-gradient(to right, transparent, #000 16%), linear-gradient(to bottom, transparent, #000 22%), linear-gradient(to top, transparent, #000 96px);
  -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in;
  mask-image: var(--fade); mask-composite: intersect;
}
/* Taller than wide: the art grows past the left edge so the crane, not the empty sky, fills the
   lower half under the text. */
@media (max-aspect-ratio: 1/1) {
  .cover-art { width: min(150vw, 113svh); }
}
.hero.cover .statement {
  max-width: none;
  font-weight: 700; font-size: clamp(52px, min(9.6vw, 15.5vh), 184px);
  line-height: 0.92; letter-spacing: -0.045em;
}
/* "Build more." is set a tenth larger than "Less admin." */
.hero.cover .statement .line:first-child { font-size: 1.1em; }
.hero.cover .lede {
  margin-top: 0.85em; max-width: none;
  font-size: clamp(19px, min(2.3vw, 3.7vh), 38px); line-height: 1.2; letter-spacing: -0.01em;
}
.hero.cover > .links { margin: 0; }
.hero.cover .lede .line { display: block; }

/* "Learn more today →": the cover's way down the page. Lime, underlined; on hover the link
   lifts and grows a little, the underline thickens and the arrow steps right. */
.more {
  position: relative; display: inline-flex; align-items: baseline; gap: 0.4em;
  padding: 6px 0 10px; color: var(--lime); text-decoration: none;
  font: 600 clamp(20px, 1.8vw, 26px) / 1.2 var(--font-ui); letter-spacing: -0.01em;
  transform-origin: left center;
  transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.more::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--lime);
  transition: height 220ms var(--ease), bottom 220ms var(--ease), box-shadow 220ms var(--ease);
}
/* The link sits at the foot of the first screen, inside the margin site.js's reveal ignores:
   it is never hidden. */
.hero.cover > .links.reveal { opacity: 1; transform: none; }
.more .arrow { display: inline-block; transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.more:hover, .more:focus-visible { transform: translateY(-3px) scale(1.06); }
.more:hover::after, .more:focus-visible::after { height: 5px; bottom: -3px; box-shadow: 0 8px 22px -4px rgba(207, 227, 90, 0.7); }
.more:hover .arrow, .more:focus-visible .arrow { transform: translateX(6px); }

/* The statement's hover drawings, flat in the system's colours (white line on the ground, violet,
   lime). Each line has one either side of its words: "Build more." has buildings under a tower
   crane on the left and a set square with two hard hats on the right; "File less." has paper
   falling onto a pile on the left and a monitor ticking off its rows on the right. At rest they
   are tucked behind the words, small and turned. On hover they turn and slide out to their side
   while "Build more." grows a little and "File less." shrinks a little. */
.statement .word { position: relative; display: inline-block; isolation: isolate; }
.statement .w { display: inline-block; transform-origin: 0 60%; transition: transform 520ms cubic-bezier(0.34, 1.45, 0.64, 1); }
/* On hover an underline draws itself under the line's key word, left to right: lime under
   "more", violet under "Less". It retracts the same way. A touch screen, which cannot hover,
   shows both underlines all the time. */
.statement .u { position: relative; display: inline-block; }
.statement .u::after {
  content: ""; position: absolute; left: 0.02em; right: 0.02em; bottom: -0.03em; height: 0.07em; border-radius: 0.04em;
  background: var(--lime);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 260ms ease-in;
}
.statement .u-less::after { background: var(--violet); }
.word:hover .u::after { transform: none; transition: transform 520ms cubic-bezier(0.2, 0.7, 0.1, 1) 80ms; }
@media (hover: none) { .statement .u::after { transform: none; } }
@media (prefers-reduced-motion: reduce) { .statement .u::after { transition: none; } }

/* While the drawings are out, the letters carry a halo in the ground's own purple: it cuts the
   drawings back from the letter edges, and shows nowhere else. (Tested against a lime and a
   violet outline, which both thicken the letters and close their counters.) */
.word:hover .w { -webkit-text-stroke: 0.085em var(--ground); paint-order: stroke fill; }
.word.grow:hover .w { transform: scale(1.14); }
.word.shrink:hover .w { transform: scale(0.8); }
.pop {
  --size: 1.12em;
  position: absolute; z-index: -1; top: 50%; margin-top: calc(var(--size) / -2);
  width: var(--size); height: var(--size); overflow: visible; pointer-events: none;
  opacity: 0;
  transition: transform 620ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 200ms linear;
}
/* Each turns out about its inner bottom corner, the one behind the words, and stops with its
   inner edge still tucked behind them. */
.pop-r { left: calc(100% - 0.26em); transform-origin: 0 100%; transform: translateX(-60%) rotate(-95deg) scale(0.4); }
.grow .pop-r { left: calc(114% - 0.26em); }
.shrink .pop-r { --size: 0.98em; left: calc(80% - 0.24em); }
/* The left drawing stands in the page's margin: as big as the margin allows, and absent where the
   margin cannot hold it. */
.pop-l { --size: min(1.12em, calc(var(--gutter) + 0.26em - 10px)); right: calc(100% - 0.26em); transform-origin: 100% 100%; transform: translateX(60%) rotate(95deg) scale(0.4); }
.word:hover .pop-l { opacity: 1; transform: rotate(-7deg); }
.word:hover .pop-r { opacity: 1; transform: rotate(7deg); }
.word:hover .pop-r { transition-delay: 70ms; }
@media (max-width: 1300px) { .pop-l { display: none; } }

.pop .i-box { fill: var(--ground); stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
.pop .i-cut { fill: none; stroke: var(--violet); stroke-width: 3; stroke-linejoin: round; }
.pop .i-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pop .i-thin { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.pop .i-w { fill: var(--ink); }
.pop .i-g { fill: var(--ground); opacity: 0.55; }
.pop .i-v { fill: var(--violet); }
.pop .i-l { fill: var(--lime); }
.pop .i-ridge { fill: #a9bd3c; }
.pop .i-ridge-w { fill: var(--violet); }
.pop g, .pop rect, .pop circle { transform-box: fill-box; }

/* the crane's load swings from its trolley; the hats bob */
.pc-load { transform-origin: 50% 0; }
.word:hover .pc-load { animation: load-swing 2.4s 500ms ease-in-out infinite; }
@keyframes load-swing { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(9deg); } 75% { transform: rotate(-9deg); } }
.pt-hat { transform-origin: 50% 100%; }
.word:hover .pt-hat { animation: hat-wobble 1.8s 600ms ease-in-out infinite; }
.word:hover .pt-hat.h2 { animation-delay: 900ms; animation-duration: 2.2s; }
@keyframes hat-wobble { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-9deg) translateY(-8%); } 65% { transform: rotate(6deg); } }

/* paper falls onto the pile, the air full of it from the first frame */
.pf-paper { opacity: 0; }
.word:hover .pf-paper { animation: paper-fall 2.4s linear infinite; }
/* negative delays: every sheet is already mid-fall on the first frame, and the cycle carries on */
.word:hover .pf-paper.p1 { animation-delay: -300ms; }
.word:hover .pf-paper.p2 { animation-delay: -900ms; }
.word:hover .pf-paper.p3 { animation-delay: -1500ms; }
.word:hover .pf-paper.p4 { animation-delay: -2100ms; }
@keyframes paper-fall {
  0% { opacity: 0; transform: translateY(-40%) rotate(-24deg); }
  12% { opacity: 1; }
  40% { transform: translate(22%, 90%) rotate(16deg); }
  70% { transform: translate(-14%, 190%) rotate(-14deg); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(4%, 260%) rotate(6deg); }
}
/* the monitor's rows fill and tick themselves off */
.pf-row { transform: scaleX(0); transform-origin: 0 50%; }
.pf-check { fill: var(--rule); transform-origin: 50% 50%; }
.word:hover .pf-row { animation: row-type 2.7s 500ms ease-out infinite; }
.word:hover .pf-check { animation: row-check 2.7s 500ms ease-out infinite; }
.word:hover .r2 { animation-delay: 950ms; }
.word:hover .r3 { animation-delay: 1400ms; }
@keyframes row-type { 0% { transform: scaleX(0); opacity: 1; } 28%, 88% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes row-check {
  0%, 30% { fill: var(--rule); transform: scale(0.7); }
  38% { fill: var(--lime); transform: scale(1.35); }
  46%, 88% { fill: var(--lime); transform: scale(1); opacity: 1; }
  100% { fill: var(--lime); opacity: 0; }
}
@media (hover: none) { .pop { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .more, .more::after, .more .arrow, .statement .w { transition: none; }
  .pop { transition: opacity 200ms linear; transform: none; }
  .word:hover .w { transform: none; }
  .word:hover .pc-load, .word:hover .pt-hat, .word:hover .pf-paper, .word:hover .pf-row, .word:hover .pf-check { animation: none; }
  .word:hover .pf-paper { opacity: 1; transform: translateY(60%) rotate(-8deg); }
  .word:hover .pf-row { transform: none; }
  .word:hover .pf-check { fill: var(--lime); }
}

/* A phone: the demo request follows the text and the crane fills the rest of the screen. The
   art's top quarter is empty sky, so it may start under the button. */
@media (max-width: 600px) {
  .hero.cover { justify-content: flex-start; gap: 28px; }
  .hero.cover .statement { font-size: clamp(48px, 14.5vw, 72px); }
  .hero.cover .lede { font-size: 19px; line-height: 1.3; }
  .hero.cover .lede .line { display: inline; }
  .cover-art { width: min(150vw, calc((100svh - 400px) * 1.6)); }
}

/* ---------- The home page below the cover ---------- */

/* The staging construction page's sections (DESIGN.md §7a): a 96px rhythm in the centred
   column, 71px headings at weight 500, 22/33 reading text, hairlines in --rule, 16px cards. */
/* Each section is one full screen under the top bar, its content centred; site.js ramps the
   scroll from one to the next. A section taller than the screen simply grows. */
.band { position: relative; z-index: 1; margin: 0; padding: clamp(58px, 7vw, 96px) var(--gutter); min-height: calc(100svh - var(--bar, 80px)); align-content: center; }
.band p { margin: 0; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.5; }
.quiet { color: var(--ink-quiet); }
.section-title {
  margin: 0;
  font: 500 clamp(40px, 4.95vw, 71px) / 1.2 var(--font-reading);
  letter-spacing: -0.053em; text-wrap: balance;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: start; }
.split.faq-split { grid-template-columns: 5fr 7fr; }

.intro { max-width: 44rem; }
.intro .quiet { margin-top: 24px; }
.card { border: 1px solid var(--rule); border-radius: var(--radius-card); padding: clamp(24px, 2.6vw, 36px); }

.faq details + details { border-top: 2px solid var(--rule-strong); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font: 600 clamp(17px, 1.4vw, 20px) / 1.4 var(--font-ui); }
.faq summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 220ms var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover h3 { color: var(--lime); }
.faq details p { padding: 0 0 24px; max-width: 34em; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.65; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

.request .intro .quiet { max-width: 17em; color: var(--ink); }   /* white: it reads over the mark */
/* The big mark, in the field's own dots (mark-field.webp, cut from fleet.js at rest), stands
   behind "Request a demo." as a backdrop: most of the section tall, dimmed so the heading and
   the lede read over it. */
.request .intro, .request .form-card { position: relative; z-index: 1; }
.mark-field {
  position: absolute; z-index: 0; pointer-events: none;
  left: -6vw; top: 50%; transform: translateY(-46%);   /* its left third runs off the page */
  height: min(98%, 840px); width: auto; opacity: 0.55;
}
@media (max-width: 860px) { .mark-field { left: auto; right: -12vw; top: 0; transform: none; height: 420px; opacity: 0.18; } }
.form-card { border: 2px solid var(--rule-strong); }
.form-card .contact-form { width: 100%; margin-top: 0; }
.form-card .contact-form label { font-size: 14px; color: var(--ink-quiet); }
.form-card .form-hint { margin-top: -12px; font-size: 14px; }
.form-card .form-actions { margin-top: 8px; }
.form-card .form-done { margin-top: 0; }

@media (max-width: 860px) {
  .split, .split.faq-split { grid-template-columns: 1fr; }
}

/* ---------- Links ---------- */

.link, .foot-links a, .reading a {
  color: inherit; text-decoration: none;
}
.link {
  position: relative; display: inline-block;
  font: 500 15px/1 var(--font-ui); color: var(--ink);
  padding: 6px 0;
}
.link::after, .foot-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--lime); transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease);
}
.link:hover::after, .link:focus-visible::after,
.foot-links a:hover::after, .foot-links a:focus-visible::after { transform: scaleX(1); }
.link.live { color: var(--lime); }
.links { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 28px 0 0; }

.reading a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.reading a:hover { text-decoration-color: var(--lime); }

/* ---------- Type ---------- */

.statement {
  margin: 0;
  font: 500 clamp(48px, 7.4vw, 124px) / 0.95 var(--font-reading);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.statement .line { display: block; text-wrap: balance; }
h2.statement { font-size: clamp(44px, 6.4vw, 112px); }
.close .statement { font-size: clamp(40px, 4.8vw, 84px); }
.headline {
  margin: 0;
  font: 500 clamp(36px, 4.6vw, 72px) / 1 var(--font-reading);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede {
  margin: 28px 0 0; max-width: var(--measure);
  font-size: clamp(19px, 1.35vw, 22px); line-height: 1.5;
}
.reading { max-width: var(--measure); }
.reading p { margin: 0 0 1.4em; }
.reading p:last-child { margin-bottom: 0; }

/* ---------- Layout ---------- */

main { position: relative; z-index: 1; }
.screen {
  position: relative;
  padding-left: calc(var(--rail) + var(--gutter));
  padding-right: var(--gutter);
}

/* The homepage is ten snapped screens, each bottom-left: the hero, the two
   data-to-stack line, the fleet, one per build step, the futures, the close. */
html.snap { scroll-snap-type: y mandatory; }
html.snap .screen { scroll-snap-align: start; scroll-snap-stop: always; padding-bottom: clamp(56px, 10vh, 120px); }
html.snap .foot { scroll-snap-align: end; }

.screen { min-height: 100dvh; display: flex; align-items: flex-end; }
.screen > .pitch { max-width: min(1180px, 100%); }
.hero { padding-bottom: clamp(56px, 10vh, 120px); }
/* The hero's heading keeps to the text column, clear of the mark. While the viewport is wider
   than tall, fleet.js (state 0) puts the mark's left edge at max(64.8vw, 100vw - 59.5vh); the
   heading stops 48px short of it and its size follows the room, two lines of about 8em. */
.hero .statement {
  --hero-room: calc(max(64.8vw, 100vw - 59.5vh) - var(--rail) - var(--gutter) - 48px);
  max-width: var(--hero-room);
  font-size: clamp(40px, min(7.4vw, var(--hero-room) / 8.2), 124px);
}

/* Company data to an autonomous stack: the statement under the ring the streams pass through. */
.flow-line { font-size: clamp(48px, 7vw, 120px); max-width: 1180px; }
.flow-line .line + .line { margin-top: 0.06em; }
.flow-line .q { font-weight: 400; color: var(--ink-quiet); }

/* The fleet screen: one line over the cursors at work. The nouns stand upright at
   statement size; the connectors are small italics in quiet white on the same baseline. */
.fleet-line { max-width: 1180px; }
.fleet-line em { font-style: normal; font-weight: 500; color: var(--ink); }
.fleet-line .q { font-size: 0.55em; font-weight: 400; color: var(--ink-quiet); letter-spacing: -0.01em; }

/* The build: the first step carries the sandbox statement and lede above it. */
.step .statement { margin-bottom: 0; }
.step .lede { margin-top: 20px; }
.step .lede + .headline { margin-top: clamp(32px, 5vh, 56px); }
.step .reading { margin-top: 28px; }
.step-words {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 36px 0 0; font: 500 15px/1 var(--font-ui);
}
.step-words span { color: var(--ink-quiet); }
.step-words span.done { color: var(--ink); }
.step-words span.now { color: var(--lime); }

/* The futures: five ruled rows, each a link to its story. */
.future h2.statement { font-size: clamp(40px, 5vw, 84px); margin-bottom: clamp(24px, 4vh, 48px); }
.future-list { list-style: none; margin: 0; padding: 0; max-width: 920px; }
.future-list li { border-top: 1px solid var(--rule); }
.future-list li:last-child { border-bottom: 1px solid var(--rule); }
.future-list a {
  display: block;
  padding: clamp(12px, 2vh, 20px) 0; color: inherit; text-decoration: none;
}
.future-list .headline { font-size: clamp(22px, 2vw, 32px); line-height: 1.1; transition: color 300ms var(--ease); }
.future-list p { margin: 8px 0 0; max-width: 66ch; color: var(--ink-quiet); font-size: clamp(16px, 1.1vw, 17px); line-height: 1.45; }
.future-list a:hover .headline, .future-list a:focus-visible .headline { color: var(--lime); }
.future-list a:focus-visible { outline-offset: 8px; }

/* Screens whose text may stand taller than a short viewport grow instead of clipping. */
@media (max-height: 820px) {
  html.snap .future { height: auto; min-height: 100dvh; padding-top: clamp(40px, 6vh, 64px); }
}

.close {
  align-items: center;
  border-top: 1px solid var(--rule);
}
.close .pitch .links { margin-top: 36px; }

/* ---------- Footer ---------- */

.foot {
  position: relative; z-index: 1;
  margin: 0 var(--gutter); padding: 48px 0;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 32px;
  font-family: var(--font-ui);
}
.foot-brand .wordmark { color: var(--ink); text-decoration: none; font-size: 24px; }
.foot-brand p { margin: 12px 0 0; font: 400 14px/20px var(--font-ui); color: var(--ink-quiet); }
.foot-links { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.foot-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { position: relative; display: inline-block; padding: 4px 0; font: 500 15px/1 var(--font-ui); color: var(--ink-quiet); transition: color 220ms var(--ease); }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--ink); }
.foot-meta { margin: 0; font: 400 14px/20px var(--font-ui); color: var(--ink-quiet); }
@media (max-width: 600px) {
  .foot { flex-direction: column; align-items: flex-start; }
  .foot-links { align-items: flex-start; }
}

/* ---------- Reveal ---------- */

/* Text enters on a speed ramp: a fast start, a long deceleration, 80ms later per
   item (--i, set by site.js). Leaving is instant, so a screen that snaps back in
   ramps again. `.reveal` is only ever added by JavaScript. */
.reveal { opacity: 0; transform: translateY(32px); transition: none; }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 720ms cubic-bezier(0.05, 0.85, 0.1, 1), transform 720ms cubic-bezier(0.05, 0.85, 0.1, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .rail-nav a, .rail-nav a::before, .link::after, .foot-links a::after, .future-list .headline { transition: none; }
}

/* ---------- Narrow ---------- */

@media (max-width: 960px) {
  .screen { padding-left: var(--gutter); }
  .statement { font-size: clamp(44px, 12vw, 96px); }
  h2.statement { font-size: clamp(40px, 10vw, 84px); }
  /* No rail: the text column starts at the gutter. */
  .hero .statement { --hero-room: calc(max(64.8vw, 100vw - 59.5vh) - var(--gutter) - 48px); }
}

/* Taller than wide, fleet.js draws the mark above the text with its lime tail reaching down the
   right side: the heading takes the column's width but stays at two lines, so it starts below
   the mark and its first line ends short of the tail. */
@media (max-aspect-ratio: 1049/1000) {
  .hero .statement { max-width: none; font-size: clamp(36px, min(7.4vw, (100vw - var(--rail) - 2 * var(--gutter)) / 8.2), 124px); }
}
@media (max-aspect-ratio: 1049/1000) and (max-width: 960px) {
  .hero .statement { font-size: clamp(36px, min(12vw, (100vw - 2 * var(--gutter)) / 8.2), 96px); }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  :root { --bar: 64px; }
  .topbar-in { height: var(--bar); }
  .wordmark { font-size: 19px; }
  .demo-sm { padding: 6px 18px; min-height: 40px; font-size: 15px; }
  .links { flex-direction: column; gap: 4px; }
}

/* ---------- Pages ---------- */

/* The document pages (/memo, /contact) and the story screens (/future):
   same tokens, hairline rules only. */

.doc, .story, .common, .contact-foot {
  position: relative;
  padding-left: calc(var(--rail) + var(--gutter));
  padding-right: var(--gutter);
}

.doc {
  padding-bottom: var(--section);
}
/* The document header is a hero screen: statement bottom-left over the mark,
   so the field never runs under the title. */
.doc-head {
  min-height: 100dvh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(56px, 10vh, 120px);
}
@media (min-width: 961px) {
  .doc-head .statement { max-width: 58vw; }
}
.doc .caption {
  margin: 26px 0 0; max-width: var(--measure);
  font: italic 400 15px/1.5 var(--font-reading);
  color: var(--ink-quiet);
}
.doc .doc-section {
  margin-top: var(--block);
  padding-top: var(--block);
  border-top: 1px solid var(--rule);
}
.doc .doc-section h2.headline {
  position: relative;
  font-size: clamp(30px, 3.4vw, 52px);
  margin-bottom: 0.6em;
}
.doc .doc-section h2.headline::before {
  content: ""; position: absolute; left: -36px; top: 0.32em;
  width: 8px; height: 8px; background: var(--violet);
}
.doc .doc-section h3 {
  margin: 1.6em 0 0.6em;
  font: 400 clamp(22px, 1.6vw, 26px)/1.25 var(--font-reading);
}
.doc .doc-section .reading { margin-top: 1em; }
.doc .links.doc-end { margin-top: var(--block); padding-top: var(--block); border-top: 1px solid var(--rule); }

/* /future: one story per screen, statement-sized headline, vertically centred. */
.story {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--section); padding-bottom: var(--section);
  border-top: 1px solid var(--rule);
}
.story .headline { margin-bottom: 0.5em; }

/* /future closing list and the memo's closing links. */
.common { padding-top: var(--section); padding-bottom: var(--section); border-top: 1px solid var(--rule); }
.common h2.headline { font-size: clamp(30px, 3.4vw, 52px); margin-bottom: var(--block); }
.common ul { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.common li { padding: 1.1em 0; border-top: 1px solid var(--rule); }
.common li:last-child { border-bottom: 1px solid var(--rule); }
.common .links { margin-top: 36px; }

.contact-foot { border-top: 1px solid var(--rule); padding-top: 22px; padding-bottom: 22px; }

button.link {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: 500 15px/1 var(--font-ui); color: var(--ink);
}

@media (max-width: 960px) {
  .doc, .story, .common, .contact-foot { padding-left: var(--gutter); }
  .doc-head { padding-top: 64px; }
  .doc .doc-section h2.headline::before { position: static; display: inline-block; margin-right: 14px; }
}

/* ---------- The contact form (/contact/) ---------- */

/* Part II's form archetype: labelled 48px inputs on the ground, a 4px radius, lime focus, the
   submit a lime link. Borders are brighter than a hairline so the fields stay visible (WCAG
   1.4.11, 3:1 against the ground). One aria-live line carries every message: lime for an
   error, white for news. */
/* The contact intro keeps to the form's width, clear of the mark on wide screens. */
.contact .lede { max-width: 560px; }
/* The contact heading keeps clear of the mark on wide screens. */
@media (min-width: 961px) { .contact .doc-head .statement { font-size: clamp(44px, 5.4vw, 96px); } }

.contact-form { width: min(560px, 100%); margin-top: clamp(28px, 4vh, 44px); font-family: var(--font-ui); display: grid; }
.contact-form[hidden] { display: none; }
.contact-form label { display: block; margin: 0 0 10px; font: 500 15px/1.2 var(--font-ui); color: var(--ink); }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin: 0 0 22px; padding: 0 14px;
  background: var(--ground); color: var(--ink);
  border: 1px solid var(--lime); border-radius: var(--radius-field);
  font: 400 17px/1.4 var(--font-ui);
}
.contact-form input { height: 48px; }
.contact-form textarea { min-height: 168px; padding: 12px 14px; resize: vertical; }
.contact-form input:hover, .contact-form textarea:hover { border-color: #e1ef8f; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-color: var(--ink); }
.contact-form [aria-invalid="true"] { border-color: var(--lime); }
.contact-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; margin-top: 4px; }
.contact-form button.link { position: relative; color: var(--lime); }
.contact-form button.link:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.contact-form button.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease); }
.contact-form button.link:hover::after, .contact-form button.link:focus-visible::after { transform: scaleX(1); }
.contact-form button:disabled { opacity: 0.6; cursor: progress; }
.form-message { margin: 0 0 18px; font: 400 16px/1.4 var(--font-ui); color: var(--ink); }
.form-message:empty { margin: 0; }
.form-message[data-tone="error"] { color: var(--lime); }
.form-message[data-tone="error"]::before { content: "! "; font-weight: 600; }
.form-hint { margin: -14px 0 22px; font: 400 14px/1.4 var(--font-ui); color: var(--ink-quiet); }
/* The contact page's head holds the whole form, so it starts below the top instead of being
   pinned to the bottom of one screen. */
.contact .doc-head { min-height: auto; align-items: flex-start; padding-top: clamp(96px, 16vh, 168px); }
.form-done { margin-top: clamp(28px, 4vh, 44px); }
.form-done:focus { outline: none; }
.form-done .lede { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .contact-form button.link::after { transition: none; } }

/* In-page targets land below the sticky bar. */
section[id] { scroll-margin-top: var(--bar, 80px); }
