/* amp.ire — site styles
   One visual language for every page: an open, dark (or light) space, thin lines,
   large light type, small technical labels, and the three colours of the Recast
   logo as the only accent. No cards, no boxes around text.
   Colours follow the plugin (Source/UI/Theme.h and the logo). Type: Jost, self-hosted. */

@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("assets/fonts/jost-400.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url("assets/fonts/jost-500.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 700; font-display: swap; src: url("assets/fonts/jost-700.woff2") format("woff2"); }

:root[data-theme="dark"]  { --bg: #07080a; --ink: #f2f4f7; --dim: #8b929b; --line: rgba(255,255,255,.14); --soft: rgba(255,255,255,.05); --hi: #43d5e8;
  --grad: linear-gradient(90deg, #b517ff, #3983ff 55%, #43d5e8); --ok: #84dcc6; --bad: #ff8a80; }
:root[data-theme="light"] { --bg: #edeff2; --ink: #15171a; --dim: #5f6469; --line: rgba(0,0,0,.16); --soft: rgba(0,0,0,.045); --hi: #0f93a8;
  --grad: linear-gradient(90deg, #9412d1, #2f6bd1 55%, #0f93a8); --ok: #1e9a62; --bad: #c62828; }
:root { --display: "Jost", -apple-system, "Helvetica Neue", Arial, sans-serif; --pad: 24px; color-scheme: dark light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .4s, color .4s; }
a { color: inherit; text-decoration: none; }
p a, li a, td a, .link { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: text-decoration-color .2s; }
p a:hover, li a:hover, td a:hover, .link:hover { text-decoration-color: var(--hi); }
:focus-visible { outline: 1px solid var(--hi); outline-offset: 4px; }
img { max-width: 100%; display: block; }

.mono { font: 500 10.5px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.dim { color: var(--dim); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- The frame that stays on every page ---------- */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; padding: 20px var(--pad); display: grid; grid-template: auto 1fr auto / 1fr auto; }
.hud > * { pointer-events: auto; }
.hud::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.hud::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 76px; background: linear-gradient(transparent, var(--bg) 70%); pointer-events: none; z-index: -1; }
.brand { font: 700 17px/1 var(--display); letter-spacing: .02em; position: relative; }
.nav { display: flex; gap: 22px; align-items: center; justify-self: end; position: relative; }
.nav a { opacity: .62; transition: opacity .2s; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] { border-bottom: 1px solid var(--hi); padding-bottom: 3px; }
.nav a[data-hint]::after { content: attr(data-hint); position: absolute; top: calc(100% + 12px); right: 0; white-space: nowrap; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--dim); opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; pointer-events: none; }
.nav a[data-hint]:hover::after, .nav a[data-hint]:focus-visible::after { opacity: 1; transform: none; }
.rail { grid-row: 3; align-self: end; display: flex; gap: 6px; align-items: center; }
.rail span { margin-right: 10px; min-width: 70px; }
.rail i { display: block; width: 34px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.rail i.long { width: 150px; }
.rail i::after { content: ""; position: absolute; inset: 0; background: var(--grad); transform: scaleX(var(--f, 0)); transform-origin: left; }
.tools { grid-row: 3; grid-column: 2; align-self: end; justify-self: end; display: flex; gap: 10px; align-items: center; }
.tools button { all: unset; cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); }
.tools button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 820px) { .nav { gap: 14px; } .nav a { font-size: 9.5px; letter-spacing: .08em; } .rail i { width: 18px; } .rail i.long { width: 70px; } }
@media (max-width: 520px) { .brand { display: none; } .nav { justify-self: start; } }

/* ---------- Page ---------- */
main { display: block; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.head { padding: 22vh 0 9vh; }
.head .mono { display: inline-block; margin-bottom: 18px; }
h1 { font: 400 clamp(46px, 8.6vw, 124px)/.96 var(--display); letter-spacing: -.035em; margin: 0; text-wrap: balance; }
h2 { font: 400 clamp(28px, 3.8vw, 52px)/1.04 var(--display); letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
h3 { font: 400 clamp(21px, 2.1vw, 28px)/1.12 var(--display); letter-spacing: -.01em; margin: 0 0 8px; }
.lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--dim); max-width: 56ch; margin: 26px 0 0; }
p { margin: 0 0 14px; max-width: 64ch; }

.sec { padding: 11vh 0; border-top: 1px solid var(--line); }
.sec > .mono, .sec .label { display: inline-block; margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; } .c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; }
@media (max-width: 900px) { .cols { display: block; } .cols > * + * { margin-top: 28px; } }

.btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border: 1px solid var(--line); border-radius: 99px; font: 500 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; transition: border-color .2s, background .2s, color .2s; }
.btn:hover { border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Facts: label left, value right, hairlines ---------- */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 13px 20px 13px 0; border-top: 1px solid var(--line); font-weight: 400; }
.facts th { width: 26%; font: 500 10.5px/1.9 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 1px solid var(--line); }
.facts thead th { color: var(--ink); border-top: 0; }
@media (max-width: 640px) { .facts th { width: 34%; } }

