/* MetaverseXR — soot and lime: a near-black page, one electric accent, white chapters. VR training leads. */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #262626;
  --ink: #ffffff;
  --muted: #9a9a9a;
  --accent: #dafa9c;
  --accent-hover: #e8ffbd;
  --accent-ink: #0f0f0f;

  --font: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --step-head: clamp(2.5rem, 1.2rem + 4.6vw, 6rem);
  --step-display: clamp(3.5rem, 1rem + 13vw, 14rem);
  --step-small: 0.9375rem;

  --margin: clamp(20px, 3vw, 40px);
  --gap: clamp(20px, 2.4vw, 36px);
  --section: clamp(120px, 14vw, 220px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
video { background: var(--surface); }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2 { font-weight: 700; letter-spacing: -0.035em; line-height: 0.95; text-wrap: balance; }
h2 { font-size: var(--step-head); }
h3 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

/* Language switch in the bar */
.lang {
  font-size: var(--step-small); font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1);
  transition: background-color .2s var(--ease);
}
.lang:hover { background: rgba(255, 255, 255, .2); }
.bar nav + .lang { margin-left: 4px; }
@media (max-width: 1024px) { .lang { margin-left: auto; } .bar .lang + .btn-small { margin-left: 0; } }

/* Thai page: Anuphan sets the Thai glyphs beside General Sans. Thai has marks above and below the line,
   so headings get more leading and the masked headline lines more room. */
html[lang="th"] { --font: "General Sans", "Anuphan", "Helvetica Neue", Arial, sans-serif; }
html[lang="th"] body { line-height: 1.7; }
html[lang="th"] h1, html[lang="th"] h2 { line-height: 1.18; letter-spacing: -0.02em; }
html[lang="th"] h3 { line-height: 1.35; letter-spacing: -0.01em; }
html[lang="th"] .lines .line { padding: 0.12em 0 0.16em; margin: -0.12em 0 -0.16em; }
html[lang="th"] .foot-name, html[lang="th"] .num { line-height: 0.9; }

/* White chapters: the same tokens, flipped, so every component works on either ground */
.field-light {
  --bg: #ffffff; --surface: #f1f1f1; --surface-2: #e4e4e4;
  --ink: #0f0f0f; --muted: #5e5e5e;
  --accent: #0f0f0f; --accent-hover: #2a2a2a; --accent-ink: #dafa9c;
  background: var(--bg); color: var(--ink);
}
figcaption { color: var(--muted); font-size: var(--step-small); margin-top: 12px; }
p + p { margin-top: 1em; }

/* Buttons and links */
.btn {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none;
  padding: 17px 30px; border-radius: 999px;
  transition: transform .25s var(--ease), background-color .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-small { padding: 10px 18px; font-size: var(--step-small); }
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s; }
.link:hover { color: var(--accent); }

/* Navigation: a plain bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--gap);
  padding: 16px var(--margin);
  background: var(--bg);
}
.wordmark img { width: 172px; height: auto; }
.bar nav { display: flex; gap: 28px; margin-left: auto; font-size: var(--step-small); }
.bar nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.bar nav a:hover { color: var(--ink); }
/* Over the hero the bar is see-through; it turns solid once the page scrolls past the top */
.bar { transition: background-color .3s var(--ease); }
.bar.is-over { background: transparent; }
.bar.is-over nav a { color: rgba(255, 255, 255, .78); }

/* Hero and simulations share a holder: the hero sticks while the simulations sheet slides over it */
.hold { position: relative; margin-top: calc(-1 * var(--bar-h, 72px)); timeline-scope: --sheet; }

/* Hero: the reel fills the screen behind the headline. A flat scrim keeps the words readable. */
.hero {
  position: sticky; top: 0; z-index: 0;
  height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px var(--gap); align-content: end; align-items: end;
  padding: calc(var(--bar-h, 72px) + 24px) var(--margin) clamp(40px, 7vh, 88px);
  background: #000;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; z-index: 0; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: 0; background: #0f0f0f; opacity: .62; pointer-events: none; }
.hero > :not(.hero__video) { position: relative; z-index: 1; }
/* The longer headline line is about 11.06em wide: size it from the hero width so it stays on two lines */
.hero { container-type: inline-size; }
.hero h1 { grid-column: 1 / -1; font-size: min(calc((100cqi - 2 * var(--margin)) / 11.3), 9rem); line-height: 0.95; letter-spacing: -0.045em; color: #fff; }
.hero h1 .accent { color: var(--accent); }
/* On phones the question is set as four short lines, poster style, so it can stay large */
.br-phone { display: none; }
@media (max-width: 640px) {
  .br-phone { display: inline; }
  .hero h1 { font-size: calc((100cqi - 2 * var(--margin)) / 5.55); line-height: 0.92; }
}
.hero .lead { color: #fff; }
.hero .lead strong { font-weight: 600; }
.lead { font-size: var(--step-lead); line-height: 1.45; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px 28px; }

/* Masked line reveal: each headline line slides up from behind its own baseline */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--i) * 120ms + 150ms); }
}
@keyframes line-up { to { transform: none; } }

