/* Vireta website: the app's "Stage" look. Colours from src/design/tokens.ts (night palette).
   Dark only. No inline styles anywhere (CSP): everything the pages need is here. */

@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/BarlowCondensed_700Bold.ttf) format('truetype');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/BarlowCondensed_800ExtraBold.ttf) format('truetype');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/InstrumentSans_400Regular.ttf) format('truetype');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/InstrumentSans_600SemiBold.ttf) format('truetype');
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --night: #121210;
  --night-deep: #0c0c0b;
  --raised: #1e1e1b;
  --raised-2: #26261f;
  --rule: #34332e;
  --control: #77746a;
  --text: #f3efe6;
  --muted: #a8a497;
  --faint: #8c887d;
  --volt: #d4f53c;
  --volt-pressed: #b9da1f;
  --on-accent: #1a1a17;
  --volt-glow: rgba(212, 245, 60, 0.18);
  --volt-line: rgba(212, 245, 60, 0.38);
  --fig-muscle: #ff5a2e;
  --scrim: rgba(18, 18, 16, 0.72);

  --display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --fs-hero: clamp(3.5rem, 1.4rem + 5vw, 8rem);
  --fs-h2: clamp(2.5rem, 1.6rem + 4.4vw, 5.5rem);
  --fs-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  --fs-stat: clamp(4.5rem, 2rem + 12vw, 12rem);
  --fs-lede: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-small: 0.9375rem;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --section-y: clamp(80px, 12vw, 192px);
  --gutter: clamp(20px, 5vw, 48px);

  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
  --r-device: clamp(34px, 3.4vw, 52px);

  --sh-card: 0 1px 0 rgba(243, 239, 230, 0.05) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --sh-device:
    0 0 0 1px #34332e, 0 0 0 7px #0c0c0b, 0 0 0 8px #34332e, 0 60px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 120px -20px var(--volt-glow);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 var(--fs-body) / 1.6 var(--body);
  overflow-x: clip;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 60% at 70% -10%,
    rgba(212, 245, 60, 0.07),
    transparent 60%
  );
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: url(/img/grain.png) 0 0 / 128px 128px;
  opacity: 0.045;
  mix-blend-mode: overlay;
}
img {
  max-width: 100%;
  height: auto;
}
picture {
  display: block;
}
.device__screen picture {
  height: 100%;
}
.device__screen--tall picture {
  height: auto;
}
a {
  color: var(--text);
  text-decoration-color: var(--control);
  text-underline-offset: 3px;
}
p {
  margin: 0 0 14px;
  text-wrap: pretty;
}
ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}
li {
  margin-bottom: 6px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-weight: 800;
  font-size: var(--fs-hero);
  line-height: 0.88;
  letter-spacing: -0.005em;
}
h2 {
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 0.92;
}
h3 {
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.05;
  letter-spacing: 0.03em;
}
:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: var(--volt);
  color: var(--on-accent);
}

.vis-hidden,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--volt);
  color: var(--on-accent);
  font: 700 1.0625rem / 1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- layout ---------- */
.container {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
}
.container--wide {
  width: min(100% - 2 * var(--gutter), 1440px);
}
.container--narrow {
  width: min(100% - 2 * var(--gutter), 760px);
}
.section {
  position: relative;
  padding-block: var(--section-y);
}
/* desktop: the 12vw rhythm grows to 192px at wide screens, which leaves a 270px band after the hero. */
@media (min-width: 1024px) {
  :root {
    --section-y: clamp(96px, 7vw, 120px);
  }
}
.section + .section::before,
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
}
.section__head {
  display: grid;
  gap: var(--s-4);
  margin-bottom: clamp(40px, 6vw, 96px);
}
.section__head--center {
  text-align: center;
  justify-items: center;
}
.section__head--center h2 {
  max-width: 20ch;
}
:lang(is) .section__head--center h2 {
  max-width: 24ch;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 700 0.875rem / 1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}