/* ---------- Read-outs ---------- */
.nums { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.nums > div { padding: 22px 22px 26px 0; border-right: 1px solid var(--line); }
.nums > div + div { padding-left: 22px; } .nums > div:last-child { border-right: 0; }
.nums b { display: block; font: 400 clamp(46px, 8vw, 118px)/.95 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 10px 0 12px; }
.nums p { margin: 0; color: var(--dim); max-width: 30ch; }
@media (max-width: 760px) { .nums { grid-template-columns: 1fr; } .nums > div { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0 !important; } }

/* ---------- Tables of measurements ---------- */
.scroll-x { overflow-x: auto; }
.data { width: 100%; min-width: 640px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data th, .data td { padding: 12px 22px 12px 0; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; font-weight: 400; }
.data th:first-child, .data td:first-child { text-align: left; white-space: normal; }
.data thead th { font: 500 10.5px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); border-top: 0; vertical-align: bottom; }
.data tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.data tr.sum > * { border-top-color: var(--ink); }
.data .own { color: var(--ink); } .data td { color: var(--dim); } .data td.own, .data tbody th { color: var(--ink); }
.data sup, .notes sup { color: var(--hi); font-size: .7em; }
.notes { color: var(--dim); font-size: 15px; padding-left: 1.2em; max-width: 86ch; }
.notes li { margin-bottom: 8px; }
.small { color: var(--dim); font-size: 15px; max-width: 86ch; }

/* ---------- Pictures of the plugin follow the theme ---------- */
.shot { margin: 0; }
.shot img { width: 100%; height: auto; border-radius: 8px; outline: 1px solid var(--line); }
:root[data-theme="dark"] .only-light, :root[data-theme="light"] .only-dark { display: none; }
.shot figcaption { margin-top: 10px; color: var(--dim); font-size: 14px; }

/* ---------- Steps: number, text, picture ---------- */
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding: 9vh 0; border-top: 1px solid var(--line); }
.step .n { font: 400 clamp(56px, 7vw, 104px)/.9 var(--display); letter-spacing: -.04em; display: block; margin-bottom: 14px; }
.step ul { margin: 14px 0 0; padding: 0; list-style: none; color: var(--dim); }
.step li { padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .step { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- The window, taken apart (recast page and home) ---------- */
.apart { position: relative; height: 260vh; }
.apart .pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: center; gap: 20px; padding: 80px var(--pad); overflow: hidden; max-width: 1500px; margin: 0 auto; }
.apart ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-width: 420px; }
.apart li { padding: 12px 0 12px 16px; border-left: 1px solid var(--line); color: var(--dim); transition: color .3s, border-color .3s; }
.apart li b { display: block; font: 500 10.5px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }
.apart li.on { color: var(--ink); border-left-color: var(--hi); }
.space { perspective: 1800px; display: grid; place-items: center; height: 100%; }
.device { position: relative; width: min(100%, 980px); aspect-ratio: 1600 / 1012; transform-style: preserve-3d; transform: rotateX(calc(var(--e) * 46deg)) rotateZ(calc(var(--e) * -22deg)) scale(calc(1 - var(--e) * .2)); }
.layer { position: absolute; left: 0; width: 100%; background-repeat: no-repeat; background-size: 100% auto; border-radius: 6px; outline: 1px solid var(--line);
  transform: translateZ(calc(var(--e) * var(--z) * 1px)); box-shadow: 0 calc(var(--e) * 30px) calc(var(--e) * 60px) rgba(0,0,0,.35); transition: filter .3s, outline-color .3s; }
