/* ==========================================================
   Oviwo Sneaker v2 — "Hi-vis performance lab"
   The shoe is presented as a lab test report / race-day data sheet:
   white sheets, visible cell lines with corner ticks, tiny tracked
   labels, tabular numbers. Hi-vis yellow marks what is live or active,
   on light surfaces only; signal orange is kept for warnings.
   ========================================================== */
:root {
  /* Palette */
  --white: #FFFFFF;     /* lab white: the sheet */
  --grey: #EEF0F2;      /* cool grey: track / rig room */
  --graphite: #15171A;  /* ink, lines, the heavy weight */
  --volt: #E5F52A;      /* hi-vis yellow: live / active / primary */
  --signal: #FF4D1A;    /* signal orange: warnings only */
  --rig: #E6E6E5;       /* the photo-booth grey of the 360° frames, so the canvas edge disappears */

  --muted: #565C64;     /* 6.6:1 on white — body copy secondary */
  --line: rgba(21, 23, 26, .16);
  --line-2: rgba(21, 23, 26, .32);

  /* English: Manrope throughout. Thai overrides --f-head/--f-body below.
     --f-num stays Manrope in both languages: numbers are data. */
  --f-num: "Manrope", system-ui, sans-serif;
  --f-head: "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;

  --gutter: clamp(16px, 3.6vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pill-h: 54px;
}
/* Thai: IBM Plex Sans Thai for headings, Google Sans for everything else. */
:root:lang(th) {
  --f-head: "IBM Plex Sans Thai", "Google Sans", sans-serif;
  --f-body: "Google Sans", "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--white);
  color: var(--graphite);
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:root:lang(th) body { line-height: 1.7; font-weight: 400; }
body.is-loading { overflow: hidden; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; }
p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--volt); color: var(--graphite); }
:focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; box-shadow: 0 0 0 6px var(--volt); border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Type system ---------- */
/* Tiny tracked uppercase labels — the voice of the data sheet. */
.lbl {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
/* Thai has no case and must not be tracked; give it a touch more size. */
:root:lang(th) .lbl { font-size: 13px; letter-spacing: 0; font-weight: 600; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Headlines: very thin body, very heavy accent (<strong>). */
.display {
  font-weight: 200;
  font-size: clamp(40px, 6.2vw, 100px);
  line-height: .94;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.display strong { font-weight: 800; }
:root:lang(th) .display {
  font-weight: 300;
  font-size: clamp(36px, 5.2vw, 84px);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
:root:lang(th) .display strong { font-weight: 600; }

/* Corner ticks — the "+" registration marks of a technical sheet (palaraiffeisen).
   Drawn by a pseudo-element just outside the box, so the box itself can still clip. */
.tk { position: relative; }
.tk::after {
  --c: var(--graphite);
  --a: 11px;
  content: "";
  position: absolute;
  inset: -5px;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(var(--c), var(--c)) 0 5px / var(--a) 1px,
    linear-gradient(var(--c), var(--c)) 5px 0 / 1px var(--a),
    linear-gradient(var(--c), var(--c)) 100% 5px / var(--a) 1px,
    linear-gradient(var(--c), var(--c)) calc(100% - 5px) 0 / 1px var(--a),
    linear-gradient(var(--c), var(--c)) 0 calc(100% - 5px) / var(--a) 1px,
    linear-gradient(var(--c), var(--c)) 5px 100% / 1px var(--a),
    linear-gradient(var(--c), var(--c)) 100% calc(100% - 5px) / var(--a) 1px,
    linear-gradient(var(--c), var(--c)) calc(100% - 5px) 100% / 1px var(--a);
  background-repeat: no-repeat;
}

/* Section header strip: label left, reference right, heavy rule on top. */
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 2px solid var(--graphite);
  padding: 10px 0 0;
  margin-bottom: clamp(28px, 4vw, 56px);
}
.sec-head .num { color: var(--muted); }

.rec { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 1px; animation: rec 1.6s steps(1) infinite; }
@keyframes rec { 50% { opacity: .25; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 0 10px 0 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
:root:lang(th) .btn { letter-spacing: 0; font-size: 16px; font-weight: 600; }
.btn i {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-style: normal; font-weight: 700; font-size: 16px;
  background: var(--graphite); color: var(--volt);
  transition: transform .35s var(--ease);
}
.btn:hover i { transform: translateX(3px) rotate(-8deg); }
.btn--volt { background: var(--volt); color: var(--graphite); box-shadow: inset 0 0 0 1.5px var(--graphite); }
.btn--volt:hover { background: var(--graphite); color: var(--volt); }
.btn--volt:hover i { background: var(--volt); color: var(--graphite); }
.btn--line { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.btn--line i { background: transparent; color: var(--graphite); box-shadow: inset 0 0 0 1.5px var(--graphite); }
.btn--line:hover { background: var(--grey); }
.btn--full { width: 100%; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 200;
  padding: 12px 18px; background: var(--volt); color: var(--graphite); font-weight: 800;
  border-radius: 999px; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ==========================================================
   PRELOADER — the rig loads its 121 frames
   ========================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 25% 100%,
    var(--white);
}
.preloader__inner { width: min(420px, 80vw); }
.preloader__num { font-weight: 800; font-size: clamp(80px, 16vw, 168px); line-height: 1; letter-spacing: -.05em; margin: 10px 0 14px; }
.preloader__num small { font-weight: 200; font-size: .4em; letter-spacing: 0; margin-left: 6px; }
.preloader__bar { height: 10px; border: 1.5px solid var(--graphite); border-radius: 99px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; background: var(--volt); transform-origin: left; transform: scaleX(0); }
.preloader__frames { margin-top: 12px; color: var(--muted); }

/* ==========================================================
   TOP BAR — full nav as underlined columns (signal-a)
   ========================================================== */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: clamp(16px, 2.4vw, 40px);
  padding: 16px var(--gutter) 0;
}
.topbar__logo { font-family: var(--f-num); font-weight: 800; font-size: 20px; letter-spacing: -.02em; padding-bottom: 8px; border-bottom: 2px solid var(--graphite); }
.topbar__logo sup { font-size: 9px; font-weight: 500; }
.topbar__links { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.6vw, 24px); }
.topbar__links a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--graphite);
  font-size: 13px; font-weight: 700;
  transition: border-color .25s, box-shadow .25s;
}
.topbar__links a .num { font-size: 11px; font-weight: 500; color: var(--muted); }
.topbar__links a:hover, .topbar__links a.is-active { box-shadow: inset 0 -4px 0 var(--volt); }
.topbar__tools { display: flex; gap: 10px; align-items: center; padding-bottom: 4px; }
.topbar__report { display: none; }

.lang { display: inline-flex; border: 1.5px solid var(--graphite); border-radius: 999px; padding: 2px; }
.lang button { min-width: 40px; height: 38px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.lang button[aria-pressed="true"] { background: var(--graphite); color: var(--volt); }

.cart { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--graphite); }
.cart__count {
  position: absolute; top: -4px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px;
  display: grid; place-items: center;
  background: var(--graphite); color: var(--volt); font-size: 11px; font-weight: 800;
}

/* ==========================================================
   PILL — compact nav (hidokmeh's small bright pill)
   ========================================================== */
.pill {
  position: fixed; top: 14px; left: 50%; z-index: 80;
  display: flex; align-items: center; gap: 4px;
  height: var(--pill-h);
  padding: 5px;
  background: var(--volt);
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px var(--graphite), 0 10px 30px rgba(21, 23, 26, .16);
  visibility: hidden;
  opacity: 0;
}
.pill__logo { font-family: var(--f-num); font-weight: 800; font-size: 15px; letter-spacing: -.01em; padding: 0 12px 0 14px; height: 44px; display: grid; place-items: center; }
.pill__sec { padding: 0 14px; border-left: 1.5px solid var(--graphite); white-space: nowrap; min-width: 112px; }
.pill__menu {
  display: inline-flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 16px 0 18px; border-radius: 999px;
  background: var(--graphite); color: var(--volt);
  font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
:root:lang(th) .pill__menu { letter-spacing: 0; font-size: 15px; font-weight: 600; }
.burger { display: grid; gap: 5px; width: 16px; }
.burger b { display: block; height: 2px; background: currentColor; transition: transform .35s var(--ease); }
.pill__menu[aria-expanded="true"] .burger b:first-child { transform: translateY(3.5px) rotate(45deg); }
.pill__menu[aria-expanded="true"] .burger b:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.lang--pill { border-color: transparent; padding: 0; }
.lang--pill button { min-width: 38px; height: 44px; }
.cart--pill { box-shadow: inset 0 0 0 1.5px var(--graphite); }

/* ---------- Full-screen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--gutter) 40px;
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) var(--gutter) 0 / calc((100% - 2 * var(--gutter)) / 4) 100%,
    var(--white);
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
}
.menu__links li { border-top: 1px solid var(--graphite); overflow: hidden; }
.menu__links li:last-child { border-bottom: 1px solid var(--graphite); }
.menu__links a { display: flex; align-items: baseline; gap: clamp(16px, 3vw, 40px); padding: clamp(10px, 1.6vh, 18px) 0; }
.menu__links .num { font-weight: 200; font-size: clamp(22px, 3vw, 40px); width: 2.2em; }
.menu__t { font-family: var(--f-head); font-weight: 800; font-size: clamp(44px, 8vw, 116px); line-height: 1; letter-spacing: -.045em; text-transform: uppercase; }
:root:lang(th) .menu__t { font-weight: 600; letter-spacing: 0; line-height: 1.25; }
.menu__links a:hover .menu__t, .menu__links a.is-active .menu__t { background: linear-gradient(var(--volt), var(--volt)) 0 88% / 100% .32em no-repeat; }
.menu__foot { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; font-weight: 700; }
.menu__foot a { min-height: 44px; display: inline-flex; align-items: center; }
.menu__foot .lbl { margin-left: auto; align-self: center; }

/* ==========================================================
   HERO — report cover: headline, field video, stopwatch, data row
   ========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 108px var(--gutter) 0;
}
.hero__grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: 18px;
  padding-bottom: 24px;
}
.hero__copy { grid-row: 1 / span 2; display: flex; flex-direction: column; justify-content: flex-end; }
.hero__eyebrow { margin-bottom: auto; padding-top: 6px; }
.hero__title {
  font-family: var(--f-num); /* the slogan is English in both languages */
  font-size: clamp(76px, 12.6vw, 208px);
  line-height: .84;
  letter-spacing: -.055em;
  text-transform: uppercase;
  margin: 28px 0 28px -.04em;
}
.hero__line { display: block; overflow: hidden; padding: .04em 0; }
.hero__line--b { font-weight: 800; }
.hero__line--t { font-weight: 200; }
.hero__sub { max-width: 44ch; font-size: clamp(16px, 1.25vw, 19px); color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero__video { align-self: stretch; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.hero__video-box { position: relative; flex: 1; min-height: 220px; }
.hero__video-box .media { position: absolute; inset: 0; background: var(--rig); }
.hero__video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* A camera reticle over the field footage. */
.hero__cross { position: absolute; z-index: 2; left: 50%; top: 50%; width: 46px; height: 46px; translate: -50% -50%; opacity: .85; }
.hero__cross::before, .hero__cross::after { content: ""; position: absolute; background: var(--volt); }
.hero__cross::before { left: 0; right: 0; top: 50%; height: 1.5px; }
.hero__cross::after { top: 0; bottom: 0; left: 50%; width: 1.5px; }
.hero__video figcaption { display: flex; align-items: center; color: var(--muted); }

/* Stopwatch — a yellow split-time card. */
.watch {
  background: var(--volt);
  padding: 16px 18px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "head head" "time time" "row splits";
  column-gap: 20px;
}
.watch__head { grid-area: head; display: flex; justify-content: space-between; gap: 12px; }
.watch__time { grid-area: time; font-weight: 800; font-size: clamp(44px, 5.4vw, 84px); line-height: 1; letter-spacing: -.04em; margin: 8px 0 12px; }
.watch__time small { font-weight: 200; font-size: .5em; letter-spacing: -.02em; }
.watch__row { grid-area: row; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: end; border-top: 1.5px solid var(--graphite); padding-top: 8px; }
.watch__row dd { font-weight: 800; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.1; margin-top: 2px; }
.watch__splits { grid-area: splits; border-top: 1.5px solid var(--graphite); padding-top: 6px; min-width: 140px; }
.watch__splits li { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; font-weight: 700; padding: 1px 0; opacity: .35; transition: opacity .3s; }
.watch__splits li.is-done { opacity: 1; }

.hero__data { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--graphite); }
.hero__data li { padding: 10px 16px 16px 0; display: grid; gap: 4px; }
.hero__data li + li { border-left: 1px solid var(--line-2); padding-left: 16px; }
.hero__data b { font-weight: 800; font-size: clamp(22px, 2.4vw, 38px); line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; }

/* ==========================================================
   LAUNCH — start protocol collage (b/w + colour + yellow)
   ========================================================== */
.launch { padding: clamp(72px, 10vw, 140px) var(--gutter) 0; }
.launch__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  height: clamp(420px, 62vw, 760px);
}
.launch__main { grid-row: 1 / span 2; }
.media { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--grey); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.launch__main img { object-position: 58% 50%; }
.launch__mono img { filter: grayscale(1) contrast(1.15); object-position: 60% 88%; transform: scale(1.6); transform-origin: 56% 86%; }
.launch__start {
  background: var(--volt);
  padding: clamp(14px, 1.6vw, 24px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.lights { display: flex; gap: 10px; }
.lights i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--graphite); background: transparent; }
.lights i.is-on { background: var(--graphite); }
.launch__words { font-family: var(--f-num); text-transform: uppercase; line-height: .9; letter-spacing: -.05em; font-size: clamp(30px, 4.6vw, 76px); display: grid; }
.launch__words span { font-weight: 200; }
.launch__words strong { font-weight: 800; }
.launch__caption { margin-top: clamp(28px, 4vw, 56px); max-width: 16ch; }

/* ==========================================================
   RIG — pinned 360° test rig (signature)
   ========================================================== */
.rig { background: var(--grey); margin-top: clamp(80px, 10vw, 140px); }
.rig__stage {
  position: relative;
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 88px var(--gutter) 28px;
  overflow: hidden;
}
.rig__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 32px;
}
.rig__title { font-size: clamp(34px, 3.8vw, 60px); margin-top: 8px; }
:root:lang(th) .rig__title { font-size: clamp(30px, 3.2vw, 50px); }
.rig__meters { display: flex; }
.meter { display: grid; gap: 4px; padding: 0 0 2px 18px; margin-left: 18px; border-left: 1px solid var(--line-2); min-width: 104px; }
.meter b { font-weight: 800; font-size: clamp(22px, 2.4vw, 36px); line-height: 1; letter-spacing: -.03em; }
.meter b small { font-weight: 200; font-size: .5em; letter-spacing: 0; }
.rig__progress { grid-column: 1 / -1; height: 4px; background: var(--white); position: relative; }
.rig__progress i { position: absolute; inset: 0; background: var(--graphite); transform-origin: left; transform: scaleX(0); }
.rig__progress::after { /* quarter ticks: 90°, 180°, 270° */
  content: ""; position: absolute; inset: -4px 0;
  background: linear-gradient(90deg, transparent calc(25% - 1px), var(--graphite) 0 25%, transparent 0 calc(50% - 1px), var(--graphite) 0 50%, transparent 0 calc(75% - 1px), var(--graphite) 0 75%, transparent 0);
}

.rig__body {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr) minmax(200px, 1fr);
  gap: clamp(20px, 2.6vw, 44px);
  min-height: 0;
}
.rig__col { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; position: relative; z-index: 2; }
.rig__col--l { text-align: right; }
.rig__col--l .ro__head { justify-content: flex-end; }