.eyebrow--volt {
  color: var(--volt);
}
.section__head--center .eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}
.note {
  margin: 0;
  color: var(--faint);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.note--center {
  text-align: center;
  margin-top: var(--s-6);
}
.link {
  text-decoration: underline;
  text-decoration-color: var(--control);
  text-underline-offset: 3px;
  transition: text-decoration-color 180ms var(--ease-out);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  background: var(--volt);
  color: var(--on-accent);
  font: 700 1.25rem / 1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0 0 0 var(--volt-glow);
  transition:
    background-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}
.btn:active {
  background: var(--volt-pressed);
  box-shadow: none;
  transform: none;
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--control);
}
.btn--ghost:active {
  background: rgba(243, 239, 230, 0.1);
  box-shadow: inset 0 0 0 1px var(--text);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin: 0 0 var(--s-4);
}

/* ---------- header ---------- */
.stuck-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  border-bottom: 1px solid transparent;
  transition:
    background-color 200ms var(--ease-inout),
    border-color 200ms var(--ease-inout);
}
.site-header.is-stuck {
  background: rgba(18, 18, 16, 0.92);
  border-bottom-color: var(--rule);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-stuck {
    background: var(--scrim);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
}
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font: 800 1.625rem / 1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.nav {
  display: none;
}
.nav__link,
.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 700 1.0625rem / 1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition:
    color 180ms var(--ease-out),
    border-color 180ms var(--ease-out);
}
.nav__link {
  position: relative;
  padding: 0 4px;
}
.nav__link[aria-current='page'] {
  color: var(--text);
}
.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 6px;
  height: 2px;
  background: var(--volt);
}
.lang {
  padding: 0 16px;
  border: 1px solid var(--control);
  border-radius: 999px;
  color: var(--text);
  letter-spacing: 0.06em;
}
.menu {
  position: static;
}
.menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  cursor: pointer;
  list-style: none;
  font: 700 1.0625rem / 1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.menu__btn::-webkit-details-marker {
  display: none;
}
.menu__icon {
  position: relative;
  width: 20px;
  height: 12px;
}
.menu__icon::before,
.menu__icon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  transition: transform 180ms var(--ease-out);
}
.menu__icon::before {
  top: 0;
}
.menu__icon::after {
  bottom: 0;
}
.menu[open] .menu__icon::before {
  transform: translateY(5px) rotate(45deg);
}
.menu[open] .menu__icon::after {
  transform: translateY(-5px) rotate(-45deg);
}
.menu__panel {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  padding: 16px var(--gutter) 32px;
  background: var(--night);
  border-bottom: 1px solid var(--rule);
  animation: menu-in 180ms var(--ease-out) both;
}
.menu__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  font: 800 2.5rem / 1 var(--display);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.menu__link[aria-current='page'] {
  color: var(--volt);
}
.menu__panel .lang {
  justify-self: start;
  margin-top: 16px;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@media (min-width: 768px) {
  .site-header {
    height: 64px;
  }
  .nav {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .menu {
    display: none;
  }
  .nav .lang {
    margin-left: 8px;
  }
}

/* ---------- atmosphere ---------- */
.ruler {
  position: relative;
  height: 12px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.ruler::before,
.ruler::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.ruler::before {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 8px);
}
.ruler::after {
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--control) 0 1px, transparent 1px 64px);
}
.spot {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 62%;
  width: 90vmin;
  height: 90vmin;
  margin: -45vmin 0 0 -45vmin;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(212, 245, 60, 0.2),
    rgba(212, 245, 60, 0.06) 45%,
    transparent 70%
  );
  animation: fade 800ms var(--ease-inout) both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding-top: 24px;
}
.hero__in {
  position: relative;
  display: grid;
  gap: var(--s-6);
}
.hero__copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 0;
  padding-top: 8px;
}
.hero__copy .eyebrow {
  margin-bottom: var(--s-5);
}
.hero h1 {
  margin-bottom: var(--s-5);
}
.hero h1 span {
  display: block;
}
.h1__2 {
  position: relative;
  width: fit-content;
  padding-bottom: 0.12em;
}
.h1__2::after {
  content: '';
  position: absolute;
  left: 0;
  right: 4%;
  bottom: 0;
  height: 0.07em;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--volt), var(--volt-line) 70%, transparent);
  transform-origin: left;
  animation: draw 1400ms var(--ease-expo) 500ms both;
}
@keyframes draw {
  from {
    transform: scaleX(0);
  }
}
.lede {
  max-width: 34ch;
  margin: 0 0 var(--s-6);
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--text);
}
:lang(is) .lede {
  max-width: 33ch;
}
:lang(is) {
  --fs-hero: clamp(3.25rem, 1.2rem + 4vw, 7rem);
}
.hero .note {
  max-width: 40ch;
}
.rise {
  animation: rise 700ms var(--ease-out) both;
}
.hero__copy > :nth-child(2) {
  animation-delay: 90ms;
}
.hero__copy > :nth-child(3) {
  animation-delay: 180ms;
}
.hero__copy > :nth-child(4) {
  animation-delay: 270ms;
}
.hero__copy > :nth-child(5) {
  animation-delay: 360ms;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
}