/* Sheet over the held hero: an opaque page with its heading at the top edge rises over the reel,
   and the reel behind it settles back and darkens as it is covered. */
.sheet { position: relative; z-index: 2; background: var(--bg); border-radius: 28px 28px 0 0; view-timeline-name: --sheet; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero::after { animation: hero-dim linear both; animation-timeline: --sheet; animation-range: entry 0% entry 100%; }
    .hero__video { animation: hero-settle linear both; animation-timeline: --sheet; animation-range: entry 0% entry 100%; }
    .hero h1, .hero .lead, .hero .hero-actions { animation: hero-lift linear both; animation-timeline: --sheet; animation-range: entry 0% entry 70%; }
  }
}
@keyframes hero-dim { from { opacity: .62; } to { opacity: .9; } }
@keyframes hero-settle { from { transform: none; } to { transform: scale(1.06); } }
@keyframes hero-lift { from { transform: none; opacity: 1; } to { transform: translateY(-8%); opacity: 0; } }


/* Simulations: the live thing and the heart of the page */
.sims { padding: clamp(64px, 8vw, 120px) var(--margin) 0; }
.sims-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap); align-items: end; }
.sims-head p { max-width: 30em; font-size: var(--step-lead); line-height: 1.45; }
.sim-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 48px 0 28px; }
.sim-picker button {
  font: inherit; font-size: 1.0625rem; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 0; border-radius: 999px;
  padding: 14px 22px; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.sim-picker button:hover { background: var(--surface-2); transform: translateY(-2px); }
.sim-picker button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.sim-panels { display: grid; }
.sim-panel {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: calc(var(--gap) * 1.5); align-items: start;
}
.sim-panel + .sim-panel { margin-top: 96px; }
.sim-panel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sim-copy > p { margin-top: 16px; }
/* Past projects inside each industry: pressing one swaps the video beside it */
.sim-copy .ex-label { margin-top: 28px; font-size: var(--step-small); color: var(--muted); }
.ex-list { display: grid; gap: 8px; margin-top: 10px; }
.ex {
  display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 0; border-radius: 16px; padding: 16px 18px;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.ex:hover { background: var(--surface-2); transform: translateX(3px); }
.ex[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ex-name { display: block; font-weight: 600; }
.ex-desc { display: block; margin-top: 4px; font-size: var(--step-small); line-height: 1.5; opacity: .75; }
.sims-more { margin-top: 40px; color: var(--muted); }
.sims-more .link { color: var(--ink); margin-left: 6px; }
/* With script: one panel at a time, stacked in the same cell */
.js .sim-panel { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; }
.js .sim-panel.is-on { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.js .sim-panel video { transform: scale(1.02); transition: transform 1.2s var(--ease); }
.js .sim-panel.is-on video { transform: none; }

/* Why VR */
.why {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: calc(var(--gap) * 2); align-items: start;
  padding: var(--section) var(--margin) 0;
}
.claims { display: grid; grid-template-columns: 1fr 1fr; gap: 48px var(--gap); margin-top: 56px; }
.claims p { margin-top: 10px; max-width: 26em; }
.why-media { position: sticky; top: 96px; }
.why-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: brightness(.9) contrast(1.05); }

/* Pricing: a real table, the middle package on a lighter tone */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pricing { padding: var(--section) var(--margin); }
.pricing-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap); align-items: end; margin-bottom: 48px; }
.pricing-head p { font-size: var(--step-lead); line-height: 1.45; max-width: 30em; }
.table-wrap { overflow-x: auto; }
.swipe-hint { display: none; color: var(--muted); font-size: var(--step-small); margin-bottom: 12px; }
.price-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.price-table th, .price-table td { padding: 14px 20px; text-align: left; vertical-align: top; }
.price-table thead th { padding-top: 28px; padding-bottom: 28px; vertical-align: bottom; }
.price-table tbody th { font-weight: 400; color: var(--muted); width: 34%; }
.price-table tbody tr + tr > * { border-top: 1px solid var(--surface-2); }
.price-table .pick { background: var(--surface); }
.pack { display: block; font-size: 1.25rem; font-weight: 500; }
.price { display: block; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; }
.for { display: block; font-weight: 400; color: var(--muted); font-size: var(--step-small); margin-top: 10px; max-width: 18em; }
.price-table tfoot td { padding-top: 28px; padding-bottom: 28px; }
.addons { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); margin-top: 72px; align-items: start; }
.addons dl { display: grid; gap: 4px; }
.addons dl div { display: flex; justify-content: space-between; gap: 16px; background: var(--surface); padding: 14px 20px; }
.addons dd { white-space: nowrap; }