:root[data-theme="dark"]  .layer { background-image: url("assets/shots/recast-window-dark.png"); }
:root[data-theme="light"] .layer { background-image: url("assets/shots/recast-window-light.png"); }
.layer.dimmed { filter: brightness(.62) saturate(.7); }
.layer.on { outline-color: var(--hi); }
@media (max-width: 860px) { .apart .pin { grid-template-columns: 1fr; align-content: center; } .space { height: 46vh; } }

/* ---------- Home: the field ---------- */
.run { position: relative; height: 100vh; height: 100svh; }
#rail i { height: 16px; background: linear-gradient(var(--line), var(--line)) center / 100% 2px no-repeat; cursor: pointer; }
#rail i::after { top: 7px; bottom: 7px; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cap { position: absolute; left: var(--pad); right: var(--pad); bottom: 9vh; z-index: 2; max-width: 780px; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; pointer-events: none; }
.cap.on { opacity: 1; transform: none; }
.cap .mono { display: inline-block; margin-bottom: 10px; }
.cap h2 { font-size: clamp(24px, 3.3vw, 44px); line-height: 1.06; margin: 0; }
.cap p { margin: 10px 0 0; color: var(--dim); max-width: 60ch; font-size: 16px; }
.read { position: absolute; right: var(--pad); top: 96px; z-index: 2; text-align: right; display: grid; gap: 12px; }
.read b { display: block; font: 400 22px/1 var(--display); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--ink); margin-top: 4px; text-transform: none; }
@media (max-width: 900px) { .read { display: none; } }

