/* Tungsten v5: the launch layer.
   Filament glass (a lit wire inside a glass object) on top of the v4 site.
   Two surfaces, one system: day (cream paper, the default) and night. Every
   surface colour is a semantic token in :root below; the glass objects (key,
   Crystal buttons, tubes) are the same in both. The theme is html[data-theme]. */

:root {
  /* Brand constants: the filament glow, night and cream. Never themed. */
  --glow-core: #fff4e0;
  --glow-hot: #ffb866;
  --glow-orange: #ff5c00;
  --glow-deep: #c73b00;
  --glow-ember: #7a2200;
  --glow-text: #fff7ef;
  --night-0: #0a0807;
  --night-1: #110d0b;
  --night-2: #1a1512;
  --night-line: rgb(255 240 225 / 0.1);
  --cream: #f6efe7;
  --cream-dim: rgb(246 239 231 / 0.62);
  --cream-faint: rgb(246 239 231 / 0.38);

  /* Semantic roles. These are the night values; [data-theme="light"] below
     remaps every one of them for the day surface. Glass objects (the key,
     the Crystal buttons, the tubes) keep their own colours in both. */
  --surface-0: var(--night-0);
  --surface-1: var(--night-1);
  --surface-2: var(--night-2);
  --ink-1: var(--cream);
  --ink-2: var(--cream-dim);
  --ink-3: var(--cream-faint);
  --ink-rgb: 255 240 225;
  --tint-rgb: 255 255 255;
  --line-soft: var(--night-line);
  --accent-ink: var(--glow-hot);
  --accent-label: var(--glow-orange);
  --accent-glow: 0 0 20px rgb(255 120 30 / 0.35);
  --ink-glow: 0 0 28px rgb(255 120 30 / 0.45);
  --bead: var(--glow-core);
  --cue-line: rgb(255 184 102 / 0.6);
  --ok: #3fbf7a;
  --ok-ink: #6fd89c;
  --ok-text: #bdf0d0;
  --ok-bg: rgb(14 22 17 / 0.9);
  --governs-ink: var(--glow-core);
  --warn-ink: #ffd28a;
  --bad-ink: #ffb0a8;
  --card-bg: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.012));
  --card-border: rgb(255 240 225 / 0.08);
  --card-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
  --sheet-bg: linear-gradient(180deg, #1c1714, #141110);
  --sheet-shadow: 0 12px 24px -12px rgb(0 0 0 / 0.8);
  --chip-bg: rgb(20 16 14 / 0.92);
  --note-bg: rgb(24 16 12 / 0.92);
  --panel-bg: linear-gradient(180deg, #16110e, #110d0b);
  --warm-panel: linear-gradient(180deg, rgb(40 22 12 / 0.92), rgb(20 12 8 / 0.92));
  --dot-off: #2a211c;
  --field-bg: rgb(255 255 255 / 0.04);
  --focus: #8fb0ff;
  --header-bg: color-mix(in srgb, var(--night-1) 88%, transparent);
  --menu-shadow: 0 18px 55px rgb(0 0 0 / 0.45);
  --dialog-bg: var(--night-1);
  --backdrop: rgb(5 4 3 / 0.82);
  --logo-filter: grayscale(1) brightness(0) invert(0.9);
  --badge-filter: grayscale(1) invert(1);
  --flow-line: rgb(255 184 102 / 0.07);
  --grain-blend: screen;
  --grain-opacity: 0.06;
}

/* Day: the same system on cream paper. Night ink becomes day paper and the
   lit filament stays the only saturated thing on the page. */
:root[data-theme="light"] {
  --surface-0: #f6efe7;
  --surface-1: #efe6db;
  --surface-2: #fffcf8;
  --ink-1: #1a1512;
  --ink-2: #5a514a;
  --ink-3: #6e645b;
  --ink-rgb: 26 21 18;
  --tint-rgb: 26 21 18;
  --line-soft: rgb(26 21 18 / 0.1);
  --accent-ink: #b8421a;
  --accent-label: #b8421a;
  --accent-glow: none;
  --ink-glow: none;
  --bead: #ff5c00;
  --cue-line: rgb(234 91 35 / 0.7);
  --ok: #2f9e5e;
  --ok-ink: #1d6b3f;
  --ok-text: #1d6b3f;
  --ok-bg: #e6f5ec;
  --governs-ink: #8a2e00;
  --warn-ink: #7a4b00;
  --bad-ink: #9b2a20;
  --card-bg: #fffcf8;
  --card-border: rgb(26 21 18 / 0.08);
  --card-shadow: 0 1px 2px rgb(60 40 20 / 0.05), 0 18px 40px -24px rgb(60 40 20 / 0.28);
  --sheet-bg: #fffdfa;
  --sheet-shadow: 0 12px 24px -12px rgb(60 40 20 / 0.3);
  --chip-bg: #fffdfa;
  --note-bg: #fffdfa;
  --panel-bg: #fffcf8;
  --warm-panel: linear-gradient(180deg, #fff3ea, #ffe9d9);
  --dot-off: #d9d0c5;
  --field-bg: #fffdfa;
  --focus: #2f5bd6;
  --header-bg: rgb(246 239 231 / 0.86);
  --menu-shadow: 0 18px 55px rgb(60 40 20 / 0.18);
  --dialog-bg: #fffcf8;
  --backdrop: rgb(26 21 18 / 0.5);
  --logo-filter: grayscale(1) brightness(0.3);
  --badge-filter: none;
  --flow-line: rgb(234 91 35 / 0.1);
  --grain-blend: multiply;
  --grain-opacity: 0.05;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

/* The wire gradient is defined inline on each page; on day its white-hot
   centre would vanish against paper, so the stops deepen. */
:root[data-theme="light"] #wire-grad stop:nth-of-type(1) { stop-color: #ff8a2a; }
:root[data-theme="light"] #wire-grad stop:nth-of-type(2) { stop-color: #ffb866; }
:root[data-theme="light"] #wire-grad stop:nth-of-type(3) { stop-color: #e8520a; }

/* ------------------------------------------------------------------ */
/* Header                          */
/* ------------------------------------------------------------------ */

body.v5 .site-header {
  border-bottom: 1px solid var(--line-soft);
  background: var(--header-bg);
  color: var(--ink-1);
  backdrop-filter: blur(18px) saturate(1.2);
}

body.v5 .site-header .wordmark,
body.v5 .menu-dialog .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.v5 .site-header .wordmark img {
  width: 28px;
  height: 28px;
}

body.v5 .site-header .brand-tungsten {
  color: var(--ink-1);
}

body.v5 .site-header .brand-dev {
  color: var(--ink-3);
}

body.v5 .desktop-nav > a,
body.v5 .nav-group > a,
body.v5 .menu-button {
  color: var(--ink-2);
}

body.v5 .desktop-nav > a:hover,
body.v5 .nav-group > a:hover {
  color: var(--ink-1);
}

body.v5 .nav-submenu {
  border-color: var(--line-soft);
  background: color-mix(in srgb, var(--surface-2) 97%, transparent);
  box-shadow: var(--menu-shadow);
}

body.v5 .nav-submenu a {
  color: var(--ink-2);
}

body.v5 .nav-submenu a:hover,
body.v5 .nav-submenu a:focus-visible {
  background: rgb(var(--tint-rgb) / 0.05);
  color: var(--ink-1);
}

.nav-early-access {
  color: var(--ink-2);
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.nav-early-access:hover {
  color: var(--ink-1);
}

/* ------------------------------------------------------------------ */
/* Filament glass buttons                                              */
/* Crystal: orange glass walls, a dark face, a lit wire at its base.   */
/* ------------------------------------------------------------------ */

body.v5 .button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  color: var(--glow-text);
  font-weight: 600;
  text-shadow: 0 0 10px rgb(255 140 50 / 0.55);
  background:
    linear-gradient(100deg, transparent 18%, rgb(255 255 255 / 0.55) 24%, transparent 30%, transparent 68%, rgb(255 255 255 / 0.4) 74%, transparent 80%),
    linear-gradient(180deg, rgb(255 240 222) 0%, rgb(255 170 95) 22%, var(--glow-orange) 55%, var(--glow-deep) 80%, rgb(255 196 140) 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.55),
    0 2px 0 var(--glow-ember),
    0 3px 0 rgb(0 0 0 / 0.25),
    0 10px 22px -8px rgb(255 92 0 / 0.65),
    0 0 26px -6px rgb(255 92 0 / 0.5);
  transition:
    filter var(--motion-snap) var(--ease-out-quart),
    transform var(--motion-snap) var(--ease-out-quart),
    box-shadow var(--motion-snap) var(--ease-out-quart);
}

body.v5 .button::before,
body.v5 .button::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

body.v5 .button::before {
  inset: 3px 4px 4px;
  border-radius: 4px;
  background:
    radial-gradient(90% 80% at 50% 120%, rgb(255 110 20 / 0.85), transparent 65%),
    linear-gradient(180deg, rgb(38 20 12 / 0.94) 0%, rgb(58 24 8 / 0.9) 50%, rgb(150 50 0 / 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    inset 0 -1px 0 rgb(255 200 150 / 0.5),
    inset 1px 0 0 rgb(255 255 255 / 0.12),
    inset -1px 0 0 rgb(255 255 255 / 0.12),
    0 0 0 1px rgb(90 30 0 / 0.55);
}

body.v5 .button::after {
  left: 20%;
  right: 20%;
  bottom: 7px;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--glow-hot) 12%, var(--glow-core) 50%, var(--glow-hot) 88%, transparent);
  box-shadow:
    0 0 4px 1px rgb(255 150 60 / 0.9),
    0 0 12px 2px rgb(255 92 0 / 0.55),
    0 -6px 16px 2px rgb(255 92 0 / 0.3);
  opacity: 0.85;
}

body.v5 .button:hover {
  border: 0;
  background:
    linear-gradient(100deg, transparent 18%, rgb(255 255 255 / 0.55) 24%, transparent 30%, transparent 68%, rgb(255 255 255 / 0.4) 74%, transparent 80%),
    linear-gradient(180deg, rgb(255 240 222) 0%, rgb(255 170 95) 22%, var(--glow-orange) 55%, var(--glow-deep) 80%, rgb(255 196 140) 100%);
  color: var(--glow-text);
  filter: brightness(1.06) saturate(1.1);
}

body.v5 .button:hover::after {
  opacity: 1;
}

body.v5 .button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.5),
    0 0 0 var(--glow-ember),
    0 1px 0 rgb(0 0 0 / 0.25),
    0 4px 12px -6px rgb(255 92 0 / 0.7);
}

body.v5 .button:disabled {
  filter: grayscale(1) brightness(0.8);
  cursor: default;
}

/* The same key on a dark surface: the glow halved, a dark hairline keeping
   the walls crisp, a brighter base so its thickness still shows. */
.on-night .button,
body.v5 .site-header .button,
body.v5 .menu-dialog .button {
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.45),
    0 0 0 1px rgb(24 8 0 / 0.9),
    0 2px 0 rgb(184 62 0),
    0 3px 0 rgb(92 26 0),
    0 4px 1px rgb(0 0 0 / 0.6),
    0 10px 16px -8px rgb(255 92 0 / 0.5),
    0 0 14px -6px rgb(255 92 0 / 0.4);
}