/* Package finder */
.finder {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gap) calc(var(--gap) * 2);
  margin-top: 96px; padding: clamp(32px, 4vw, 56px);
  background: var(--surface);
}
.finder-intro { grid-column: 1 / -1; }
.finder-intro h3 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 300; letter-spacing: -0.03em; }
.finder-intro p { margin-top: 10px; font-size: var(--step-lead); line-height: 1.45; max-width: 32em; }
.finder-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.finder-form fieldset + fieldset { margin-top: 32px; }
.finder-form legend { padding: 0; margin-bottom: 12px; font-size: 1.125rem; font-weight: 500; }
.finder-form label { position: relative; cursor: pointer; }
.finder-form input { position: absolute; opacity: 0; pointer-events: none; }
.finder-form label span {
  display: block; padding: 12px 18px; background: var(--surface-2);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.finder-form label:hover span { transform: translateY(-2px); background: #232b3e; }
.finder-form input:checked + span { background: var(--ink); color: var(--bg); }
.finder-form input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.finder-result { background: var(--bg); padding: 28px 30px 32px; align-self: start; position: sticky; top: 96px; }
.finder-wait { color: var(--muted); }
.finder-label { color: var(--muted); font-size: var(--step-small); }
.finder-pack { font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); font-weight: 300; letter-spacing: -0.035em; line-height: 1.05; margin-top: 4px; }
.finder-price { font-size: 1.375rem; margin-top: 6px; }
.finder-why { margin-top: 18px; display: grid; gap: 6px; }
.finder-why li { padding-left: 18px; position: relative; }
.finder-why li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.finder-total { margin-top: 18px; color: var(--muted); font-size: var(--step-small); }
.finder-pick .btn { margin-top: 24px; }
.finder-contact { margin-top: 18px; }
.finder-contact li { padding: 4px 0; }
.finder-reset { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.finder-pick.is-new { animation: settle .5s var(--ease); }
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* The finder needs script; without it the table above still answers the question */
.finder { display: none; }
.js .finder { display: grid; }

/* The business case: a lime chapter of research figures, each with its source */
.field-lime {
  --bg: #dafa9c; --surface: #cdef86; --surface-2: #c2e57a;
  --ink: #0f0f0f; --muted: #3e4a26;
  --accent: #0f0f0f; --accent-hover: #2a2a2a; --accent-ink: #dafa9c;
  background: var(--bg); color: var(--ink);
}
.case { padding: var(--section) var(--margin); }
.case-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap); align-items: end; }
.case-head p { font-size: var(--step-lead); line-height: 1.45; max-width: 30em; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px var(--gap); margin-top: clamp(56px, 7vw, 104px); }
.num { font-size: clamp(4.5rem, 2rem + 7vw, 9.5rem); font-weight: 700; letter-spacing: -0.05em; line-height: 0.85; font-variant-numeric: tabular-nums; }
.stats h3 { margin-top: 20px; font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }
.stats p:not(.num):not(.src) { margin-top: 10px; }
.src { margin-top: 14px; font-size: var(--step-small); color: var(--muted); }
.src a { text-underline-offset: 3px; }
.src a:hover { color: var(--ink); }
.case-safety {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px var(--gap); align-items: start;
  margin-top: clamp(64px, 8vw, 120px); padding: clamp(28px, 3vw, 44px); background: var(--ink); color: var(--bg); border-radius: 24px;
}
.case-safety h3 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.case-safety p { font-size: var(--step-lead); line-height: 1.45; max-width: 36em; }
.case-safety .src { grid-column: 2; font-size: var(--step-small); color: #b9c99a; margin-top: 0; }
.case-safety .src a:hover { color: var(--bg); }

/* Clients: two rows of logos drifting in opposite directions. Each row holds the list twice,
   so moving by exactly one list width (-50%) loops without a seam. */
.clients { padding: var(--section) 0; overflow: hidden; }
.clients-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap); align-items: end; padding: 0 var(--margin); margin-bottom: clamp(48px, 6vw, 88px); }
.clients-head p { font-size: var(--step-lead); line-height: 1.45; max-width: 30em; }
.marquee { display: flex; width: max-content; }
.marquee + .marquee { margin-top: 16px; }
.marquee__track { display: flex; gap: 16px; padding-right: 16px; }
.marquee__track li { overflow: hidden;
  flex: none; width: clamp(150px, 14vw, 200px); height: clamp(84px, 7.5vw, 104px);
  display: grid; place-items: center; padding: 14px 22px;
  background: var(--surface); border-radius: 18px;
}
/* A fixed height, not a percentage: percentages do not resolve inside the grid cell */
.marquee__track img { width: auto; height: auto; max-width: 100%; max-height: clamp(48px, 4.4vw, 64px); object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .marquee { animation: marquee 70s linear infinite; }
  .marquee--reverse { animation-direction: reverse; animation-duration: 80s; }
  .marquee:hover { animation-play-state: paused; }
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Still: one wrapped grid, the repeated copy hidden */
@media (prefers-reduced-motion: reduce) {
  .marquee { width: auto; flex-wrap: wrap; padding: 0 var(--margin); }
  .marquee__track { flex-wrap: wrap; padding-right: 0; }
  .marquee__track[aria-hidden="true"] { display: none; }
}

/* Hardware: a lighter field */
.hardware {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: calc(var(--gap) * 2); align-items: center;
  margin-top: 0;
  padding: clamp(80px, 9vw, 140px) var(--margin);
  background: var(--surface);
}
.hw-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.hw-text > p { margin-top: 24px; font-size: var(--step-lead); line-height: 1.45; max-width: 32em; }
.hw-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--gap); margin-top: 40px; }
.hw-list dt { font-size: 1.1875rem; font-weight: 500; }
.hw-list dd { margin-top: 6px; }
.hw-video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 40px; }