.hero__stage {
  position: relative;
  height: 118vw;
  margin-inline: calc(-1 * var(--gutter));
  overflow: clip;
}
.hero__stage .rig {
  position: absolute;
  right: -2vw;
  bottom: 0;
  height: 80vw;
  aspect-ratio: 279 / 480;
}
.hero__device {
  position: absolute;
  z-index: 2;
  left: 4vw;
  top: 6vw;
  width: 62vw;
}
.device--hero {
  transform: rotate(-4deg);
  animation: device-in 900ms var(--ease-expo) 250ms both;
}
@keyframes device-in {
  from {
    opacity: 0;
    transform: rotate(-4deg) scale(0.96);
  }
}
.hero .spot {
  top: 62%;
  left: 55%;
  width: 130vw;
  height: 130vw;
  margin: -65vw 0 0 -65vw;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font: 600 0.875rem / 1.2 var(--body);
  color: var(--text);
  white-space: nowrap;
}
.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--volt);
}
.chip__dot--muscle {
  background: var(--fig-muscle);
}
.chip__sub {
  padding-left: 8px;
  border-left: 1px solid var(--control);
  color: var(--muted);
}
.hero__stage .chip {
  position: absolute;
  z-index: 3;
  animation: fade 800ms var(--ease-inout) 900ms both;
}
.chip--a {
  top: 8vw;
  right: 4vw;
}
.chip--b {
  display: none !important;
}
.chip--static {
  background: var(--raised);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* rig: sprite sheet of 24 frames drawn on a canvas by motion.js. Without JS (or with reduced
   motion) the still frame shows as a background; only the hero needs to blend into its glow. */
.rig {
  position: relative;
}
.rig::before {
  content: '';
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}
.rig[data-sprite$='goblet-squat.webp']::before {
  background-size: 600% 400%;
  background-position: 0 66.6667%;
}
.rig[data-sprite$='jumping-jack.webp']::before {
  background-size: 400% 600%;
  background-position: 0 40%;
}
.rig[data-sprite$='pallof-press.webp']::before {
  background-size: 400% 600%;
  background-position: 0 40%;
}
.hero .rig::before,
.duo .rig::before {
  mix-blend-mode: lighten;
}
/* the still frame is only fetched without JS or once motion.js has armed the figure (is-armed:
   it is near the screen, or reduced motion is on), so figures far down the page cost nothing */
html:not(.js) .rig[data-sprite$='goblet-squat.webp']::before,
.rig.is-armed[data-sprite$='goblet-squat.webp']::before {
  background-image: url('/img/figure-goblet-squat.webp');
}
html:not(.js) .rig[data-sprite$='jumping-jack.webp']::before,
.rig.is-armed[data-sprite$='jumping-jack.webp']::before {
  background-image: url('/img/figure-jumping-jack.webp');
}
html:not(.js) .rig[data-sprite$='pallof-press.webp']::before,
.rig.is-armed[data-sprite$='pallof-press.webp']::before {
  background-image: url('/img/figure-pallof-press.webp');
}
.rig.is-live::before {
  display: none;
}
.rig__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: opacity;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero__copy {
    max-width: 640px;
  }
  .hero__stage {
    height: calc(104vw + 20px);
  }
  .hero__stage .rig {
    height: 72vw;
  }
  .hero__device {
    width: 44vw;
    left: 12vw;
  }
}
@media (min-width: 1024px) {
  .hero {
    min-height: max(720px, min(100svh, 980px));
    display: flex;
    flex-direction: column;
    padding-top: 0;
  }
  .hero__in {
    flex: 1;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 24px;
    align-items: center;
    gap: 0 24px;
  }
  .hero__copy {
    grid-column: 1 / 7;
    grid-row: 1;
    padding-block: 48px;
  }
  .hero__stage {
    grid-column: 7 / 13;
    grid-row: 1;
    height: auto;
    aspect-ratio: 1 / 1.05;
    margin-inline: 0;
    overflow: visible;
    max-height: 760px;
  }
  .hero__stage .rig {
    right: -3%;
    height: 76%;
    bottom: 3%;
  }
  .hero__device {
    left: 2%;
    top: 3%;
    width: clamp(260px, 24vw, 340px);
  }
  .hero .spot {
    top: 50%;
    left: 62%;
    width: 90vmin;
    height: 90vmin;
    margin: -45vmin 0 0 -45vmin;
  }
  .chip--a {
    top: 5%;
    right: auto;
    left: calc(2% + clamp(260px, 24vw, 340px) + 20px);
  }
  .chip--b {
    display: none !important;
    top: calc(5% + 52px);
    left: calc(2% + clamp(260px, 24vw, 340px) + 20px);
  }
  .hero h1 span {
    white-space: nowrap;
  }
  :lang(is) .hero h1 span {
    white-space: normal;
  }
}