.on-night .button::before,
body.v5 .site-header .button::before {
  background:
    radial-gradient(70% 60% at 50% 115%, rgb(255 110 20 / 0.8), transparent 70%),
    linear-gradient(180deg, rgb(20 11 7 / 0.98) 0%, rgb(30 13 5 / 0.97) 55%, rgb(96 32 0 / 0.96) 100%);
}

body.v5 .site-header .button-small::after {
  bottom: 6px;
}

/* A quiet companion: smoked glass, no filament. */
.ghost-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid rgb(var(--ink-rgb) / 0.18);
  border-radius: 6px;
  background: rgb(var(--tint-rgb) / 0.04);
  color: var(--ink-1);
  font: 500 16px/1 var(--font-body);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background-color var(--motion-snap) var(--ease-out-quart), border-color var(--motion-snap) var(--ease-out-quart);
}

.ghost-small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.ghost-button:hover {
  border-color: rgb(255 184 102 / 0.5);
  background: rgb(var(--tint-rgb) / 0.07);
}

.ghost-button .play {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--glow-hot);
  filter: drop-shadow(0 0 4px rgb(255 140 40 / 0.9));
}

/* ------------------------------------------------------------------ */
/* The glass t key: the Tungsten mark, live                            */
/* Sized with zoom so every px matches the product's Crystal key.      */
/* ------------------------------------------------------------------ */

