/* Base: reset, type steps, buttons, links, the logo, and what more than one screen draws
   with. Each screen's own rules (desktop, its phone block, its motion) are in sections/;
   the phone and motion rules more than one screen shares are in phone.css and motion.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  position: relative;
}
p, h1, h2, h3, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.blue-body :focus-visible { outline-color: var(--mist); }

.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--cream); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
/* The skip link's target takes focus (tabindex -1), so every reader moves on with it; it draws no ring of its own. */
main:focus { outline: none; }

main { display: block; }
section { position: relative; overflow-x: clip; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--m); position: relative; }

/* ---------------------------------------------------------------- type */
.d-l { font-size: var(--fs-l); line-height: 0.96; letter-spacing: -0.04em; font-weight: 800; color: var(--ink); }
.d-m { font-size: var(--fs-m); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; color: var(--ink); }
.statement { font-size: var(--fs-statement); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; color: var(--ink); }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--body); text-wrap: pretty; }
.fine { font-size: var(--fs-fine); line-height: 1.55; color: var(--muted); }
.label { font-size: var(--fs-label); line-height: 1.2; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.plum { color: var(--plum); }
/* Trailing punctuation in display type: tight tracking leaves a full stop's side
   bearings alone, so it floats about 0.12 em off its word. Pull it back to the
   letters' own spacing. */
.pt { margin-left: -0.08em; }
.mist { color: var(--mist); }

/* ---------------------------------------------------------------- actions: blue acts */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 30px; border-radius: var(--radius-button);
  background: var(--blue); color: var(--cream);
  font-size: 17px; font-weight: 700; letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--navy); }
/* Secondary (the nav's): so every screen has one solid blue button. */
.btn-2 { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-2:hover { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }
/* Not out yet: a status where a download or a buy will stand. Never blue, never pressable. */
.btn-soon, .btn-soon:hover { background: var(--mist); color: var(--navy); cursor: default; user-select: none; }
.btn-2.btn-soon, .btn-2.btn-soon:hover { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }

.link { color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.link:hover { color: var(--navy); }

/* A screen's quiet last line that leads to a page of its own ("More about Dictation"): the
   body type in ink, and a small drawn arrow (the kit's line: round caps and joins) that
   steps on as you point at it. Never the big underlined link, never a button. */
.more-link { display: inline-flex; align-items: center; gap: 0.5em; min-height: 44px; font-size: var(--fs-body); line-height: 1.5; font-weight: 600; color: var(--ink); text-decoration: none; }
.more-link::after {
  content: ""; flex: none; width: 1.05em; height: 0.75em; background: currentColor;
  -webkit-mask: var(--more-arrow) center / contain no-repeat; mask: var(--more-arrow) center / contain no-repeat;
  transition: translate 0.15s ease;
  --more-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 15'%3E%3Cpath d='M1.5 7.5h17M12.5 1.5l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.more-link:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.more-link:hover::after { translate: 3px 0; }

/* ---------------------------------------------------------------- the logo (nav and footer) */
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo-mark { width: 32px; height: 32px; }

/* ---------------------------------------------------------------- the screens' shared parts
   Desktop (1024 and up). Scenes are drawn at 1440 and scale by --u; type steps are fluid
   between 1024 and 1440 (tokens.css).
   Wider than 1440: what stands on the page (text, figures, scenes) keeps to the centred
   1440 box, like .wrap, and the grounds under it (the hero's ground line, the rims, the
   closing dome, the footer) run full-bleed, so every arc still meets both window edges.
   `max(0px, (100% - 1440px) / 2)` is that box's side margin in a full-width section. */

/* Character outlines: the kit's 3 px Ink, round caps and joins, at any scale. */
.k { stroke: var(--ink); stroke-width: 3px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.k2 { stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.k25 { stroke-width: 2.5px; }

.scene { display: block; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); overflow: visible; }

/* The headline's full stop: 0.2 em, orange, the dot at rest (the hero's and the close's). */
/* Its full stop for screen readers: in its word's own run of text, so the name reads
   "brilliant." (a positioned .vh is a run of its own: "brilliant ."); the dot draws it. */
.sr-stop { font-size: 0; }
.stop { position: relative; display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.05em; border-radius: 50%; background: var(--orange); vertical-align: baseline; }

.br-d { display: inline; }
.beat-h, .d-l, .d-m { text-wrap: balance; }
.nw { white-space: nowrap; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.15em; background: var(--blue); }

/* ---------------------------------------------------------------- rims: a new ground rises on a giant circle */
.rim { position: relative; height: calc(112 * var(--u)); overflow: hidden; background: var(--from); }
/* Up to 1440 a circle of r 2370 whose arc meets both window edges at the rim's foot.
   Wider, the circle widens with the window (an ellipse), so the arc still meets both edges. */
.rim::before {
  content: ""; position: absolute; left: 50%; top: 0;
  width: max(calc(4740 * var(--u)), calc(100% * 3.291667)); height: calc(4740 * var(--u));
  margin-left: min(calc(-2370 * var(--u)), calc(-100% * 1.645833));
  border-radius: 50%; background: var(--to);
}
/* A leaning rim (src/shared.mjs rim(..., { crest, h })): the circle's top stands --dx design px from the centre; its
   radius --R meets the farther window edge at the strip's foot. Wider than 1440 it widens into an ellipse that still does.
   Its height is --rh, not --h: a .scene's svg uses --h. */
.rim.lean { height: calc(var(--rh) * var(--u)); }
.rim.lean::before {
  left: calc(50% + var(--dx) * var(--u)); margin-left: 0; translate: -50% 0;
  width: calc(var(--R) * (100% + 2 * var(--adx) * var(--u)) / var(--far)); height: calc(2 * var(--R) * var(--u));
}