/* hero refinements: fit the first viewport, lit figure, equal-width phone buttons */
.hero .cta {
  width: 100%;
}
.hero .cta .btn {
  flex: 1 1 100%;
}
.hero__stage .rig {
  opacity: 0.92;
}
@media (max-width: 767px) {
  .hero {
    padding-top: 12px;
  }
  .hero__stage {
    margin-top: calc(-1 * var(--s-2));
    height: calc(134vw + 28px);
  }
  .hero__device {
    top: 0;
    left: 7vw;
    width: 60vw;
  }
  .hero .note {
    max-width: none;
  }
}
@media (min-width: 640px) and (max-width: 767px) {
  .hero .cta .btn {
    flex: 0 1 auto;
  }
}
@media (min-width: 1024px) {
  .hero__device {
    width: min(clamp(260px, 24vw, 340px), 33svh);
  }
  .chip--a,
  .chip--b {
    left: calc(2% + min(clamp(260px, 24vw, 340px), 33svh) + 20px);
  }
  .hero .cta .btn {
    flex: 0 1 auto;
  }
}

@media (min-width: 1200px) {
  .chip--b {
    display: inline-flex !important;
  }
}

/* ---------- device frame ---------- */
.device {
  width: 100%;
  margin: 0;
}
.device__bezel {
  position: relative;
  padding: 8px;
  border-radius: var(--r-device);
  background: var(--night-deep);
  box-shadow: var(--sh-device);
}
.device__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: calc(var(--r-device) - 8px);
  background: var(--night);
}
.device__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.device__img--tall {
  height: auto;
  object-fit: fill;
}
.device__notch {
  /* The app's own top bar sits where a camera island would be; never cover it. */
  display: none;
}
.device--dim {
  opacity: 0.6;
}
.device--sm {
  --r-device: 34px;
}
.device__screen--tall picture.is-scrub {
  height: 100%;
  overflow: hidden;
}
.device__screen--tall:focus-visible {
  outline-offset: 0;
}
html:not(.js) .device__screen--tall,
.reduce .device__screen--tall {
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (prefers-reduced-motion: reduce) {
  .device__screen--tall {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ---------- chapters ---------- */
.chapter {
  display: grid;
  gap: var(--s-7);
  padding-block: clamp(48px, 8vw, 96px);
}
.chapter__text {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  max-width: 520px;
}
.chapter__text h3 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}
.chapter__text p {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
}
.chapter__media {
  margin: 0;
  width: min(78vw, 340px);
  justify-self: center;
}
.chapter__media figcaption {
  margin-top: var(--s-6);
  text-align: center;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--s-2) 0 0;
  padding: 0;
  list-style: none;
}
.chips .chip {
  margin: 0;
}
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-left: 3px solid var(--volt);
  background: rgba(212, 245, 60, 0.05);
  color: var(--text) !important;
}
.callout .ico {
  flex: none;
  margin-top: 3px;
  color: var(--volt);
}
@media (min-width: 960px) {
  .chapter {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 24px;
    align-items: start;
    min-height: min(100svh, 900px);
  }
  .chapter__text {
    grid-column: 1 / 6;
    position: sticky;
    top: 28vh;
  }
  .chapter__media {
    grid-column: 7 / 13;
    width: 340px;
    justify-self: center;
  }
  .chapter--flip .chapter__text {
    grid-column: 8 / 13;
    grid-row: 1;
  }
  .chapter--flip .chapter__media {
    grid-column: 1 / 7;
    grid-row: 1;
  }
}