.glass-key {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  padding: 4px 0 6px;
  border: 0;
  border-radius: 6px;
  color: var(--glow-text);
  font: 600 31px/1 var(--font-display);
  letter-spacing: -0.02em;
  text-shadow: 0 0 10px rgb(255 140 50 / 0.55);
  cursor: pointer;
  background:
    linear-gradient(90deg,
      rgb(255 232 205 / 0.85) 0, rgb(255 160 70 / 0.25) 1.5px, rgb(110 30 0 / 0.2) 3px,
      rgb(70 18 0 / 0.4) 5px, rgb(70 18 0 / 0) 9px,
      rgb(60 15 0 / 0) calc(100% - 9px), rgb(60 15 0 / 0.5) calc(100% - 5px),
      rgb(110 30 0 / 0.4) calc(100% - 3px), rgb(255 170 100 / 0.2) calc(100% - 1.5px), rgb(255 205 160 / 0.6) 100%),
    linear-gradient(100deg, transparent 18%, rgb(255 255 255 / 0.3) 24%, transparent 30%, transparent 68%, rgb(255 255 255 / 0.2) 74%, transparent 80%),
    linear-gradient(180deg,
      rgb(255 250 242) 0, rgb(255 200 140) 1.5px, rgb(240 100 20) 3px, rgb(150 44 0) 4px,
      var(--glow-deep) 50%, rgb(80 22 0) calc(100% - 6px), rgb(180 60 0) calc(100% - 4px),
      rgb(255 130 40) calc(100% - 2.5px), rgb(255 190 130) calc(100% - 1px), rgb(255 232 208) 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.45),
    0 0 0 1px rgb(24 8 0 / 0.9),
    0 2px 0 rgb(184 62 0),
    0 3px 0 rgb(92 26 0),
    0 4px 1px rgb(0 0 0 / 0.6),
    0 10px 16px -8px rgb(255 92 0 / 0.5),
    0 0 14px -6px rgb(255 92 0 / 0.4);
  transition:
    transform 90ms var(--ease-out-quart),
    box-shadow 90ms var(--ease-out-quart),
    filter 400ms var(--ease-out-quart);
}

.glass-key::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 5px 6px;
  border-radius: 5px;
  background:
    radial-gradient(70% 60% at 50% 115%, rgb(255 110 20 / 0.8), transparent 70%),
    linear-gradient(180deg, rgb(20 11 7 / 0.98) 0%, rgb(30 13 5 / 0.97) 55%, rgb(96 32 0 / 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    inset 0 -1px 0 rgb(255 190 130 / 0.5),
    inset 1px 0 0 rgb(255 255 255 / 0.1),
    inset -1px 0 0 rgb(255 255 255 / 0.06),
    0 0 0 1px rgb(50 12 0 / 0.75),
    0 1px 3px 1px rgb(40 10 0 / 0.55);
}

.glass-key__wire {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 8px;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--glow-hot) 12%, var(--glow-core) 50%, var(--glow-hot) 88%, transparent);
  box-shadow:
    0 0 4px 1px rgb(255 150 60 / 0.9),
    0 0 12px 2px rgb(255 92 0 / 0.55),
    0 -6px 16px 2px rgb(255 92 0 / 0.3);
  pointer-events: none;
  transition: opacity 300ms, box-shadow 300ms;
}