/* ---------- Journey: a flight through the stations ---------- */
.flight .st { padding: 7vh 0; border-top: 1px solid var(--line); max-width: 760px; }       /* without script: a plain list */
.st .no { font: 400 clamp(64px, 9vw, 132px)/.86 var(--display); letter-spacing: -.045em; display: block; }
.st .when { display: block; margin: 12px 0 14px; color: var(--dim); }
.st p { color: var(--dim); }
.st .then { color: var(--ink); }
.flight.fly { position: relative; }
.flight.fly .sky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1000px; perspective-origin: 50% 46%; }
.flight.fly .lane { position: absolute; inset: 0; transform-style: preserve-3d; }
.flight.fly .st { position: absolute; left: 50%; top: 50%; width: min(84vw, 660px); margin: 0; padding: 0; border: 0; will-change: transform, opacity; }
.flight.fly .st h2 { font-size: clamp(26px, 3.2vw, 44px); }
.months { position: absolute; left: var(--pad); right: var(--pad); bottom: 64px; display: flex; justify-content: space-between; pointer-events: none; }
.months span { opacity: .4; transition: opacity .3s, color .3s; }
.months span.on { opacity: 1; color: var(--hi); }
.flight:not(.fly) .months { display: none; }
/* stations with a picture of the interface as it was then */
.st .pic { margin: 22px 0 0; }
.st .pic img { width: 100%; height: auto; border-radius: 8px; outline: 1px solid var(--line); }
.st .pic figcaption { margin-top: 8px; color: var(--dim); }
.flight.fly .st.has-pic { width: min(92vw, 1180px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.flight.fly .st.has-pic .pic { margin: 0; }
.flight.fly .st.has-pic .pic img { max-height: 62vh; width: auto; max-width: 100%; }
@media (max-width: 900px) { .flight.fly .st.has-pic { display: block; width: min(88vw, 560px); } .flight.fly .st.has-pic .pic { margin-top: 16px; } .flight.fly .st.has-pic .pic img { max-height: 30vh; } }

/* ---------- Lists that read like rules ---------- */
.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rules li { display: grid; grid-template-columns: 80px minmax(0, 5fr) minmax(0, 7fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; counter-increment: r; }
.rules li::before { content: "0" counter(r); font: 500 10.5px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .14em; color: var(--dim); }
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules h3 { margin: 0; } .rules p { margin: 0; color: var(--dim); }
@media (max-width: 760px) { .rules li { grid-template-columns: 40px 1fr; } .rules p { grid-column: 2; } }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 20px 40px 20px 0; list-style: none; position: relative; font: 400 clamp(19px, 1.9vw, 25px)/1.2 var(--display); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 2px; top: 16px; color: var(--dim); font-size: 26px; font-weight: 300; }
details[open] summary::after { content: "–"; }
details p { color: var(--dim); padding-bottom: 18px; }

/* ---------- Form ---------- */
.form { display: grid; gap: 30px; max-width: 720px; }
.field { display: grid; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font: 500 10.5px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 0; }
.field input[type="text"], .field input[type="email"], .field textarea { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 19px; padding: 8px 0 12px; border-radius: 0; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--hi); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts input { position: absolute; opacity: 0; pointer-events: none; }
.opts span { display: inline-block; cursor: pointer; padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; font: 500 10.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.opts input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opts input:focus-visible + span { outline: 1px solid var(--hi); outline-offset: 3px; }
/* rating as a level meter */
.level { display: inline-flex; flex-direction: row-reverse; gap: 5px; position: relative; vertical-align: middle; }
.level input { position: absolute; opacity: 0; pointer-events: none; }
.level label { width: 46px; height: 26px; background: var(--soft); border: 1px solid var(--line); cursor: pointer; display: block; transition: background .12s; }
.level label span { position: absolute; left: -9999px; }
.level input:checked ~ label, .level label:hover, .level label:hover ~ label { background: var(--hi); border-color: var(--hi); }
.level-out { margin-left: 14px; color: var(--dim); }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--dim); font-size: 15px; }
.check input { margin-top: 5px; accent-color: var(--hi); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.5em; color: var(--dim); }
.form-status.ok { color: var(--ok); } .form-status.err { color: var(--bad); }
.review { padding: 22px 0; border-top: 1px solid var(--line); }
.review .mono { color: var(--dim); display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.review i { display: inline-block; width: 14px; height: 7px; background: var(--line); margin-right: 3px; } .review i.on { background: var(--hi); }
.empty { color: var(--dim); padding: 22px 0; border-block: 1px solid var(--line); }

/* ---------- Foot ---------- */
.foot { padding: 9vh 0 90px; border-top: 1px solid var(--line); color: var(--dim); display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

@media (max-width: 640px) { #soundHint { display: none; } }

/* Home: the play button. The scene waits at the logo until it is pressed. */
.startcue { all: unset; position: absolute; left: 50%; top: 60%; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px 15px 22px; border-radius: 99px; cursor: pointer; white-space: nowrap; color: var(--bg); background: var(--ink);
  font: 500 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase;
  animation: cue 1.6s ease-out infinite; }
.startcue svg { width: 13px; height: 13px; flex: 0 0 auto; }
.startcue[hidden] { display: none; }
.startcue:hover { background: var(--hi); }
.startcue:focus-visible { outline: 2px solid var(--hi); outline-offset: 4px; }
@keyframes cue {                                     /* a ring that leaves the button, and a small breath */
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hi) 70%, transparent); transform: translateX(-50%) scale(1); }
  50%  { transform: translateX(-50%) scale(1.05); }
  100% { box-shadow: 0 0 0 20px transparent; transform: translateX(-50%) scale(1); }
}