/* exercises showcase */
.chapter--well {
  display: block;
  min-height: 0;
}
.well {
  position: relative;
  overflow: clip;
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  background: var(--night-deep);
  padding: clamp(24px, 4vw, 64px) clamp(20px, 4vw, 64px) 0;
}
.well__grid {
  display: grid;
  gap: var(--s-7);
  padding-bottom: clamp(32px, 5vw, 72px);
}
.well__text {
  display: grid;
  gap: 0;
  align-content: center;
}
.well__text .eyebrow {
  margin-bottom: var(--s-4);
}
.well__text p {
  color: var(--muted);
}
.stat {
  margin: 0;
  line-height: 0.8;
}
.stat__num {
  position: relative;
  min-width: 3ch;
  display: inline-block;
  font: 800 var(--fs-stat) / 0.85 var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}
.stat__num::after {
  content: '';
  display: block;
  width: 24%;
  height: 6px;
  margin-top: 0.06em;
  border-radius: 99px;
  background: var(--volt);
}
.stat--sm {
  margin-top: var(--s-6);
}
.stat--sm .stat__num {
  font-size: var(--fs-h2);
}
.stat--sm .stat__num::after {
  height: 4px;
}
.well__text h3 {
  margin-top: var(--s-4);
}
.well__text .h3--sm {
  margin-bottom: var(--s-5);
}
.figure-wrap {
  display: grid;
  gap: var(--s-4);
  justify-items: center;
}
.figure-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--night);
  overflow: hidden;
}
.rig__view {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6% 6% 14%;
  opacity: 0;
  transition: opacity 220ms var(--ease-inout);
}
.rig__view.is-active {
  opacity: 1;
}
.rig__view[hidden] {
  display: none;
}
.rig__frames {
  position: relative;
  width: 100%;
  height: 100%;
}
.rig__view[data-view='top'] .rig__frames {
  height: auto;
  width: 100%;
  aspect-ratio: 488 / 340;
}
.rig__view[data-view='front'] .rig__frames {
  aspect-ratio: 431 / 440;
  height: 100%;
  width: auto;
  max-width: 100%;
}
.rig__view[data-view='side'] .rig__frames {
  aspect-ratio: 279 / 480;
  height: 100%;
  width: auto;
}
.rig__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  margin: 0;
  text-align: center;
  font: 700 0.875rem / 1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--control);
  border-radius: 999px;
  background: var(--raised);
  width: 100%;
  max-width: 560px;
}
.seg[hidden] {
  display: none;
}
.seg__tab {
  flex: 1;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 700 1.0625rem / 1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out);
}
.seg__tab[aria-selected='true'] {
  background: var(--volt);
  color: var(--on-accent);
}
.figure-cap {
  text-align: center;
}
@media (min-width: 960px) {
  .well__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 24px;
    align-items: center;
  }
  .well__text {
    grid-column: 1 / 6;
  }
  .figure-wrap {
    grid-column: 7 / 13;
  }
}

/* ---------- panel, facts ---------- */
.panel {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--raised);
  box-shadow: var(--sh-card);
  padding: clamp(24px, 4vw, 48px);
}
.panel__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--s-5);
}
.panel__head h2 {
  font-size: var(--fs-h2);
}
.panel__ico {
  color: var(--volt);
  display: grid;
}
.panel > p {
  color: var(--muted);
}
.panel .link {
  color: var(--text);
}
.facts {
  display: grid;
  gap: 0;
  margin: var(--s-5) 0 var(--s-4);
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  min-height: 52px;
  border-top: 1px solid var(--rule);
  font-weight: 600;
}
.facts .ico {
  flex: none;
  color: var(--volt);
}