.glass-key:hover {
  filter: brightness(1.06) saturate(1.1);
}

.glass-key:is(:active, .is-pressed) {
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.4),
    0 0 0 1px rgb(24 8 0 / 0.9),
    0 1px 0 rgb(92 26 0),
    0 2px 1px rgb(0 0 0 / 0.6),
    0 4px 10px -6px rgb(255 92 0 / 0.5);
}

/* Cold: the same glass with the filament off. */
.glass-key.is-cold {
  filter: brightness(0.22) saturate(0.5);
}

.glass-key.is-cold .glass-key__wire {
  background: linear-gradient(90deg, transparent, rgb(90 16 0) 12%, rgb(120 22 0) 50%, rgb(90 16 0) 88%, transparent);
  box-shadow: none;
}

.glass-key.is-igniting {
  animation: key-ignite 1100ms steps(1, end) 1 both;
}

.glass-key.is-igniting .glass-key__wire {
  animation: wire-ignite 1100ms steps(1, end) 1 both;
}

@keyframes key-ignite {
  0% { filter: brightness(0.22) saturate(0.5); }
  18% { filter: brightness(0.7) saturate(0.8); }
  24% { filter: brightness(0.25) saturate(0.5); }
  38% { filter: brightness(0.85) saturate(0.9); }
  46% { filter: brightness(0.45) saturate(0.7); }
  60%, 100% { filter: none; }
}

@keyframes wire-ignite {
  0% { opacity: 0.3; }
  18% { opacity: 1; }
  24% { opacity: 0.4; }
  38% { opacity: 1; }
  46% { opacity: 0.7; }
  60%, 100% { opacity: 1; }
}

.keycap-hint {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid rgb(var(--ink-rgb) / 0.25);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-1);
  font: 500 12px/1 var(--font-machine);
}

/* ------------------------------------------------------------------ */
/* Night surfaces                                                      */
/* ------------------------------------------------------------------ */

.on-night {
  position: relative;
  background: var(--surface-0);
  color: var(--ink-1);
}

.on-night .eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow b {
  color: var(--accent-label);
  font-weight: 400;
}

.on-night .eyebrow {
  color: var(--ink-3);
}

/* Filament texture: glowing flow lines at the corners, a clean centre. */
.filament-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.filament-lines svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.filament-lines path {
  fill: none;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero-v5 {
  overflow: hidden;
  min-height: min(860px, calc(100svh - 110px));
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(64px, 8vw, 110px);
  background:
    radial-gradient(40% 55% at 74% 48%, rgb(255 92 0 / 0.16), transparent 70%),
    radial-gradient(60% 60% at 74% 60%, rgb(255 140 40 / 0.05), transparent 70%),
    var(--surface-0);
}

.hero-v5__grid {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 1320px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
}

.hero-v5 h1 {
  margin: 22px 0 0;
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 92px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-v5 h1 em {
  color: var(--accent-ink);
  font-style: normal;
  text-shadow: var(--ink-glow);
}

.hero-v5__lede {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--ink-2);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
}

.hero-v5__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.hero-v5__actions .button {
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.hero-v5__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 44px;
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-v5__proof span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--glow-orange);
  box-shadow: 0 0 6px 1px rgb(255 92 0 / 0.7);
  vertical-align: 2px;
}

.hero-v5__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.hero-v5__stage .glass-key {
  zoom: 4.2;
}

.hero-v5__readout {
  position: absolute;
  right: 4%;
  top: 6%;
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-align: right;
  text-transform: uppercase;
}

.hero-v5__readout strong {
  display: block;
  color: var(--ink-1);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.hero-v5__caption {
  position: absolute;
  bottom: 2%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hero-v5__floor {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 70%;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 92 0 / 0.28), transparent);
  filter: blur(8px);
  transform: translateX(-50%);
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Experiences: press t, watch an expert's judgment go to work         */
/* ------------------------------------------------------------------ */

.experience {
  padding-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(45% 60% at 20% 55%, rgb(255 92 0 / 0.1), transparent 70%),
    var(--surface-1);
}

.experience__inner {
  max-width: 1320px;
  margin: 0 auto;
}

.experience__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px 48px;
}

.experience h2,
.switch-on h2,
.v5-section h2 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.experience h2 {
  max-width: 760px;
  color: var(--ink-1);
}

.experience__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgb(var(--tint-rgb) / 0.03);
}

.experience__tabs button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-2);
  font: 500 14px/1 var(--font-body);
  cursor: pointer;
}

.experience__tabs button[aria-selected="true"] {
  background: rgb(var(--tint-rgb) / 0.08);
  color: var(--ink-1);
  box-shadow: inset 0 -2px 0 var(--glow-orange);
}