.rig__chamber { background: var(--rig); min-height: 0; }
/* Graph-paper glass over the turntable: a measuring backdrop, kept faint. */
.rig__chamber::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) center / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) center / 40px 40px;
  opacity: .45;
}
.rig__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rig__table { position: absolute; z-index: 2; color: var(--graphite); overflow: visible; pointer-events: none; }
.rig__table circle { fill: var(--volt); stroke: var(--graphite); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rig__ruler { /* millimetre ruler along the chamber floor */
  position: absolute; left: 0; right: 0; bottom: 0; height: 12px; z-index: 2;
  background:
    linear-gradient(90deg, var(--graphite) 1px, transparent 1px) 0 100% / 50px 12px repeat-x,
    linear-gradient(90deg, var(--graphite) 1px, transparent 1px) 0 100% / 10px 6px repeat-x;
  opacity: .55;
}
.rig__hint { position: absolute; z-index: 2; left: 14px; top: 12px; color: var(--muted); }

.ro { padding: 12px 0 0; border-top: 1px solid var(--line-2); transition: border-color .3s; }
.ro__head { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.ro__code { padding: 2px 6px; border: 1px solid currentColor; border-radius: 99px; font-size: 10px; letter-spacing: .08em; }
.ro__val { display: block; font-weight: 800; font-size: clamp(20px, 1.9vw, 30px); line-height: 1.1; letter-spacing: -.03em; margin: 6px 0 4px; white-space: nowrap; }
.ro__note { font-size: 13px; line-height: 1.45; color: var(--muted); }
:root:lang(th) .ro__note { font-size: 14px; line-height: 1.6; }
.ro.is-on { border-top-color: var(--graphite); }
.ro.is-on .ro__head { color: var(--graphite); }
.ro.is-on .ro__code { background: var(--volt); border-color: var(--graphite); }

.rig__leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.rig__leaders path { fill: none; stroke: var(--graphite); stroke-width: 1.25; }
.rig__leaders .dot-ring { fill: var(--volt); stroke: var(--graphite); stroke-width: 1.25; }
.rig__leaders .dot { fill: var(--graphite); }

/* ==========================================================
   BUY — order sheet
   ========================================================== */
.buy { padding: clamp(80px, 10vw, 140px) var(--gutter) 0; }
.buy__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.buy__gallery { position: sticky; top: 90px; }
.buy__main { aspect-ratio: 16 / 9; } /* the product photos are 16:9 — no letterbox bands */
.buy__main .media { background: var(--rig); }
.buy__main img { object-fit: contain; }
.buy__view { position: absolute; left: 14px; top: 12px; z-index: 2; padding: 4px 10px; background: var(--white); border-radius: 99px; }
.buy__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--rig); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.thumb:hover img { transform: scale(1.06); }
.thumb span { position: absolute; left: 8px; top: 6px; color: var(--muted); }
.thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--volt); box-shadow: 0 -1.5px 0 var(--graphite); transform: scaleY(0); transform-origin: bottom; transition: transform .3s var(--ease); }
.thumb.is-active { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.thumb.is-active::after { transform: none; }

.buy__info { display: grid; gap: 20px; }
.buy__name { font-size: clamp(40px, 4.8vw, 76px); }
:root:lang(th) .buy__name { font-size: clamp(36px, 4.4vw, 68px); }
.buy__short { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .06em .02em; }
.js-color-short { display: inline-block; }
.buy__rating { font-size: 14px; color: var(--muted); }
.stars { color: var(--graphite); letter-spacing: .1em; }
.buy__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 12px 0; border-top: 2px solid var(--graphite); border-bottom: 1px solid var(--line-2); }
.buy__price b { font-weight: 800; font-size: clamp(36px, 3.6vw, 52px); line-height: 1; letter-spacing: -.04em; }
.buy__price s { color: var(--muted); font-weight: 500; }
.tag { padding: 4px 10px; border-radius: 99px; background: var(--volt); box-shadow: inset 0 0 0 1.5px var(--graphite); font-size: 12px; font-weight: 800; }
.buy__desc { color: var(--muted); }
.buy__label { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.buy__label .lbl:nth-child(2) { color: var(--muted); }
.buy__guide { margin-left: auto; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.buy__err { display: none; padding: 3px 10px; border-radius: 99px; background: var(--signal); color: var(--graphite) !important; }
.swatches { display: flex; gap: 12px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); transition: box-shadow .25s; }
.swatch.is-active { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--graphite), 0 0 0 9px var(--volt); }
.sizes { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--graphite); }
.size { height: 52px; font-weight: 800; font-size: 15px; transition: background-color .2s, color .2s; }
.size + .size { border-left: 1px solid var(--line-2); }
.size:hover:not(:disabled) { background: var(--grey); }
.size.is-active { background: var(--graphite); color: var(--volt); }
.size:disabled { color: var(--muted); cursor: not-allowed; background: linear-gradient(to top right, transparent calc(50% - .75px), var(--line-2) 0 calc(50% + .75px), transparent 0); }
.sizes.is-error { border-color: var(--signal); box-shadow: 0 0 0 2px var(--signal); }
.buy__block:has(.sizes.is-error) .buy__err { display: inline-block; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--graphite); }
.specs li { padding: 10px 0 0; display: grid; gap: 2px; }
.specs li + li { border-left: 1px solid var(--line-2); padding-left: 14px; }
.specs b { font-weight: 800; font-size: clamp(26px, 2.4vw, 36px); letter-spacing: -.03em; line-height: 1.1; }
.specs small { font-weight: 200; font-size: .55em; }