/* ---------- closing band ---------- */
.band {
  position: relative;
  overflow: clip;
  padding-block: var(--section-y);
  text-align: center;
}
.band .spot--band {
  top: auto;
  bottom: 0;
  left: 50%;
  width: min(140vw, 1100px);
  height: min(100vw, 700px);
  margin: 0 0 calc(-1 * min(50vw, 350px)) calc(-1 * min(70vw, 550px));
  animation: none;
}
.band__in {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}
.band__in .eyebrow {
  margin-bottom: var(--s-5);
}
.band__in .eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}
.band h2 {
  position: relative;
  margin-bottom: var(--s-6);
  padding-bottom: 0.14em;
}
.band h2::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 0.06em;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--volt), transparent);
}
.band .cta {
  justify-content: center;
}
.band p:not(.cta, .note) {
  color: var(--muted);
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  overflow: clip;
  padding-top: var(--s-7);
  background: var(--night-deep);
}
.footer .ruler {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}
.footer__grid {
  position: relative;
  display: grid;
  gap: var(--s-6);
  padding-block: var(--s-6) var(--s-5);
}
.footer__brand p {
  max-width: 36ch;
  margin: var(--s-4) 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
}
.footer__nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer__nav li {
  margin: 0;
}
.footer a:not(.brand, .lang) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}
.footer a[aria-current='page'] {
  color: var(--text);
}
.footer__h {
  margin: 0 0 var(--s-2);
  font: 700 0.875rem / 1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer__contact p {
  margin: 0;
}
.footer__contact .lang {
  margin-top: var(--s-3);
}
.footer__legal {
  margin: 0;
  color: var(--faint);
  font-size: var(--fs-small);
}
.footer__mark {
  height: clamp(4.5rem, 20vw, 18rem);
  margin-top: var(--s-5);
  overflow: hidden;
  font: 800 clamp(6rem, 28vw, 26rem) / 0.8 var(--display);
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--raised);
  -webkit-text-stroke: 1px transparent;
  transition: -webkit-text-stroke-color 400ms var(--ease-inout);
  user-select: none;
}
@media (min-width: 960px) {
  .footer__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 24px;
  }
  .footer__brand {
    grid-column: 1 / 6;
  }
  .footer__nav {
    grid-column: 7 / 10;
  }
  .footer__contact {
    grid-column: 10 / 13;
  }
  .footer__legal {
    grid-column: 1 / 13;
  }
}

/* ---------- documents (privacy, terms, support) ---------- */
.doc {
  padding-block: clamp(40px, 6vw, 96px) var(--section-y);
}
.doc-head {
  display: grid;
  gap: var(--s-4);
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-6);
  border-bottom: 1px solid var(--rule);
}
.doc-head {
  grid-template-columns: minmax(0, 1fr);
}
.doc-head h1 {
  font-size: var(--fs-h2);
  line-height: 0.92;
  overflow-wrap: anywhere;
}
:lang(is) .doc-head h1 {
  font-size: clamp(1.875rem, 9vw, 5.5rem);
  hyphens: auto;
}
.meta {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: var(--fs-small);
}
.doc-grid {
  display: grid;
  gap: var(--s-5);
}
.toc--d {
  display: none;
}
.toc--m {
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--raised);
}
.toc--m summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  font: 700 1.0625rem / 1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.toc--m summary::-webkit-details-marker {
  display: none;
}
.toc--m summary::after {
  content: '';
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 180ms var(--ease-out);
}
.toc--m[open] summary::after {
  transform: rotate(-135deg);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.toc--m ol {
  padding: 0 16px 12px;
}
.toc li {
  margin: 0;
  counter-increment: toc;
}
.toc a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-small);
  transition: color 180ms var(--ease-out);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  width: 2ch;
  font: 700 0.875rem / 1 var(--display);
  letter-spacing: 0.08em;
  color: var(--faint);
}
.toc__h {
  margin: 0 0 var(--s-3);
  font: 700 0.875rem / 1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.prose {
  max-width: 68ch;
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.prose h2 {
  margin: 56px 0 var(--s-4);
  scroll-margin-top: 96px;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.03em;
}
.prose > h2:first-child,
.prose > .panel + h2 {
  margin-top: 0;
}
.prose > .panel + h2 {
  margin-top: 56px;
}
.prose h2:target {
  padding-left: 14px;
  box-shadow: inset 3px 0 0 var(--volt);
}
.prose li::marker {
  color: var(--volt);
}
.prose li {
  margin-bottom: 8px;
}
.prose a {
  text-decoration: underline;
  text-decoration-color: var(--control);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a.btn {
  text-decoration: none;
}
.prose strong {
  font-weight: 600;
}
.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: #3a3a34;
  color: var(--text);
  text-decoration: underline dashed var(--fig-muscle);
  text-underline-offset: 4px;
}
.tablewrap {
  overflow-x: auto;
  margin: 0 0 var(--s-5);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.5;
}
.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.table tr:last-child td {
  border-bottom: 0;
}
.table th {
  font: 700 0.9375rem / 1.2 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--raised);
}
.panel--contact {
  display: grid;
  justify-items: start;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}
.panel--contact .eyebrow {
  margin-bottom: var(--s-2);
}
.email {
  margin: 0 0 var(--s-3);
  font: 800 clamp(1.5rem, 1rem + 2.4vw, 1.75rem) / 1.1 var(--display);
  letter-spacing: 0.04em;
  user-select: all;
  overflow-wrap: anywhere;
}
.panel--contact p {
  margin: 0;
}
.panel--contact .email {
  margin-bottom: var(--s-3);
  color: var(--text);
}
.panel--contact .cta {
  margin-bottom: var(--s-3);
}
.faq {
  margin: 0 0 10px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--raised);
  transition: background-color 180ms var(--ease-out);
}
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 10px 56px 10px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before,
.faq summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 22px;
  width: 14px;
  height: 2px;
  margin-top: -1px;
  background: var(--muted);
  transition: transform 180ms var(--ease-out);
}
.faq summary::after {
  transform: rotate(90deg);
}
.faq[open] summary::before,
.faq[open] summary::after {
  transform: rotate(135deg);
}
.faq[open] summary::after {
  transform: rotate(45deg);
}
.faq p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}
.steps {
  margin: 0 0 var(--s-5);
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--volt-line);
  border-radius: 50%;
  font: 800 1.125rem / 1 var(--display);
  color: var(--volt);
}
@media (min-width: 1100px) {
  .doc-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }
  .toc--m {
    display: none;
  }
  .toc--d {
    display: block;
    position: sticky;
    top: 96px;
  }
  .prose {
    grid-column: 2;
  }
}