.experience__stage {
  display: grid;
  margin-top: 56px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: stretch;
}

.experience__trigger {
  position: relative;
  display: flex;
  min-height: 460px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background:
    radial-gradient(60% 50% at 50% 55%, rgb(255 92 0 / 0.12), transparent 70%),
    var(--card-bg);
  box-shadow: var(--card-shadow);
}

.experience__trigger .glass-key {
  zoom: 3.4;
}

.experience__request {
  min-height: 3.2em;
  max-width: 340px;
  margin: 0;
  padding: 0 24px;
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.experience__request .caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--glow-hot);
  vertical-align: -2px;
  box-shadow: 0 0 6px var(--glow-orange);
}

.experience__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.run-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.run-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.run-card__bar strong {
  color: var(--ink-1);
  font-weight: 400;
}

.run-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.run-card__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--ink-rgb) / 0.25);
}

.run-card[data-state="running"] .run-card__status i {
  background: var(--glow-orange);
  box-shadow: 0 0 8px 1px rgb(255 92 0 / 0.8);
}

.run-card[data-state="done"] .run-card__status i {
  background: var(--ok);
  box-shadow: 0 0 6px rgb(63 191 122 / 0.6);
}

.run-steps {
  margin: 0;
  padding: 10px 14px;
  list-style: none;
}

.run-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  min-height: 62px;
  align-content: center;
  padding: 12px 14px 12px 34px;
  border-radius: 8px;
  color: var(--ink-3);
  transition: color 300ms, background-color 300ms, opacity 300ms;
}

.run-step + .run-step {
  margin-top: 4px;
}

.run-step__title {
  color: inherit;
  font-size: 16px;
  font-weight: 500;
}

.run-step__meta {
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: right;
}

.run-step__detail {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.run-step__detail q {
  color: var(--ink-1);
  quotes: "“" "”";
}

.run-step__detail cite {
  display: block;
  margin-top: 4px;
  color: var(--accent-ink);
  font-family: var(--font-machine);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.run-step[data-state="pending"] {
  opacity: 0.4;
}

.run-step[data-state="pending"] .run-step__detail {
  display: none;
}

.run-step[data-state="active"],
.run-step[data-state="done"] {
  color: var(--ink-1);
}

.run-step[data-state="active"] {
  background: rgb(255 120 40 / 0.06);
}

/* The run edge: a slim glass tube with the filament inside. */
.tube {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: 7px;
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgb(34 31 29 / 0.94), rgb(52 48 45 / 0.92) 50%, rgb(34 31 29 / 0.94)) center / calc(100% - 4px) calc(100% - 4px) no-repeat,
    linear-gradient(90deg, rgb(232 229 226) 0%, rgb(176 170 164) 25%, rgb(122 116 111) 55%, rgb(90 86 82) 80%, rgb(232 229 226) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.35), 0 0 0 1px rgb(0 0 0 / 0.7), 1px 1px 0 rgb(104 99 95);
}

.tube::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  bottom: 5px;
  width: 1.5px;
  border-radius: 999px;
  background: rgb(150 144 138);
  transform: translateX(-50%);
}

.run-step:is([data-state="active"], [data-state="done"]) .tube {
  background:
    linear-gradient(90deg, rgb(20 11 7 / 0.98), rgb(96 32 0 / 0.96) 50%, rgb(20 11 7 / 0.98)) center / calc(100% - 4px) calc(100% - 4px) no-repeat,
    linear-gradient(90deg, rgb(255 240 222) 0%, rgb(255 170 95) 25%, var(--glow-orange) 55%, var(--glow-deep) 80%, rgb(255 240 222) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.45), 0 0 0 1px rgb(24 8 0 / 0.9), 1px 1px 0 rgb(184 62 0), 0 0 8px -3px rgb(255 92 0 / 0.45);
}

.run-step:is([data-state="active"], [data-state="done"]) .tube::before {
  background: linear-gradient(180deg, var(--glow-hot), var(--glow-core) 50%, var(--glow-hot));
  box-shadow: 0 0 3px 1px rgb(255 150 60 / 0.9), 0 0 8px 2px rgb(255 92 0 / 0.5);
}

/* Confirmed work in progress: the current travels down the wire. */
.run-step[data-state="active"] .tube::before {
  background: linear-gradient(180deg, var(--glow-deep) 0%, var(--glow-orange) 30%, var(--glow-core) 50%, var(--glow-orange) 70%, var(--glow-deep) 100%) 0 0 / 100% 300%;
  animation: tube-travel 1.4s linear infinite;
}

@keyframes tube-travel {
  from { background-position: 0 -100%; }
  to { background-position: 0 200%; }
}

.run-step[data-state="review"] {
  color: var(--ink-1);
}

.run-step[data-state="review"] .tube::before {
  background: var(--ok);
  box-shadow: 0 0 3px rgb(63 191 122 / 0.6);
}

.run-output {
  display: grid;
  margin: auto 14px 14px;
  padding: 18px 20px;
  gap: 12px;
  border: 1px solid rgb(255 184 102 / 0.25);
  border-radius: 10px;
  background: rgb(255 120 40 / 0.05);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--ease-out-quart), transform 400ms var(--ease-out-quart);
}

