/* axi0.tech: one page, one form, one moving part. No framework, no third-party requests.
   Edit this file (src/site.css); build.mjs publishes it as site/assets/site.<hash>.css. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arial tuned to Instrument Sans' metrics (measured in Chrome: width x1.0045, ascent 97, descent 25 per 100px),
   so body text does not shift when the web font swaps in. The condensed headline still reflows slightly. */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 100.45%;
  ascent-override: 96.57%;
  descent-override: 24.89%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark;
  --bg: oklch(0.17 0.006 258);
  --bg-raise: oklch(0.21 0.007 258);
  --ink: oklch(0.955 0.005 258);
  --muted: oklch(0.74 0.012 258);
  --line: oklch(0.955 0.005 258 / 0.62);
  --line-dim: oklch(0.955 0.005 258 / 0.17);
  --line-faint: oklch(0.955 0.005 258 / 0.1);
  --accent: oklch(0.76 0.155 55);
  --danger: oklch(0.74 0.16 28);
  --sans: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --t: 1000ms;
  --ease: cubic-bezier(0.65, 0, 0.25, 1);
  --pad: clamp(1.25rem, 0.6rem + 3vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---- page grid: text first on phones; text left, drawing right from 60rem ----------------------------------- */

.page {
  min-height: 100svh;
  max-width: 90rem;
  margin-inline: auto;
  padding: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "title" "lede" "form" "concept" "foot";
  row-gap: clamp(1.25rem, 0.8rem + 2vw, 2.25rem);
}

@media (min-width: 60rem) {
  .page { /* the spacer rows take the slack, so the text block and the drawing sit on the same center line */
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto minmax(1.5rem, 1fr) auto auto auto minmax(1.5rem, 1fr) auto;
    grid-template-areas:
      "head  head"
      ".     concept"
      "title concept"
      "lede  concept"
      "form  concept"
      ".     concept"
      "foot  foot";
    column-gap: clamp(2.5rem, 5vw, 6rem);
    row-gap: 0;
  }
  .page .lede { margin-top: 1.5rem; }
  .page .signup-area { margin-top: 2.25rem; }
}

.masthead { grid-area: head; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem; }
.wordmark { font-size: 1.5rem; font-weight: 600; line-height: 1; letter-spacing: -0.025em; color: var(--ink); text-decoration: none; }
a.wordmark:hover { color: var(--ink); }
/* The 0 carries the orange core: a dotted zero, so it never reads as an O, and the same dot as the drawing.
   It is a gradient on the digit's own box rather than a small positioned box, because Chrome snaps boxes to
   whole pixels and a 3.6px circle came out as a 4x3 pill at 1x. Center: 50% across (no tracking on the last
   glyph, so the box is exactly the digit's advance) and 49.5% down the content area, which puts it half the
   digit height above the baseline in Instrument Sans and in the Arial fallback (measured in Chrome). */
.zero {
  letter-spacing: 0;
  background: radial-gradient(circle at 50% 49.5%, var(--accent) calc(0.075em - 0.4px), transparent calc(0.075em + 0.4px));
}
.meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.title {
  grid-area: title;
  margin: 0;
  max-width: 11ch;
  font-weight: 500;
  font-stretch: 80%;
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede { grid-area: lede; margin: 0; max-width: 33rem; color: var(--muted); text-wrap: pretty; }

/* ---- forms (waitlist and removal share the look) ----------------------------------------------------------- */

.signup-area { grid-area: form; max-width: 34rem; }
.signup { margin: 0; }
.field-label {
  display: block; margin-bottom: 0.6rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.field {
  display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.3rem;
  border: 1px solid var(--line-dim); border-radius: 999px; background: var(--bg-raise);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within { border-color: var(--line); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 38%, transparent); }
.field:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.field input {
  flex: 1 1 12rem; min-width: 0; min-height: 48px; padding: 0 1rem;
  border: 0; background: transparent; color: var(--ink); font: inherit; outline: none;
}
.field input::placeholder { color: oklch(0.955 0.005 258 / 0.4); }
.field button {
  flex: 0 0 auto; min-height: 48px; padding: 0 1.35rem;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--bg);
  font: inherit; font-weight: 600; cursor: pointer; transition: background-color 0.2s, translate 0.1s;
}
.field button:hover { background: var(--accent); }
.field button:active { translate: 0 1px; }
.field button:disabled { opacity: 0.6; cursor: progress; }
@media (max-width: 26rem) {
  .field { border-radius: 1.5rem; }
  .field button { flex-basis: 100%; }
}

.fine { margin: 0.8rem 0 0; font-size: 0.75rem; line-height: 1.6; color: var(--muted); }
.status { margin: 0.5rem 0 0; min-height: 1.5em; font-size: 0.875rem; }
.status[data-kind="error"] { color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* honeypot, kept off screen */

/* Result notices. Without JS the service answers 303 to /#thanks, /#form-error, /privacy#removed or
   /privacy#remove-error, and :target shows the matching one; with JS the script adds .is-shown instead. */
.notice {
  display: none; margin: 0; padding: 1rem 1.25rem; scroll-margin-top: 45svh;
  border: 1px solid var(--line-dim); border-radius: 1rem; background: var(--bg-raise);
}
.notice:target, .notice.is-shown { display: block; }
.signup-area:has(.notice-ok:target) .signup { display: none; }
.notice-ok::before {
  content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.65em;
  border-radius: 50%; background: var(--accent); vertical-align: 0.08em;
}
.notice-err { margin-bottom: 1rem; border-color: color-mix(in oklch, var(--danger) 55%, transparent); color: var(--danger); }

/* ---- the drawing: one core, three states ------------------------------------------------------------------
   Everything is positioned from the center of a 3:2 stage in cqh units (1cqh = 1% of the stage height).
   Only .device changes size; the other parts move with transforms or fade, so nothing shifts the layout. */

.concept { grid-area: concept; display: grid; justify-items: center; align-content: center; gap: 1.25rem; min-width: 0; }

.stage { position: relative; width: min(100%, 52rem, 100svh); aspect-ratio: 3 / 2; container-type: size; }

.stage::after { /* crop marks */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  --m: var(--line-dim);
  background:
    linear-gradient(var(--m), var(--m)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 1px 14px no-repeat;
}

.axis { /* the line the device grows along, with a tick every 7.5cqh; one tick sits under the core */
  position: absolute; left: 0; right: 0; top: 50%; height: 2cqh; translate: 0 -50%;
  background:
    linear-gradient(var(--line-dim), var(--line-dim)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line-faint) 0 1px, transparent 1px 7.5cqh) 0 50% / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

/* The device works like a scroll: the folded slab is the middle. Unfolded pulls one side out (either side),
   Unrolled pulls both. --l and --r are the body's left and right edges, measured from the center of the stage. */
.stage { --l: -15cqh; --r: 15cqh; }

.device {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--r) - var(--l)); height: 64cqh;
  translate: calc(-50% + (var(--l) + var(--r)) / 2) -50%;
  border: 1.5px solid var(--line);
  border-radius: 4.5cqh;
  background:
    radial-gradient(140% 100% at 30% 0%, oklch(1 0 0 / 0.055), transparent 60%),
    var(--bg);
  box-shadow: 0 4cqh 10cqh -5cqh oklch(0 0 0 / 0.9);
  transition: width var(--t) var(--ease), translate var(--t) var(--ease);
}
.screen { position: absolute; inset: 1.6cqh; border: 1px solid var(--line-dim); border-radius: 2.9cqh; }

.core {
  position: absolute; left: 50%; top: 50%;
  width: 2.6cqh; height: 2.6cqh; translate: -50% -50%;
  border-radius: 50%; background: var(--accent);
}
.core::after { /* soft halo; opacity + scale only, so it stays on the compositor */
  content: ""; position: absolute; inset: -150%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklch, var(--accent) 45%, transparent), transparent);
  opacity: 0.45;
}
.core::before { /* a ring that runs out from the core once each time the state changes */
  content: ""; position: absolute; inset: -250%; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
}