/* ---------- 404 ---------- */
.nf {
  display: grid;
  min-height: 100svh;
  align-items: center;
}
.nf__in {
  display: grid;
  justify-items: start;
  gap: var(--s-4);
  padding-block: var(--s-8);
}
.nf h1 {
  font-size: var(--fs-h2);
}
.nf .lede {
  margin: 0;
}
.nf__is {
  margin-top: var(--s-5);
  color: var(--muted);
}

/* ---------- hover (pointer devices only) ---------- */
@media (hover: hover) {
  .btn:hover {
    background: var(--volt-pressed);
    box-shadow:
      0 0 0 6px var(--volt-glow),
      0 12px 32px -8px var(--volt-line);
    transform: translateY(-1px);
  }
  .btn--ghost:hover {
    background: rgba(243, 239, 230, 0.06);
    box-shadow: inset 0 0 0 1px var(--text);
  }
  .nav__link:hover,
  .footer a:not(.brand, .lang):hover {
    color: var(--text);
  }
  .lang:hover {
    border-color: var(--text);
  }
  .link:hover,
  .prose a:hover {
    text-decoration-color: var(--volt);
  }
  .seg__tab[aria-selected='false']:hover {
    background: var(--raised-2);
    color: var(--text);
  }
  .toc a:hover {
    color: var(--text);
  }
  .faq:hover {
    background: var(--raised-2);
  }
  .menu__link:hover {
    color: var(--volt);
  }
  .footer:hover .footer__mark {
    -webkit-text-stroke-color: var(--volt-line);
  }
}

/* ---------- reveal (JS adds .js; no JS means everything is visible) ---------- */
[data-reveal] {
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal='fade'] {
  transition-duration: 600ms;
  transition-timing-function: var(--ease-inout);
}
[data-reveal='scale'] {
  transition-duration: 900ms;
  transition-timing-function: var(--ease-expo);
}
.js:not(.reduce) [data-reveal='up']:not(.is-in) {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}
.js:not(.reduce) [data-reveal='fade']:not(.is-in) {
  opacity: 0;
}
.js:not(.reduce) [data-reveal='scale']:not(.is-in) {
  opacity: 0;
  transform: scale(0.94);
}
/* ---------- preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body::after {
    display: none;
  }
}
@media (prefers-contrast: more) {
  :root {
    --rule: var(--control);
  }
}
@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }
  .btn {
    border: 1px solid ButtonText;
  }
}
:lang(is) .prose,
:lang(is) .chapter__text p {
  hyphens: auto;
}