.run-card[data-state="done"] .run-output {
  opacity: 1;
  transform: none;
}

.run-output__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-1);
  font-size: 17px;
  font-weight: 600;
}

.run-output__title span {
  color: var(--ok-ink);
  font-family: var(--font-machine);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.run-output__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.run-output__chips span {
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--ink-2);
  font-family: var(--font-machine);
  font-size: 12px;
}

.run-output__chips span b {
  margin-right: 6px;
  color: var(--accent-ink);
  font-weight: 400;
}

.experience__note {
  margin: 20px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* FAQ (paper)                                                         */
/* ------------------------------------------------------------------ */

.v5-section {
  padding-top: clamp(80px, 9vw, 130px);
  padding-bottom: clamp(80px, 9vw, 130px);
}

.v5-section__inner {
  max-width: 1320px;
  margin: 0 auto;
}

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
}

.faq h2 {
  color: var(--tungsten);
}

.faq__intro p {
  max-width: 400px;
  margin: 22px 0 0;
  color: var(--secondary-ink);
  font-size: 18px;
  line-height: 1.55;
}

.faq__list {
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  color: var(--tungsten);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--ember);
  font-family: var(--font-machine);
  font-size: 22px;
  transition: transform var(--motion-move) var(--ease-out-quart);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--secondary-ink);
  font-size: 17px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* The close: expertise, switched on                                   */
/* ------------------------------------------------------------------ */

.switch-on {
  overflow: hidden;
  padding-top: clamp(96px, 12vw, 170px);
  padding-bottom: clamp(96px, 12vw, 170px);
  text-align: center;
  background:
    radial-gradient(40% 50% at 50% 30%, rgb(255 92 0 / 0.18), transparent 70%),
    var(--surface-0);
}

.switch-on__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}

.switch-on .glass-key {
  zoom: 2.6;
  margin-bottom: 18px;
}

.switch-on h2 {
  color: var(--ink-1);
  font-size: clamp(44px, 6.4vw, 92px);
}

.switch-on p {
  max-width: 600px;
  margin: 24px auto 0;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.55;
}

.early-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 40px auto 0;
  max-width: 640px;
}

.early-form input {
  flex: 1 1 220px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgb(var(--ink-rgb) / 0.16);
  border-radius: 6px;
  background: var(--field-bg);
  color: var(--ink-1);
  font: 16px var(--font-body);
}

.early-form input::placeholder {
  color: var(--ink-3);
}

.early-form input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.early-form .button {
  min-height: 52px;
  padding: 0 24px;
}

.switch-on__alt {
  margin-top: 22px;
  color: var(--ink-3);
  font-size: 15px;
}

.switch-on__alt button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-1);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(255 92 0 / 0.7);
  text-underline-offset: 4px;
  cursor: pointer;
}

.form-note {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 13px;
}

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

body.v5 .site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--surface-0);
  color: var(--ink-2);
}

body.v5 .site-footer a {
  color: var(--ink-2);
}

body.v5 .site-footer a:hover {
  color: var(--ink-1);
}

body.v5 .site-footer .brand-tungsten {
  color: var(--ink-1);
}

body.v5 .site-footer .brand-dev {
  color: var(--ink-3);
}

body.v5 .site-footer .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.v5 .site-footer .wordmark img {
  width: 28px;
  height: 28px;
}