/* The states. Pure CSS (:has on the checked radio), so the switcher works without JavaScript. Unfolded pulls the
   right side out; site.js alternates the side (data-side="left" on .stage) so the cycle shows either one. */
.concept:has(#s-unfolded:checked) .stage { --r: 53cqh; }
.concept:has(#s-unfolded:checked) .stage[data-side="left"] { --l: -53cqh; --r: 15cqh; }
.concept:has(#s-unrolled:checked) .stage { --l: -53cqh; --r: 53cqh; }

.states { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.states label {
  position: relative; display: inline-flex; align-items: center; gap: 0.55em;
  min-height: 44px; padding: 0 0.95rem;
  border: 1px solid var(--line-dim); border-radius: 999px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted);
  cursor: pointer; transition: border-color 0.2s;
  /* text and fill switch at once: the slow cycle moves the checked state every few seconds, and a half-way frame of a
     color transition read 3.13:1 (grey on grey) when Lighthouse sampled it */
}
.states input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.states .n { color: var(--accent); }
.states label:hover { color: var(--ink); border-color: var(--line); }
.states label:has(:checked) { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.states label:has(:checked) .n { color: color-mix(in oklch, var(--bg) 72%, var(--ink)); }
.states label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 26rem) { /* keep the three on one row at 360px */
  .states { gap: 0.3rem; }
  .states label { padding: 0 0.62rem; gap: 0.45em; letter-spacing: 0.01em; }
}

/* All three captions share one grid cell, so the box keeps the height of the longest and nothing below moves. */
.caption { display: grid; margin: 0; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.03em; color: var(--muted); text-align: center; }
.cap { grid-area: 1 / 1; visibility: hidden; }
.cap-folded { visibility: visible; }
.concept:has(#s-unfolded:checked, #s-unrolled:checked) .cap-folded { visibility: hidden; }
.concept:has(#s-unfolded:checked) .cap-unfolded,
.concept:has(#s-unrolled:checked) .cap-unrolled { visibility: visible; }

.foot {
  grid-area: foot; align-self: end;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--muted);
}
.foot a { display: inline-flex; align-items: center; min-height: 24px; }

@media (pointer: coarse) { /* 44px touch targets for the links that stand alone */
  .foot a { min-height: 44px; }
  a.wordmark { padding-block: 10px; margin-block: -10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .core::after { animation: breathe 3.6s ease-in-out infinite; }
  .concept:has(#s-folded:checked) .core::before { animation: ring-0 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .concept:has(#s-unfolded:checked) .core::before { animation: ring-1 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .concept:has(#s-unrolled:checked) .core::before { animation: ring-2 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  @keyframes breathe { 0%, 100% { opacity: 0.3; scale: 0.85; } 50% { opacity: 0.75; scale: 1.15; } }
  /* Three identical rings with different names: switching the name restarts the animation on every change. */
  @keyframes ring-0 { from { opacity: 0.9; scale: 0.2; } to { opacity: 0; scale: 1; } }
  @keyframes ring-1 { from { opacity: 0.9; scale: 0.2; } to { opacity: 0; scale: 1; } }
  @keyframes ring-2 { from { opacity: 0.9; scale: 0.2; } to { opacity: 0; scale: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .device { transition-duration: 1ms !important; }
}

/* ---- privacy notice and 404 ------------------------------------------------------------------------------- */

.doc { max-width: 46rem; margin-inline: auto; padding: var(--pad); }
.doc .masthead { margin-bottom: clamp(2.5rem, 8vw, 5rem); }
.doc h1 {
  margin: 0 0 1.25rem;
  font-weight: 500; font-stretch: 80%; font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.6rem);
  line-height: 1; letter-spacing: -0.03em; text-wrap: balance;
}
.doc h2 { margin: 2.25rem 0 0.5rem; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.005em; }
.doc p { margin: 0 0 1rem; color: var(--muted); text-wrap: pretty; }
.doc .lede { color: var(--ink); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .jump { font-size: 0.875rem; }
.doc .signup-area { margin-top: 1.25rem; }
/* .doc p would turn the notices and the status line grey and change their spacing */
.doc .notice { margin: 0; color: var(--ink); }
.doc .notice-err { margin-bottom: 1rem; color: var(--danger); }
.doc .status { margin: 0.5rem 0 0; }
.doc .version { margin-top: 3rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; }
.remove { margin-top: 3rem; padding-top: 0.25rem; border-top: 1px solid var(--line-dim); }

/* ---- Flux0S pages (fluxos.html, fluxos-licences.html) ---------------------------------------------------- */

.doc.fx { max-width: 52rem; }
.doc h3 { margin: 1.6rem 0 0.4rem; font-weight: 600; font-size: 1rem; }
.doc ul, .doc ol { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--muted); }
.doc li { margin: 0.4rem 0; text-wrap: pretty; }
.doc code { font-family: var(--mono); font-size: 0.85em; color: var(--ink); }
.doc pre {
  margin: 0 0 1rem; padding: 0.9rem 1rem; overflow-x: auto;
  border: 1px solid var(--line-dim); border-radius: 10px; background: var(--bg-raise);
  font-size: 0.8rem; line-height: 1.65;
}
.doc pre code { font-size: inherit; white-space: pre; }
.fx-editions { list-style: none; display: grid; gap: 0.75rem; padding: 0 !important; }
.fx-editions li { margin: 0; padding: 0.95rem 1.1rem; border: 1px solid var(--line-dim); border-radius: 12px; }
.fx-status {
  display: block; margin-top: 0.35rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.fx-wrap { overflow-x: auto; margin: 0 0 1rem; }
.fx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fx-table th, .fx-table td { text-align: left; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--line-dim); vertical-align: top; }
.fx-table th {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.fx-table td { color: var(--muted); }
.fx-table td a { color: var(--ink); display: inline-flex; align-items: center; min-height: 24px; }
.fx-hash { font-family: var(--mono); font-size: 0.72rem; word-break: break-all; }
.doc p code, .doc li code { overflow-wrap: anywhere; }
.fx-key {
  display: block; margin: 0 0 1rem; padding: 0.7rem 0.9rem; white-space: normal; word-break: break-all;
  border: 1px solid var(--line-dim); border-radius: 10px; background: var(--bg-raise); font-size: 0.75rem !important;
}
@media (pointer: coarse) { .fx-table td a, .doc .jump a { min-height: 44px; } }

/* Flux0S page: the opening. Flux0S Linux drawn as six glass layers, the computer at the bottom and the apps on top,
   each named from the design docs. A still exploded view by default, with reduced motion and in browsers without
   scroll-driven animations. Where they run, the stage stays pinned while the page scrolls through .fx-hero (260svh):
   the stack starts closed like one device, opens with every layer at its own speed, each label comes in beside its
   layer, and at the end the stack closes into the desktop as the labels leave, and goes back to the middle. Closed,
   it is one device showing only its top face (the desktop); the markings inside come up as the layers part. The
   drawing is aria-hidden; the labels are an ordered list, bottom up. Transforms and opacity only, and the opening's height is set before the first paint. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.975 0.005 85);
  --bg-raise: oklch(0.94 0.007 85);
  --ink: oklch(0.21 0.008 258);
  --muted: oklch(0.43 0.012 258);
  --line: oklch(0.21 0.008 258 / 0.62);
  --line-dim: oklch(0.21 0.008 258 / 0.2);
  --line-faint: oklch(0.21 0.008 258 / 0.07);
  --accent: oklch(0.52 0.15 48); /* 4.5:1 or more on --bg for the small status labels */
  --danger: oklch(0.5 0.17 28);
}
.fx-hero { overflow-x: clip; }
.fx-stage {
  display: grid;
  grid-template: auto minmax(0, 1fr) / minmax(0, 2fr) minmax(0, 3fr);
  --gx: clamp(1rem, 0.4rem + 3vw, 3.5rem);
  --home: calc(75cqw + var(--gx) / 2); /* from the drawing's column to the middle of the stage */
  --zoom: 2.15; /* the closed device, at the start and the end: about 70% of a phone's width */
  gap: clamp(0.75rem, 2svh, 1.5rem) var(--gx);
  height: clamp(32rem, 86svh, 46rem);
  max-width: 72rem;
  margin-inline: auto;
  padding: clamp(1rem, 0.5rem + 2.5vw, 2.5rem) var(--pad);
}
@media (min-width: 48rem) {
  .fx-stage { --home: calc(50cqw + var(--gx) / 2); --zoom: 1.3; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.fx-cap {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
}
.fx-cap strong { font-size: 1rem; font-weight: 600; color: var(--ink); }
.fx-hint { display: none; }
.fx-draw {
  position: relative;
  container-type: size;
  /* the glass in the dark: a lit edge, a soft shadow under each layer, a glow round the Key (light: as before) */
  --glass-edge: oklch(0.955 0.005 258 / 0.42);
  --glass-hi: oklch(0.985 0.004 258 / 0.55);
  --glass-sheen: oklch(0.955 0.005 258 / 0.18);
  --glass-shade: oklch(0 0 0 / 0.85);
  --glass-body: oklch(0.24 0.008 258 / 0.6); /* frosted: a layer partly hides the ones behind it */
  --key-glow: oklch(0.76 0.155 55 / 0.5);
}
html[data-theme="light"] .fx-draw {
  --glass-edge: var(--line-dim);
  --glass-hi: transparent;
  --glass-sheen: var(--line-faint);
  --glass-shade: transparent;
  --glass-body: var(--line-faint);
  --key-glow: transparent;
}
.fx-stack { position: absolute; inset: 0; }
.fx-l {
  --s: min(68cqw, 36cqh);
  --open: 16.6667cqh; /* one row of the list beside it */
  --shut: 0.3rem;
  position: absolute;
  inset: 0;
  width: var(--s);
  height: var(--s);
  margin: auto;
  transform: translateY(calc((2.5 - var(--i)) * var(--open)));
}
.fx-slab {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--glass-edge);
  border-radius: 14%;
  background: linear-gradient(135deg, var(--glass-sheen), transparent 60%), var(--glass-body);
  box-shadow: inset 1px 1px 0 var(--glass-hi), inset 0 0 0 1px var(--line-faint),
    calc(var(--s) * -0.08) calc(var(--s) * 0.08) calc(var(--s) * 0.14) calc(var(--s) * -0.02) var(--glass-shade);
  transform: rotateX(60deg) rotateZ(-45deg);
}
/* each layer's markings, on their own so that the closed device can hide them */
.fx-slab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--face);
}
/* the faces: a chip, the system's lines, the services, the desktop, the Key, the apps */
.fx-l:nth-child(1) {
  --i: 0;
  --face: linear-gradient(var(--line-dim) 0 0) center / 32% 32% no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1.5px, transparent 0 6%) center / 48% 8% no-repeat,
    repeating-linear-gradient(var(--line) 0 1.5px, transparent 0 6%) center / 8% 48% no-repeat;
}
.fx-l:nth-child(2) {
  --i: 1;
  --face: repeating-linear-gradient(transparent 0 9%, var(--line-dim) 0 calc(9% + 1.5px)) center / 60% 60% no-repeat;
}
.fx-l:nth-child(3) { --i: 2; --face: radial-gradient(circle, var(--line) 0 1.5px, transparent 2px) center / 14% 14%; }
.fx-l:nth-child(4) {
  --i: 3;
  --face: linear-gradient(var(--line) 0 0) 50% 86% / 70% 4% no-repeat,
    linear-gradient(var(--line-dim) 0 0) 24% 22% / 40% 32% no-repeat,
    linear-gradient(var(--line-dim) 0 0) 76% 48% / 34% 28% no-repeat;
}
.fx-l:nth-child(5) {
  --i: 4;
  --face: radial-gradient(circle, transparent 0 20%, var(--accent) 0 24%, transparent 0) center / 100% 100% no-repeat,
    radial-gradient(circle, transparent 12%, var(--key-glow) 22%, transparent 34%) center / 100% 100% no-repeat;
}
.fx-l:nth-child(6) {
  --i: 5;
  --face: radial-gradient(closest-side, var(--line) 0 46%, transparent 0) center / 18% 18% space content-box;
}
.fx-l:nth-child(6) .fx-slab::before { inset: 15%; border-radius: 0; }
/* the desktop on the top face: all that shows while the stack is closed, at the start and at the end */
.fx-l:nth-child(6) .fx-slab::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border: 1.5px solid var(--line);
  border-radius: inherit;
  background: radial-gradient(circle at 50% 44%, var(--accent) 0 4%, oklch(0.76 0.155 55 / 0.38) 0 7%, transparent 40%),
    linear-gradient(var(--line) 0 0) 50% 86% / 70% 4% no-repeat, var(--bg-raise);
  opacity: 0;
}
.fx-layers {
  display: flex;
  flex-direction: column-reverse;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fx-layers li {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  margin: 0;
  line-height: 1.3;
}
.fx-layers li::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 0.35rem);
  width: clamp(0.5rem, 2.4vw, 2.25rem);
  border-top: 1px solid var(--line-dim);
}
.fx-layers strong { font-size: clamp(0.875rem, 0.8rem + 0.35vw, 1.0625rem); font-weight: 600; color: var(--ink); }
.fx-layers span { font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.9375rem); color: var(--muted); text-wrap: pretty; }
.fx-l:nth-child(1), .fx-layers li:nth-child(1) { --end: 30%; }
.fx-l:nth-child(2), .fx-layers li:nth-child(2) { --end: 35%; }
.fx-l:nth-child(3), .fx-layers li:nth-child(3) { --end: 40%; }
.fx-l:nth-child(4), .fx-layers li:nth-child(4) { --end: 45%; }
.fx-l:nth-child(5), .fx-layers li:nth-child(5) { --end: 50%; }
.fx-l:nth-child(6), .fx-layers li:nth-child(6) { --end: 55%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fx-hero { height: 260svh; view-timeline: --fx-open block; }
    .fx-stage { position: sticky; top: 0; height: 100svh; }
    .fx-hint {
      display: block;
      animation: fx-fade linear both;
      animation-timeline: --fx-open;
      animation-range: contain 0% contain 7%;
    }
    /* the closed device starts in the middle of the stage, larger, reaches its column as the first label comes, and
       goes back to the middle once it has closed again */
    .fx-stack {
      animation: fx-home var(--ease) both, fx-back var(--ease) forwards;
      animation-timeline: --fx-open, --fx-open;
      animation-range: contain 0% contain 24%, contain 86% contain 98%;
    }
    /* each layer opens over its own stretch of the scroll (the computer first), all close together */
    .fx-l {
      animation: fx-part var(--ease) both, fx-close var(--ease) forwards;
      animation-timeline: --fx-open, --fx-open;
      animation-range: contain 8% contain var(--end), contain 78% contain 93%;
    }
    /* each label comes in beside its layer and leaves as the stack closes (it stays in the list for screen readers) */
    .fx-layers li {
      animation: fx-say ease-out both, fx-unsay ease-in forwards;
      animation-timeline: --fx-open, --fx-open;
      animation-range: contain calc(var(--end) - 6%) contain calc(var(--end) + 3%), contain 74% contain 84%;
    }
    /* closed, it is one device showing only its top face; the markings come up as the layers part, go as they close */
    .fx-slab::before {
      animation: fx-show linear both, fx-hide linear forwards;
      animation-timeline: --fx-open, --fx-open;
      animation-range: contain 9% contain calc(var(--end) - 10%), contain 78% contain 88%;
    }
    .fx-l:nth-child(6) .fx-slab::after {
      animation: fx-hide linear both, fx-show linear forwards;
      animation-timeline: --fx-open, --fx-open;
      animation-range: contain 6% contain 14%, contain 84% contain 94%;
    }
  }
}
@keyframes fx-part {
  from { transform: translateY(calc((2.5 - var(--i)) * var(--shut))); }
  to { transform: translateY(calc((2.5 - var(--i)) * var(--open))); }
}
@keyframes fx-close {
  from { transform: translateY(calc((2.5 - var(--i)) * var(--open))); }
  to { transform: translateY(calc((2.5 - var(--i)) * var(--shut))); }
}
@keyframes fx-home { from { transform: translateX(var(--home)) scale(var(--zoom)); } }
@keyframes fx-back { from { transform: none; } to { transform: translateX(var(--home)) scale(var(--zoom)); } }
@keyframes fx-say { from { opacity: 0; transform: translateX(-0.75rem); } }
@keyframes fx-unsay { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-0.75rem); } }
@keyframes fx-hide { from { opacity: 1; } to { opacity: 0; } }
@keyframes fx-show { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-fade { to { opacity: 0; } }