/* Also from MetaverseXR: a sideways gallery. The base is a native swipe row with snapping;
   on wide screens with motion allowed, script pins the stage and the vertical scroll moves the row. */
.more { padding: var(--section) 0 0; }
.gallery__stage { display: flex; flex-direction: column; gap: 40px; }
.more h2 { padding: 0 var(--margin); }
.gallery__track {
  display: flex; gap: var(--gap); margin: 0; padding: 0 var(--margin) 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--margin); scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__item { flex: 0 0 min(78vw, 26rem); scroll-snap-align: start; }
.more-item {
  display: block; width: 100%; padding: 0; background: none; border: 0; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.more-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; transition: transform .5s var(--ease), filter .3s var(--ease); }
.more-item:hover img { transform: scale(1.03); }
.more-item > span { display: block; padding: 18px 4px 0; }
.more-name { display: block; font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.more-sub { display: block; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.more-open {
  display: inline-block; margin-top: 14px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); font-size: var(--step-small); font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.more-item:hover .more-open { background: var(--accent); color: var(--accent-ink); }
.gallery.is-pinned { padding-top: 0; margin-top: calc(var(--section) - 56px); }
.gallery.is-pinned .gallery__stage { position: sticky; top: 0; height: 100svh; justify-content: center; overflow: clip; padding-top: 56px; }
.gallery.is-pinned .gallery__track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.gallery.is-pinned .gallery__item { flex-basis: calc(min(52svh, 34vw) * 0.8); }

/* Detail popup: one floating panel, the only thing on the page with a shadow */
.detail {
  width: min(1180px, calc(100vw - 2 * var(--margin))); max-height: calc(100svh - 2 * var(--margin));
  padding: 0; border: 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.detail::backdrop { background: rgba(5, 7, 12, .82); }
.detail[open] { animation: detail-in .35s var(--ease); }
@keyframes detail-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.detail-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 0; }
.detail-media { padding: 0 0 20px; min-width: 0; }
.detail-stage { position: relative; height: min(74svh, 720px); background: #000; overflow: hidden; }
/* Pinned to the box so the media always fits whole, whatever its shape */
.detail-stage img, .detail-stage video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; background: #000; }
.detail-caption { color: var(--muted); font-size: var(--step-small); padding: 12px 16px 0; min-height: 2.6em; }
.detail-thumbs { display: flex; gap: 8px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: thin; }
.detail-thumb {
  position: relative; flex: none; width: 112px; height: 70px; padding: 0; border: 0; cursor: pointer;
  background: var(--surface-2); opacity: .55; transition: opacity .2s var(--ease);
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumb:hover, .detail-thumb[aria-current="true"] { opacity: 1; }
.detail-thumb[aria-current="true"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.detail-thumb .tag { position: absolute; left: 6px; bottom: 6px; background: var(--bg); color: var(--ink); font-size: .75rem; padding: 2px 6px; }
.detail-text { padding: clamp(28px, 3vw, 44px); overflow-y: auto; max-height: calc(100svh - 2 * var(--margin)); }
.detail-text h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); padding-right: 64px; }
.detail-text > p { margin-top: 16px; }
.detail-sub { font-size: 1rem; font-weight: 500; margin-top: 28px; }
.detail-list { margin-top: 8px; }
.detail-list li { padding: 8px 0; }
.detail-list li + li { border-top: 1px solid var(--surface-2); }
.detail-cta { margin-top: 28px; }
.detail-alt { margin-top: 14px; color: var(--muted); font-size: var(--step-small); }
.detail-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--bg); color: var(--ink); border: 0; font: inherit; font-size: var(--step-small);
  padding: 10px 14px; cursor: pointer; transition: background-color .2s var(--ease);
}
.detail-close:hover { background: var(--surface-2); }
body.has-detail { overflow: hidden; }

/* Contact */
.contact {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: calc(var(--gap) * 2); align-items: center;
  padding: var(--section) var(--margin);
}
.contact h2 { text-wrap: balance; font-size: clamp(2.25rem, 1rem + 3.4vw, 4.5rem); }
.contact-text p { margin-top: 24px; max-width: 32em; }
.contact-ways { display: grid; gap: 8px; }
.contact-ways a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 26px 28px; background: var(--surface); text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.contact-ways a:hover { background: var(--surface-2); transform: translateX(4px); }
.contact-ways .way { color: var(--muted); }
.contact-ways .val { font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem); font-weight: 300; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.contact-ways a:hover .val { color: var(--accent); }

/* Footer: the name returns, full width */
/* Curtain footer: the page slides up like a sheet and uncovers the footer waiting beneath it */
main { position: relative; z-index: 1; background: var(--bg); }
.foot { container-type: inline-size; position: sticky; bottom: 0; z-index: 0; background: var(--accent); color: var(--accent-ink); padding: 56px var(--margin) 28px; overflow: hidden; }
/* The name is about 5.68em wide in this face: size it from the footer width so it always spans edge to edge */
.foot-name { font-size: calc((100cqi - 2 * var(--margin)) / 5.66); font-weight: 700; letter-spacing: -0.06em; line-height: .85; white-space: nowrap; margin-left: -0.04em; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 40px; font-size: var(--step-small); }
.foot-row p { margin: 0; }
.foot-row a { text-underline-offset: 3px; }

/* Entrances: only with script, content stays visible without it */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1024px) {
  .bar nav { display: none; }
  .bar .btn-small { margin-left: auto; }
  .hero, .sims-head, .sim-panel, .why, .hardware, .contact, .pricing-head, .addons, .js .finder, .case-head, .case-safety, .clients-head { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .case-safety .src { grid-column: 1; }
  .finder-result { position: static; }
  .price-table tbody th, .price-table thead th:first-child, .price-table tfoot th { position: sticky; left: 0; background: var(--bg); z-index: 1; }
  .hero { align-content: end; }
  .hero-actions { justify-content: flex-start; }
  .why-media { position: static; }
  .why-media img { aspect-ratio: 4 / 3; }
  .hw-media img { aspect-ratio: 4 / 3; }

  .detail-body { grid-template-columns: minmax(0, 1fr); }
  .detail { overflow-y: auto; }
  .detail-text { max-height: none; overflow: visible; }
}

/* Phone */
@media (max-width: 640px) {
  .wordmark img { width: 140px; }
  .sim-picker { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--margin) * -1); padding-inline: var(--margin); scrollbar-width: none; }
  .sim-picker button { flex: none; }
  .claims, .hw-list, .stats { grid-template-columns: 1fr; }
  .price-table { min-width: 640px; }
  .swipe-hint { display: block; }
  .price-table th, .price-table td { padding: 12px 14px; }
  .price-table tbody th { width: 150px; min-width: 150px; }
  .addons dl div { flex-direction: column; gap: 2px; }


  .detail { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0; }
  .detail-stage { height: auto; aspect-ratio: 4 / 3; }
  .detail-stage.is-tall { aspect-ratio: auto; height: 72svh; }
  .detail-thumb { width: 88px; height: 56px; }
  /* The body scrolls inside a fixed frame, so Close stays in the corner */
  .detail { overflow: hidden; }
  .detail-body { height: 100%; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise] { transform: none; transition: opacity .3s linear; }
  .js .sim-panel video, .btn, .sim-picker button, .finder-form label span { transform: none !important; transition: none; }
  .finder-pick.is-new, .detail[open] { animation: none; }
}
.price .from { font-size: 1rem; letter-spacing: 0; color: var(--muted); margin-right: 4px; }