body.v5 .element-signature,
body.v5 .element-signature b {
  color: var(--ink-3);
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-socials a {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgb(var(--tint-rgb) / 0.03);
}

.footer-socials a:hover {
  border-color: rgb(255 184 102 / 0.45);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-badges {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-badges img {
  height: 34px;
  opacity: 0.8;
  filter: var(--badge-filter);
}

/* ------------------------------------------------------------------ */
/* Dialogs: the film and early access                                  */
/* ------------------------------------------------------------------ */

.film-dialog,
.early-dialog {
  max-width: min(94vw, 920px);
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--dialog-bg);
  color: var(--ink-1);
}

.film-dialog::backdrop,
.early-dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(6px);
}

/* The film is portrait (4:5): the dialog shrink-wraps the video so the
   browser centres it, instead of leaving it at the left of a wide box. */
.film-dialog {
  width: fit-content;
  max-width: 94vw;
  margin: auto;
  overflow: hidden;
  background: #000;
}

.film-dialog video {
  display: block;
  width: auto;
  height: min(88vh, calc(94vw * 5 / 4));
  max-width: 94vw;
  aspect-ratio: 4 / 5;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgb(10 8 7 / 0.7);
  color: var(--ink-1);
  font: 500 13px var(--font-body);
  cursor: pointer;
}

.early-dialog {
  width: min(94vw, 520px);
  padding: 40px 36px 36px;
}

.early-dialog h2 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.early-dialog p {
  margin: 12px 0 0;
  color: var(--ink-2);
  line-height: 1.55;
}

.early-dialog .early-form {
  flex-direction: column;
  align-items: stretch;
  margin-top: 26px;
}

.early-dialog .early-form input {
  flex: none;
}

.early-success {
  text-align: center;
}

.early-success .glass-key {
  zoom: 1.6;
  margin-bottom: 8px;
}

/* ------------------------------------------------------------------ */
/* Brand kit pages                                     */
/* ------------------------------------------------------------------ */

.page-hero-night {
  padding-top: clamp(72px, 9vw, 130px);
  padding-bottom: clamp(72px, 9vw, 120px);
  background:
    radial-gradient(40% 55% at 78% 45%, rgb(255 92 0 / 0.14), transparent 70%),
    var(--surface-0);
}

.page-hero-night__grid {
  display: grid;
  max-width: 1320px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.page-hero-night h1 {
  margin: 20px 0 0;
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: clamp(48px, 6.6vw, 96px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.page-hero-night .lede {
  max-width: 560px;
  margin: 26px 0 0;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.55;
}

.film-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #000;
  box-shadow: 0 30px 80px -30px rgb(255 92 0 / 0.35);
}

.film-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 {
  margin: 64px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.prose p,
.prose li {
  color: var(--secondary-ink);
  font-size: 19px;
  line-height: 1.65;
}

.prose p {
  margin: 20px 0 0;
}

.prose strong {
  color: var(--tungsten);
}

.prose .pull {
  margin: 48px 0 0;
  padding-left: 22px;
  border-left: 3px solid var(--ember);
  color: var(--tungsten);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  line-height: 1.25;
}

.stat-row {
  display: grid;
  margin-top: 36px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.stat-row div {
  padding: 22px 20px 22px 0;
}

.stat-row div + div {
  padding-left: 20px;
  border-left: 1px solid var(--hairline);
}

.stat-row strong {
  display: block;
  color: var(--ember-ink);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat-row span {
  color: var(--secondary-ink);
  font-size: 15px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.brand-tile {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--paper-raised);
}

.brand-tile__art {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  background: var(--night-0);
}

.brand-tile__art.is-light {
  background: #f4f5f6;
}

.brand-tile__art.is-checker {
  background: repeating-conic-gradient(#2a2420 0% 25%, #1c1714 0% 50%) 50% / 20px 20px;
}

.brand-tile__art img {
  max-width: 70%;
  max-height: 70%;
}

.brand-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14px;
}

.brand-tile__meta a {
  color: var(--ember-ink);
  font-weight: 600;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.swatch {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.swatch i {
  display: block;
  height: 84px;
}

.swatch span {
  display: block;
  padding: 10px 12px;
  font-family: var(--font-machine);
  font-size: 12px;
  line-height: 1.5;
}

.boilerplate {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--paper-raised);
}

.boilerplate h3 {
  margin: 0;
  font-family: var(--font-machine);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash-ink);
}

.boilerplate p {
  margin: 10px 0 0;
}

/* ------------------------------------------------------------------ */
/* Responsive and motion                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .hero-v5__grid,
  .experience__stage,
  .faq,
  .page-hero-night__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-v5__stage {
    min-height: 300px;
  }

  .hero-v5__stage .glass-key {
    zoom: 3;
  }

  .experience__trigger {
    min-height: 360px;
  }

  .experience__trigger .glass-key {
    zoom: 2.8;
  }

  }

@media (max-width: 560px) {
  .hero-v5__readout {
    display: none;
  }

  .stat-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-row div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .run-step {
    grid-template-columns: minmax(0, 1fr);
  }

  .run-step__meta {
    text-align: left;
  }

  .early-dialog {
    padding: 36px 22px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass-key.is-igniting,
  .glass-key.is-igniting .glass-key__wire,
  .run-step[data-state="active"] .tube::before {
    animation: none;
  }

  .glass-key,
  .run-output {
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* One night surface on every page                                    */
/* v4 pages are built on paper/ink variables; remapping them here puts */
/* every inner page on the same night surface as the homepage.         */
/* Derived v4 variables resolve on :root, so they are redeclared too.  */
/* ------------------------------------------------------------------ */

:root:not([data-theme="light"]) body.v5 {
  --paper: #0a0807;
  --paper-deep: #100c0a;
  --paper-raised: #15110e;
  --tungsten: #f6efe7;
  --secondary-ink: #b3a99f;
  --ash-ink: #857b72;
  --hairline: rgb(var(--ink-rgb) / 0.1);
  --ember: #ff6a1a;
  --ember-ink: #ffb866;
  --night: #120e0c;
  --night-edge: rgb(var(--ink-rgb) / 0.1);
  --night-ink: #f6efe7;
  --night-dim: #a39a90;
  --white: var(--paper-raised);
  --ink: var(--tungsten);
  --muted: var(--secondary-ink);
  --line: var(--hairline);
  --orange: var(--ember);
  --orange-ink: var(--ember-ink);
  --dark: var(--night);
  --dark-line: var(--night-edge);
}

body.v5 {
  background: var(--surface-0);
  color: var(--ink-1);
}

/* Day: v4 paper variables line up with the v5 day surfaces, so inner pages
   built on v4 markup sit on the same cream as the homepage. */
:root[data-theme="light"] body.v5 {
  --paper: #f6efe7;
  --paper-deep: #efe6db;
  --paper-raised: #fffcf8;
}

body.v5 main {
  position: relative;
  isolation: isolate;
}

body.v5 ::selection {
  background: rgb(255 92 0 / 0.35);
  color: var(--ink-1);
}

body.v5:not(.home-v5) :is(.intent-cta, .case-study-cta) {
  border-top: 1px solid var(--hairline);
  background: radial-gradient(50% 80% at 20% 0%, rgb(255 92 0 / 0.08), transparent 70%) !important;
}

body.v5:not(.home-v5) :is(h1, h2, h3) {
  color: var(--ink-1);
}

/* Night panels sit one step above the page */
body.v5:not(.home-v5) [class*="proof-visual"],
body.v5:not(.home-v5) .case-study-section-label + * [class*="proof"] {
  border-color: var(--hairline);
}

/* Photographs: the beige paper stills become night-toned duotones with a
   warm floor of light, so they belong to the same world as the glass. */
:root:not([data-theme="light"]) body.v5 .case-material {
  position: relative;
  overflow: hidden;
  background: var(--surface-1);
}

:root:not([data-theme="light"]) body.v5 .case-material img {
  filter: grayscale(1) sepia(0.35) contrast(1.15) brightness(0.42);
}

:root:not([data-theme="light"]) body.v5 .case-material::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 50% 110%, rgb(255 92 0 / 0.28), transparent 70%),
    linear-gradient(180deg, rgb(10 8 7 / 0.1), rgb(10 8 7 / 0.65));
  pointer-events: none;
}

body.v5 .case-material-caption {
  border-color: var(--hairline);
  background: transparent;
  color: var(--ink-3);
}

/* Dialogs and menus follow the night surface */
body.v5 :is(.workshop-dialog, .menu-dialog) {
  border: 1px solid var(--line-soft);
  background: var(--dialog-bg);
  color: var(--ink-1);
}

body.v5 :is(.workshop-dialog, .menu-dialog) :is(input, select, textarea) {
  border-color: rgb(var(--ink-rgb) / 0.16);
  background: var(--field-bg);
  color: var(--ink-1);
}

/* ------------------------------------------------------------------ */
/* The footer is the close: Expertise, switched on                     */
/* ------------------------------------------------------------------ */

.site-close {
  position: relative;
  padding-top: clamp(110px, 13vw, 180px);
  padding-bottom: 36px;
  background: radial-gradient(42% 46% at 50% 18%, rgb(255 92 0 / 0.16), transparent 72%);
  color: var(--ink-1);
}

.site-close__cta {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.site-close__cta .glass-key {
  zoom: 2.4;
  margin-bottom: 20px;
}

.site-close__cta h2 {
  margin: 0;
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: clamp(44px, 6.4vw, 92px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.site-close__cta .early-form {
  max-width: 520px;
}

.site-close__base {
  display: flex;
  max-width: 1200px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin: clamp(96px, 11vw, 150px) auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.site-close__base nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
}

.site-close__base nav a {
  color: var(--ink-2);
}

.site-close__base nav a:hover {
  color: var(--ink-1);
}

.site-close .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.site-close .wordmark img {
  width: 26px;
  height: 26px;
}

.site-close .brand-tungsten {
  color: var(--ink-1);
}

.site-close .brand-dev {
  color: var(--ink-3);
}

.site-close .footer-socials a {
  color: var(--ink-2);
}

.site-close__legal {
  display: flex;
  max-width: 1200px;
  justify-content: space-between;
  gap: 16px;
  margin: 18px auto 0;
  color: var(--ink-3);
  font-size: 13px;
}

.site-close__legal p {
  margin: 0;
}

.site-close .element-signature,
.site-close .element-signature b {
  color: var(--ink-3);
  font-family: var(--font-machine);
  font-size: 12px;
}

@media (max-width: 760px) {
  .site-close__base {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-close__cta .glass-key {
    zoom: 1.9;
  }
}

/* Wordmark: Bricolage Grotesque, the same face as the t on the key. */
body.v5 {
  --font-wordmark: var(--font-display);
}

body.v5 .wordmark {
  gap: 9px;
  letter-spacing: -0.035em;
}

body.v5 :is(.wordmark .brand-tungsten, .wordmark .brand-dev) {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
}

body.v5 .wordmark .brand-dev {
  margin-left: -9px;
  font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Day / night toggle                                                  */
/* Day is the default; the choice persists in localStorage.           */
/* ------------------------------------------------------------------ */

.theme-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(var(--ink-rgb) / 0.16);
  border-radius: 6px;
  background: rgb(var(--tint-rgb) / 0.04);
  color: var(--ink-2);
  cursor: pointer;
  transition:
    border-color var(--motion-snap) var(--ease-out-quart),
    color var(--motion-snap) var(--ease-out-quart);
}

.theme-toggle:hover {
  border-color: rgb(255 184 102 / 0.5);
  color: var(--ink-1);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__moon,
:root[data-theme="dark"] .theme-toggle__sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__moon {
  display: block;
}

.dialog-top__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.v5 .menu-dialog .theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgb(var(--ink-rgb) / 0.16);
  background: rgb(var(--tint-rgb) / 0.04);
}

/* Experiences hint: phones tap, desks click or press T. */
.experience__hint-touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .experience__hint-pointer {
    display: none;
  }

  .experience__hint-touch {
    display: inline;
  }
}