/* ==========================================================
   RESULTS — pace / energy chart
   ========================================================== */
.results { padding: clamp(96px, 12vw, 180px) var(--gutter) 0; }
.results__intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 56px); }
.results__lead { color: var(--muted); max-width: 44ch; }
.chart { background: var(--grey); padding: clamp(14px, 2vw, 28px); }
.chart__legend { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; margin-bottom: 12px; }
.chart__key { display: inline-flex; align-items: center; gap: 8px; }
.chart__key::before { content: ""; width: 26px; height: 3px; background: var(--graphite); }
.chart__key--energy::before { height: 12px; background: var(--volt); box-shadow: inset 0 0 0 1.5px var(--graphite); }
.chart__note { margin-left: auto; color: var(--muted); }
.chart__box { position: relative; height: clamp(260px, 30vw, 420px); }
.chart__svg { width: 100%; height: 100%; overflow: visible; }
.chart__svg text { font-family: var(--f-num); font-size: 11px; font-weight: 700; fill: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.chart__svg .grid { stroke: var(--line); stroke-width: 1; }
.chart__svg .zero { stroke: var(--graphite); stroke-width: 1.5; }
.chart__svg .pace { fill: none; stroke: var(--graphite); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__svg .energy { fill: var(--volt); stroke: var(--graphite); stroke-width: 1.25; }
.chart__svg .mark line { stroke: var(--graphite); stroke-width: 1; stroke-dasharray: 3 4; }
.chart__svg .mark circle { fill: var(--white); stroke: var(--graphite); stroke-width: 2; }
.chart__svg .mark rect { fill: var(--graphite); }
.chart__svg .mark text { fill: var(--volt); font-weight: 800; }
.chart__svg .mark .k { fill: var(--graphite); }
.results__cells { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--graphite); margin-top: 14px; }
.results__cells li { padding: 10px 16px 0 0; display: grid; gap: 4px; }
.results__cells li + li { border-left: 1px solid var(--line-2); padding-left: 16px; }
.results__cells b { font-weight: 800; font-size: clamp(32px, 4.4vw, 72px); letter-spacing: -.045em; line-height: 1; }
.results__cells small { font-weight: 200; font-size: .42em; letter-spacing: 0; }

/* ==========================================================
   SERVICE — lanes where the cards race in
   ========================================================== */
.service { background: var(--grey); margin-top: clamp(96px, 12vw, 180px); padding: clamp(28px, 4vw, 48px) var(--gutter) clamp(72px, 9vw, 120px); }
.service__intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.service__lead { color: var(--muted); max-width: 40ch; }
.lanes { border-bottom: 2px solid var(--graphite); }
.lane { display: grid; grid-template-columns: clamp(72px, 9vw, 130px) minmax(0, 1fr); border-top: 2px solid var(--graphite); }
.lane__no { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 0 14px; border-right: 1px solid var(--line-2); }
.lane__no b { font-weight: 800; font-size: clamp(48px, 6vw, 96px); line-height: .8; letter-spacing: -.05em; }
.lane__track {
  position: relative; overflow: hidden;
  padding: 16px 44px 16px 0;
  /* lane line + start/finish: chequered finish strip on the right edge */
  background:
    repeating-conic-gradient(var(--graphite) 0 25%, var(--white) 0 50%) right 0 top 0 / 16px 16px,
    linear-gradient(90deg, transparent 0 calc(100% - 16px), var(--white) 0) ;
  background-repeat: repeat-y, no-repeat;
}
.lane__track::before { content: ""; position: absolute; left: 0; right: 16px; top: 50%; border-top: 1px dashed var(--line-2); }
.lane__card {
  position: relative; z-index: 1;
  width: min(640px, 72%);
  margin-left: auto;
  display: grid;
  grid-template-columns: clamp(110px, 12vw, 170px) minmax(0, 1fr);
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line-2);
}
.lane__fig { background: var(--volt); padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; box-shadow: 1px 0 0 var(--graphite); }
.lane__fig b { font-weight: 800; font-size: clamp(34px, 3.6vw, 56px); line-height: .95; letter-spacing: -.05em; }
.lane__text { padding: 14px 18px 16px; display: grid; gap: 6px; align-content: start; }
.lane__icon { width: 30px; height: 30px; }
.lane__text h3 { font-size: clamp(18px, 1.6vw, 22px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
:root:lang(th) .lane__text h3 { font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.lane__text p { font-size: 14px; color: var(--muted); line-height: 1.5; }
:root:lang(th) .lane__text p { font-size: 15px; line-height: 1.65; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 7vw, 96px); background: var(--white); }
.stats li { padding: clamp(16px, 2vw, 28px); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: clamp(150px, 16vw, 230px); box-shadow: inset 0 0 0 .5px var(--line-2); }
.stats b { font-weight: 800; font-size: clamp(56px, 8.4vw, 136px); line-height: .85; letter-spacing: -.055em; }
.stats small { font-weight: 200; font-size: .36em; letter-spacing: -.02em; margin-left: 4px; }
:root:lang(th) .stats small { font-family: var(--f-head); font-weight: 300; letter-spacing: 0; }

/* ==========================================================
   CONTACT
   ========================================================== */
.contact { padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(80px, 10vw, 140px); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact__lead { color: var(--muted); max-width: 40ch; margin: 22px 0 28px; }
.contact__list > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); align-items: baseline; }
.contact__list > div:last-child { border-bottom: 1px solid var(--line-2); }
.contact__list dt { color: var(--muted); }
.contact__list dd { font-weight: 700; }
.contact__list a { display: inline-flex; min-height: 32px; align-items: center; }
.contact__list a:hover { box-shadow: inset 0 -6px 0 var(--volt); }
.socials { display: flex; gap: 8px; }
.socials a { width: 44px; height: 44px; justify-content: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--graphite); font-size: 12px; font-weight: 800; }
.socials a:hover { background: var(--volt); box-shadow: inset 0 0 0 1.5px var(--graphite); }

.form { background: var(--grey); padding: clamp(18px, 2.4vw, 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; font-weight: 600; color: var(--graphite);
  background: var(--white); border: 1px solid var(--line-2); border-radius: 0;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.field select { background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2315171A' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--graphite); box-shadow: 0 0 0 3px var(--volt), 0 0 0 4.5px var(--graphite); }
.field.is-error input, .field.is-error textarea { border-color: var(--signal); box-shadow: inset 4px 0 0 var(--signal); }
.field.is-error label::after { content: " ●"; color: var(--signal); }
.form .btn { grid-column: 1 / -1; }
.form__note { grid-column: 1 / -1; min-height: 1.5em; font-weight: 700; }
.form__note.is-ok { padding: 10px 14px; background: var(--volt); box-shadow: inset 0 0 0 1.5px var(--graphite); }
.form__note.is-bad { padding: 10px 14px; background: var(--white); box-shadow: inset 4px 0 0 var(--signal), inset 0 0 0 1px var(--line-2); }

/* ==========================================================
   FOOTER — alternating-weight marquee (signal-a)
   ========================================================== */
.footer { border-top: 2px solid var(--graphite); overflow: hidden; }
.footer__marquee { padding: clamp(16px, 2vw, 28px) 0; }
.footer__track { display: flex; width: max-content; align-items: baseline; }
.footer__track span { font-family: var(--f-num); font-size: clamp(64px, 11vw, 180px); line-height: 1; letter-spacing: -.05em; padding: 0 .22em; white-space: nowrap; text-transform: uppercase; }
.footer__track .t { font-weight: 200; }
.footer__track .b { font-weight: 800; }
.footer__track .b:nth-of-type(4n + 2) { background: var(--volt); }
.footer__row { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding: 16px var(--gutter) 22px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); }
.footer__row a { color: var(--graphite); min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  max-width: min(92vw, 520px);
  padding: 14px 20px;
  background: var(--graphite); color: var(--white);
  border-radius: 14px;
  font-weight: 700; font-size: 15px;
  box-shadow: inset 6px 0 0 var(--volt), 0 12px 30px rgba(21, 23, 26, .25);
  visibility: hidden; opacity: 0;
}
.toast.is-warn { box-shadow: inset 6px 0 0 var(--signal), 0 12px 30px rgba(21, 23, 26, .25); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (min-width: 1440px) {
  .rig__body { grid-template-columns: 270px minmax(0, 1fr) 270px; }
}

/* Tablet & small laptop: the rig stacks (readouts listed under the shoe). */
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .hero__copy { grid-column: 1 / -1; grid-row: auto; }
  .hero__title { font-size: clamp(76px, 17vw, 168px); margin: 36px 0 24px; }
  .hero__video-box { min-height: 0; aspect-ratio: 4 / 3; flex: none; }
  .watch { grid-template-areas: "head head" "time time" "row row" "splits splits"; }
  .watch__splits { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }

  /* The body dissolves into the stage grid: chamber full width, then the
     two readout lists side by side underneath. */
  .rig__stage { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 24px; row-gap: 14px; padding-top: 84px; }
  .rig__head { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .rig__meters { justify-content: flex-start; }
  .meter:first-child { margin-left: 0; padding-left: 0; border-left: 0; }
  .rig__body { display: contents; }
  .rig__chamber { grid-column: 1 / -1; grid-row: 2; }
  .rig__col { grid-row: 3; justify-content: flex-start; gap: 10px; text-align: left; }
  .rig__col--l { grid-column: 1; }
  .rig__col--r { grid-column: 2; }
  .rig__col--l .ro__head { justify-content: flex-start; }
  .ro__val { white-space: normal; }
  .rig__leaders { display: none; }

  .buy__grid { grid-template-columns: 1fr; }
  .buy__gallery { position: static; }
  .results__intro, .service__intro { grid-template-columns: 1fr; }
  .lane__card { width: min(640px, 86%); }
  .contact__grid { grid-template-columns: 1fr; }
}

/* Phones */
@media (max-width: 767px) {
  :root { --pill-h: 56px; }
  .topbar { grid-template-columns: auto 1fr; padding-top: 14px; }
  .topbar__links, .topbar__tools { display: none; }
  .topbar__report { display: block; justify-self: end; padding-bottom: 10px; border-bottom: 1px solid var(--graphite); color: var(--muted); }
  .topbar__logo { font-size: 18px; }

  /* Pill docks bottom-centre, within thumb reach. */
  .pill { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .pill__sec { display: none; }
  .pill__logo { padding: 0 8px 0 12px; font-size: 14px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .menu { padding: 72px var(--gutter) calc(100px + env(safe-area-inset-bottom)); justify-content: flex-end; }
  .menu__foot .lbl { margin-left: 0; }

  .hero { padding-top: 80px; }
  .hero__grid { grid-template-columns: 1fr; row-gap: 22px; }
  .hero__title { font-size: clamp(72px, 23vw, 120px); margin: 28px 0 20px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__data { grid-template-columns: 1fr 1fr; }
  .hero__data li:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero__data li:nth-child(n + 3) { border-top: 1px solid var(--line-2); }
  .watch__time { font-size: clamp(44px, 15vw, 64px); }

  .launch__grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; height: auto; }
  .launch__main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3.4; }
  .launch__mono, .launch__start { aspect-ratio: 1; }
  .launch__words { font-size: clamp(26px, 8.6vw, 40px); }
  .lights i { width: 16px; height: 16px; }

  .rig__stage { padding: 18px var(--gutter) calc(var(--pill-h) + 26px + env(safe-area-inset-bottom)); gap: 10px; }
  .rig__title { font-size: clamp(28px, 8.6vw, 36px); margin-top: 4px; }
  :root:lang(th) .rig__title { font-size: clamp(26px, 7.6vw, 32px); line-height: 1.18; }
  .rig__head .rig__titles .display br { display: none; }
  .meter { min-width: 0; padding-left: 12px; margin-left: 12px; }
  .meter b { font-size: 20px; }
  .meter--frame { display: none; }
  .rig__stage { column-gap: 14px; grid-template-rows: auto minmax(150px, 1fr) auto; }
  .rig__col { gap: 6px; }
  .ro { padding-top: 6px; }
  .ro__note { display: none; }
  .ro__val { font-size: 17px; margin: 2px 0 0; }
  .ro__code { display: none; }
  .rig__hint { display: none; }

  .buy__thumbs { gap: 6px; }
  .sizes { grid-template-columns: repeat(4, 1fr); }
  .size:nth-child(5) { border-left: 0; }
  .size:nth-child(n + 5) { border-top: 1px solid var(--line-2); }
  .specs li + li { padding-left: 10px; }

  .chart__note { margin-left: 0; flex-basis: 100%; }
  .chart__box { height: 260px; }
  .results__cells { grid-template-columns: 1fr 1fr; }
  .results__cells li:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); margin-top: 10px; }

  .lane { grid-template-columns: 1fr; }
  .lane__no { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 12px; border-right: 0; padding: 10px 0 0; }
  .lane__no b { font-size: 40px; }
  .lane__track { padding: 10px 0 16px; background: none; }
  .lane__track::before { display: none; }
  .lane__card { width: 100%; grid-template-columns: 1fr; }
  .lane__fig { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 12px; box-shadow: 0 1px 0 var(--graphite); }

  .stats { grid-template-columns: 1fr; }
  .stats li { min-height: 0; flex-direction: row; align-items: flex-end; }

  .contact__list > div { grid-template-columns: 1fr; gap: 2px; }
  .form { grid-template-columns: 1fr; }
  .footer__row { padding-bottom: calc(var(--pill-h) + 30px + env(safe-area-inset-bottom)); flex-direction: column; align-items: flex-start; }
}

/* Short landscape screens (e.g. 1024×768, 1280×800): tighten the rig. */
@media (min-width: 1024px) and (max-height: 820px) {
  .rig__stage { padding-top: 80px; gap: 12px; }
  .rig__title { font-size: clamp(30px, 3.2vw, 46px); }
  .ro__note { font-size: 12px; }
  .ro__val { font-size: clamp(18px, 1.7vw, 26px); }
}

/* ---------- Reduced motion: everything static and visible ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .rig__stage { height: auto; min-height: 100svh; }
}
