/* =========================================================
   GOBACKFLIP — stylesheet
   Monochrome only: black, white and grays (tokens below).
   Light by default; add .dark to a section for the black style.
   ========================================================= */

:root {
  --white: #ffffff;
  --gray-50: #f5f5f7;
  --gray-100: #e8e8ed;
  --gray-200: #d2d2d7;
  --gray-400: #86868b;
  --gray-500: #6e6e73;
  --gray-700: #3a3a3c;
  --gray-800: #1d1d1f;
  --gray-900: #161617;
  --black: #000000;

  --bg: var(--white);
  --bg-2: var(--gray-50);
  --ink: var(--gray-800);
  --muted: var(--gray-500);
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.28);
  --accent: var(--gray-800);
  --accent-ink: var(--white);
  --part-fill: var(--gray-100);
  --metal: var(--gray-400);

  --f-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --f-mono: "SF Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 52px;
}
.dark, .nav {
  --bg: var(--black);
  --bg-2: var(--gray-900);
  --ink: var(--gray-50);
  --muted: var(--gray-400);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.4);
  --accent: var(--gray-50);
  --accent-ink: var(--black);
  --part-fill: #2c2c2e;
  --metal: var(--gray-200);
  background: var(--bg);
  color: var(--ink);
}
.gray { background: var(--gray-50); --bg-2: var(--white); }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
/* Bilingual copy: show only the language set on <html lang> (see assets/js/i18n.js). */
html[lang="vi"] body [lang="en"], html[lang="en"] body [lang="vi"] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { padding-inline: var(--gutter); max-width: 1120px; margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 300; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }

/* ---------- type ---------- */
.label { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: var(--muted); }
.serif { font-style: normal; color: var(--muted); }
.display {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.display .serif { color: var(--muted); }
.lede { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; font-weight: 500; color: var(--muted); max-width: 680px; letter-spacing: -0.015em; }
.lede b { color: var(--ink); font-weight: 600; }
.fineprint { font-size: 13px; color: var(--muted); margin-top: 12px; letter-spacing: 0; }
.fineprint a { color: inherit; }
.link { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-size: inherit; padding: 0; }
.dash li { padding-left: 20px; position: relative; margin-bottom: 8px; }
.dash li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.25s var(--spring), opacity 0.2s;
}
.btn:hover { --btn-bg: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
.btn:active { transform: scale(0.96); }
.btn--accent { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); }
.btn--ghost { --btn-bg: transparent; --btn-ink: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-ink: var(--bg); }
.btn--text { --btn-bg: transparent; --btn-ink: var(--ink); padding: 0 8px; }
.btn--text:hover { --btn-bg: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn--text::after { content: "›"; font-size: 1.25em; line-height: 1; transition: transform 0.25s var(--ease); }
.btn--text:hover::after { transform: translateX(3px); }
.btn--sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter);
  background: var(--black);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-color: var(--line); }
.nav__logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.nav__glyph { width: 28px; height: 28px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { text-decoration: none; font-size: 13px; color: var(--muted); transition: color 0.2s; }
.nav__links a:hover, .nav__links a.is-current { color: var(--ink); }
@media (max-width: 760px) { .nav__links { display: none; } }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.segmented.segmented--sm { min-width: 0; padding: 3px; }
.segmented.segmented--sm::before { top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); }
.segmented.segmented--sm button { padding: 4px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.segmented.lang-switch { --n: 2; }
.nav .segmented { background: var(--gray-800); }

/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 12vw, 160px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.section-head--center { text-align: center; justify-items: center; margin-inline: auto; }

/* scroll reveal (only once JS has loaded) */
[data-reveal] { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(32px); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; background: var(--bg);
  min-height: max(620px, calc(100svh - var(--nav-h)));
  display: grid; align-content: end;
  padding-bottom: clamp(28px, 4vw, 56px);
}
/* Copy stacks bottom-left, above the hanging photos. The headline and line under it use a
   difference blend, so they invert whatever swings behind them: black on the wall, light on a dark photo. */
.hero__copy { width: 100%; max-width: none; display: grid; justify-items: start; }
.hero__copy > * { position: relative; z-index: 4; }
.hero__title, .hero__lede { mix-blend-mode: difference; pointer-events: none; }
.hero__title {
  font-size: clamp(44px, 6.6vw, 112px); line-height: 0.94; font-weight: 700;
  letter-spacing: -0.05em; color: var(--white);
}
.hero__title em { display: block; font-style: normal; color: #79797a; /* reads as gray-400 under the difference blend */ }
.hero__lede { font-size: clamp(17px, 1.5vw, 20px); color: #e2e2e0; /* reads as gray-800 under the blend */ font-weight: 500; line-height: 1.35; max-width: 420px; margin-top: clamp(16px, 2vw, 24px); }
.hero__buy { width: min(100%, 360px); margin-top: 20px; }

/* ---------- hero rig: photos hanging on bungee cords ---------- */
.rig { --u: clamp(96px, min(12.5vw, 25svh), 210px); --sag: 40px; --anchor: 58px; position: absolute; inset: 0; z-index: 3; }
/* Ceiling: a concrete slab with a steel I-beam bolted under it. The straps loop over the beam. */
.rig__beam {
  position: absolute; top: 12px; left: 0; right: 0; height: 26px;
  background:
    radial-gradient(circle, #d1d1d6 0 1.4px, #48484a 1.9px 2.6px, transparent 3px) 34px 8px / 140px 10px repeat-x,
    linear-gradient(180deg,
      #0f0f10 0 2px, #48484a 2px 3px, #1c1c1e 3px 5px,
      #2c2c2e 5px, #3a3a3c 18px,
      #8e8e93 19px 20px, #3a3a3c 20px, #232325 25px, #0f0f10 25px);
}
.rig__beam::before { /* slab */
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #d1d1d6, #aeaeb2);
}
.rig__beam::after { /* shadow the beam casts on the wall */
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 34px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.05) 40%, transparent);
}
.rig__cords { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rig__cords path { fill: none; }
.rope-shadow { stroke: rgba(0, 0, 0, 0.16); stroke-linecap: round; }
.rope-core { stroke: #1c1c1e; stroke-linecap: round; }
.rope-braid { stroke: #636366; }
.rope-shine { stroke: rgba(255, 255, 255, 0.3); stroke-linecap: round; }
.rope-ferrule { stroke: #aeaeb2; }

/* One photo on its cord. Without JS it hangs at rest; with JS, home.js drives the transform. */
.tag {
  position: absolute; z-index: 1;
  left: calc(var(--x) * 100%); top: calc(var(--len) * 100% + var(--sag) + var(--anchor));
  width: calc(var(--u) * var(--s, 1));
  transform: translateX(-50%); transform-origin: 50% 0;
  padding-top: 14px; /* room for the carabiner */
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.tag--hero { z-index: 2; }
.tag::before { /* steel carabiner, clipped through the grommet */
  content: ""; position: absolute; top: -8px; left: 50%; width: 14px; height: 32px; margin-left: -7px; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 32'%3E%3Cdefs%3E%3ClinearGradient id='m' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%2348484a'/%3E%3Cstop offset='.4' stop-color='%23f5f5f7'/%3E%3Cstop offset='.65' stop-color='%23aeaeb2'/%3E%3Cstop offset='1' stop-color='%233a3a3c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7 2C4.2 2 2.4 3.9 2.4 6.6v15.2c0 4 2 8 4.6 8s4.6-4 4.6-8V6.6C11.6 3.9 9.8 2 7 2z' fill='none' stroke='%231c1c1e' stroke-width='3.4'/%3E%3Cpath d='M7 2C4.2 2 2.4 3.9 2.4 6.6v15.2c0 4 2 8 4.6 8s4.6-4 4.6-8V6.6C11.6 3.9 9.8 2 7 2z' fill='none' stroke='url(%23m)' stroke-width='2'/%3E%3Crect x='9.6' y='11' width='4' height='7' rx='1' fill='%238e8e93' stroke='%231c1c1e' stroke-width='.6'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, 0.3));
}
.tag__card { position: relative; background: var(--white); padding: 14px 6px 0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 14px 30px -12px rgba(0, 0, 0, 0.35); transition: box-shadow 0.3s var(--ease); }
.tag__card::before { /* grommet */
  content: ""; position: absolute; top: 2px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: radial-gradient(circle, #3a3a3c 0 2.2px, #8e8e93 2.6px, #f2f2f7 3.4px, #aeaeb2 4.4px, transparent 5px);
}
.tag__card img, .tag__card video { width: 100%; aspect-ratio: var(--ar, 4 / 5); object-fit: cover; background: var(--gray-100); pointer-events: none; }
.tag__card video { filter: grayscale(1) contrast(1.06); }
.tag figcaption {
  display: flex; justify-content: space-between; gap: 8px;
  background: var(--white); padding: 6px 8px 8px; margin-top: -1px;
  font-family: var(--f-mono); font-size: 10px; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-800);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.35);
}
.tag figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag figcaption span:first-child { flex: none; color: var(--gray-400); }
.rig.is-live .tag { left: 0; top: 0; }
/* Hidden until home.js drops them in; the animation is a fallback in case it never runs. */
.js .rig:not(.is-live) .tag { opacity: 0; animation: tag-fallback 0s 1.2s forwards; }
@keyframes tag-fallback { to { opacity: 1; } }
@media (max-width: 640px) {
  .rig { --u: clamp(84px, min(31vw, 23svh), 160px); --sag: 28px; }
  .tag { left: calc(var(--sm-x, var(--x)) * 100%); top: calc(var(--sm-len, var(--len)) * 100% + var(--sag) + var(--anchor)); width: calc(var(--u) * var(--sm-s, var(--s, 1))); }
  .tag figcaption { font-size: 9px; padding: 5px 6px 6px; }
  .tag figcaption span:first-child { display: none; }
}

/* images are always grayscale */
.mono-img { filter: grayscale(1) contrast(1.05); }

/* ---------- showcase: what's in the box ---------- */
.showcase { position: relative; }
.showcase__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 80px); }
.showcase__stage {
  position: sticky; top: calc(var(--nav-h) + 4vh);
  height: calc(92vh - var(--nav-h));
  display: grid; place-items: center;
}
.showcase__canvas {
  position: relative; width: min(100%, 480px); aspect-ratio: 4 / 5; max-height: calc(100% - 48px);
  border-radius: 32px; overflow: hidden;
  background: var(--gray-900);
}
.showcase__meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.showcase__dots { display: flex; gap: 8px; }
.showcase__dots button { width: 8px; height: 8px; border-radius: 99px; background: var(--gray-700); transition: width 0.4s var(--ease), background-color 0.3s; }
.showcase__dots button.is-active { width: 28px; background: var(--ink); }
.showcase__steps { padding-block: 10vh 30vh; }
.feature { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; opacity: 0.25; transition: opacity 0.5s var(--ease); }
.feature.is-active { opacity: 1; }
.feature__num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.feature h3 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.feature p { color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); max-width: 420px; }
.feature p b { color: var(--ink); font-weight: 600; }
.chip { display: inline-flex; width: fit-content; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.chip--solid { background: var(--ink); color: var(--bg); box-shadow: none; }
@media (max-width: 860px) {
  .showcase__grid { grid-template-columns: 1fr; gap: 0; }
  .showcase__stage { top: var(--nav-h); height: 48vh; z-index: 2; background: var(--bg); padding-block: 8px 28px; }
  .showcase__canvas { width: auto; height: 100%; border-radius: 28px; }
  .showcase__steps { padding-block: 0 20vh; }
  .feature { min-height: 56vh; }
}

/* parts: a photo or clip per component, stacked in the canvas */
.part {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  opacity: 0; transform: scale(1.08);
  transition: opacity 0.7s var(--ease), transform 1.6s var(--ease);
}
.part.is-active { opacity: 1; transform: none; }

/* ---------- demo video ---------- */
.demo { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.demo__view { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--gray-800); aspect-ratio: 16 / 10; }
.demo__view video { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(1.05); transition: opacity 0.35s var(--ease); }
.demo__view video.is-switching { opacity: 0; }
.demo__play {
  position: absolute; right: 16px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--white);
  background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s var(--spring), background-color 0.2s;
}
.demo__play:hover { background: rgba(255, 255, 255, 0.28); }
.demo__play:active { transform: scale(0.88); }
.demo__play svg { width: 18px; height: 18px; fill: currentColor; }
.demo__play .i-play, .demo__play.is-paused .i-pause { display: none; }
.demo__play.is-paused .i-play { display: block; }
.demo__progress { position: absolute; left: 16px; right: 76px; bottom: 42px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.demo__progress i { display: block; height: 100%; background: var(--white); transform-origin: left; transform: scaleX(0); }
.demo__panel { display: grid; gap: 24px; align-content: center; }
.demo__copy h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.demo__copy p { color: var(--muted); margin-top: 6px; min-height: 3em; }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }

/* switch (Apple-style) */
.toggle { display: inline-flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; cursor: pointer; width: fit-content; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__track { position: relative; width: 50px; height: 30px; border-radius: 99px; background: var(--gray-200); transition: background-color 0.3s var(--ease); }
.toggle__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 0.35s var(--spring); }
.toggle input:checked + .toggle__track { background: var(--gray-800); }
.toggle input:checked + .toggle__track::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--ink); outline-offset: 3px; }

/* segmented control (Apple-style) */
.segmented {
  --n: 3; --i: 0;
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  padding: 4px; border-radius: 999px; background: var(--gray-100); width: fit-content; min-width: 280px;
}
.segmented::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--n));
  border-radius: 999px; background: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateX(calc(100% * var(--i)));
  transition: transform 0.45s var(--spring);
}
.segmented button { position: relative; padding: 9px 18px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.3s; }
.segmented button[aria-checked="true"] { color: var(--gray-800); }
.dark .segmented { background: var(--gray-800); }
.dark .segmented::before { background: var(--gray-500); }
.dark .segmented button[aria-checked="true"] { color: var(--white); }

/* ---------- setup carousel ---------- */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(380px, 82%); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: max(var(--gutter), calc((100% - 1120px) / 2 + var(--gutter))); scroll-padding-inline: max(var(--gutter), calc((100% - 1120px) / 2 + var(--gutter))); padding-bottom: 8px; }
.carousel::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; border-radius: var(--radius); background: var(--white); overflow: hidden; display: grid; grid-template-rows: auto 1fr; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08); }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__img img { transform: scale(1.06); }
.card__body { padding: 24px 28px 32px; display: grid; gap: 6px; align-content: start; }
.card__body h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.card__body p { color: var(--muted); font-size: 16px; }
.carousel-nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--gray-200); display: grid; place-items: center; font-size: 20px; transition: background-color 0.2s, transform 0.25s var(--spring), opacity 0.2s; }
.round-btn:hover { background: var(--gray-100); }
.round-btn:active { transform: scale(0.9); }
.round-btn:disabled { opacity: 0.35; cursor: default; }
/* Pinned: the page scroll drives the track, so it no longer scrolls or snaps on its own. */
.setup__scroll.is-pinned .setup__pin { position: sticky; top: var(--pin-top, var(--nav-h)); }
.setup__scroll.is-pinned .carousel { overflow-x: hidden; scroll-snap-type: none; }

/* ---------- accordion ---------- */
.accordion { border-top: 1px solid var(--line); max-width: 860px; margin-inline: auto; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-weight: 600; font-size: clamp(17px, 1.6vw, 21px); letter-spacing: -0.015em;
  transition: color 0.2s;
}
.accordion summary:hover { color: var(--muted); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 26px; font-weight: 300; line-height: 1; transition: transform 0.4s var(--spring); flex: none; }
.accordion details[open]:not(.is-closing) summary::after { transform: rotate(45deg); }
.accordion__body { overflow: hidden; color: var(--muted); max-width: 720px; }
.accordion__body > * { padding-bottom: 22px; }
.accordion__body a { color: var(--ink); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 15px; padding-bottom: 8px !important; }
.specs dt { color: var(--muted); }
.specs dd { color: var(--ink); }

/* ---------- safety ---------- */
.safety-note { display: flex; gap: 16px; align-items: flex-start; max-width: 860px; margin: 0 auto; padding: 24px 28px; border-radius: 20px; background: var(--bg-2); font-size: 15px; color: var(--muted); }
.safety-note b, .safety-note a { color: var(--ink); }
.safety-note__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 15px; }

/* ---------- dialog ---------- */
.dialog {
  margin: auto; border: 0; border-radius: var(--radius);
  width: min(620px, calc(100% - 32px));
  padding: clamp(24px, 4vw, 40px);
  background: var(--white); color: var(--gray-800);
}
.dialog[open] { animation: dialog-in 0.45s var(--spring); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes dialog-in { from { opacity: 0; transform: scale(0.94) translateY(12px); } }
.dialog h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.dialog > p { color: var(--muted); margin-bottom: 20px; }
.dialog__close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--gray-100); font-size: 14px; transition: transform 0.25s var(--spring); }
.dialog__close:hover { transform: rotate(90deg); }
.dialog--note { width: min(440px, calc(100% - 32px)); text-align: center; }
.dialog--note h2 { margin-top: 12px; }
.dialog > .dialog__lead { color: var(--gray-800); font-size: 17px; margin-bottom: 16px; }
.dialog > .dialog__fine { font-size: 13px; margin-bottom: 24px; }
.size-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.size-table th, .size-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.size-table th { font-weight: 600; font-size: 13px; color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 260;
  transform: translate(-50%, calc(100% + 48px));
  visibility: hidden;
  background: var(--gray-800); color: var(--white);
  padding: 14px 22px; border-radius: 999px;
  font-size: 14px; max-width: calc(100% - 32px);
  transition: transform 0.5s var(--spring), visibility 0s 0.5s;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform 0.5s var(--spring); }

/* ---------- footer ---------- */
.footer { background: var(--gray-50); font-size: 13px; color: var(--muted); }
.footer__top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; padding-block: 40px; }
.footer__top p { max-width: 360px; margin-top: 10px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols div { display: grid; gap: 8px; align-content: start; }
.footer__cols h3 { margin-bottom: 4px; font-size: 13px; color: var(--ink); }
.footer__cols a { text-decoration: none; width: fit-content; }
.footer__cols a:hover { color: var(--ink); text-decoration: underline; }
.footer .nav__logo { color: var(--ink); }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; } }

/* =========================================================
   Sub-pages (legal, contact, order, 404)
   ========================================================= */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page__main { flex: 1; width: 100%; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(64px, 8vw, 120px); display: grid; gap: 12px; align-content: start; }
.page__title {
  font-size: clamp(40px, 6.4vw, 80px); line-height: 1.02; font-weight: 700;
  letter-spacing: -0.045em;
}
.page__body { max-width: 720px; margin-top: clamp(20px, 3vw, 40px); line-height: 1.6; }
.page__body--wide { max-width: none; }
.page__body > * + * { margin-top: 16px; }
.page__body h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.025em; margin-top: 48px; scroll-margin-top: 100px; }
.page__body a:not(.btn) { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page__body .size-table { margin-block: 24px; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; }
.toc a { padding: 8px 16px; border-radius: 999px; background: var(--gray-50); text-decoration: none; font-size: 14px; transition: background-color 0.2s, color 0.2s; }
.toc a:hover { background: var(--ink); color: var(--bg); }
.callout { padding: 20px 24px; border-radius: 20px; background: var(--gray-800); color: var(--white); }
.checklist li { padding: 12px 0 12px 36px; border-bottom: 1px solid var(--line); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 14px; width: 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: 6px; }
.page__footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); width: 100%; }
.page__footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.page__footer a { text-decoration: none; }
.page__footer a:hover { color: var(--ink); }

/* form fields (contact + order) */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 120px); }
.contact__lede { font-size: clamp(20px, 2vw, 26px); line-height: 1.3; letter-spacing: -0.02em; max-width: 560px; font-weight: 500; }
.contact__list { display: grid; grid-template-columns: auto 1fr; gap: 14px 32px; margin-top: 40px; }
.contact__list dt { padding-top: 2px; }
.contact__form, .field-grid { display: grid; gap: 16px; align-content: start; }
.contact__form label, .field { display: grid; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.contact__form small, .field small { font-weight: 400; }
.contact__form input, .contact__form select, .contact__form textarea,
.field input, .field select, .field textarea {
  font-family: var(--f-sans); font-size: 17px; font-weight: 400; color: var(--ink);
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--gray-200); background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact__form :is(input, select, textarea):focus, .field :is(input, select, textarea):focus { outline: none; border-color: var(--gray-800); box-shadow: 0 0 0 4px var(--gray-100); }
.field input:user-invalid, .field select:user-invalid { border-color: var(--gray-800); border-style: dashed; }
.contact__form textarea, .field textarea { resize: vertical; }
.contact__form .btn { justify-self: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* ---------- order page ---------- */
.order { max-width: 1040px; margin-top: 16px; }
.order__step:not([data-step="1"]) { max-width: 720px; }
.kit { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.kit__img { position: sticky; top: calc(var(--nav-h) + 24px); width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--gray-50); }
.kit__info { display: grid; gap: 12px; align-content: start; }
.kit__info .qty { justify-self: start; margin-bottom: 12px; }
.kit__info .summary { margin-bottom: 16px; }
.order__step .kit__name { margin-bottom: 0; }
@media (max-width: 760px) {
  .kit { grid-template-columns: 1fr; }
  .kit__img { position: static; }
}
.kit__price { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { display: flex; gap: 8px; margin-bottom: 32px; }
.progress li { flex: 1; padding-top: 12px; border-top: 3px solid var(--gray-200); font-size: 13px; font-weight: 500; color: var(--muted); transition: border-color 0.4s var(--ease), color 0.4s; }
.progress li.is-done, .progress li.is-current { border-color: var(--gray-800); color: var(--ink); }
.order__step { animation: step-in 0.6s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateY(16px); } }
.order__step h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 20px; }
.order__group { margin-bottom: 28px; }
.order__group legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; display: flex; gap: 12px; }
.order__nav { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.field__label { display: flex; align-items: center; gap: 6px; }
.social-icon { width: 18px; height: 18px; flex: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.choices { display: grid; gap: 10px; }
.choices--row { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__body { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 16px 18px; border: 1px solid var(--gray-200); border-radius: 14px; background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s, transform 0.25s var(--spring); }
.choice:hover .choice__body { border-color: var(--gray-400); }
.choice:active .choice__body { transform: scale(0.98); }
.choice__name { font-weight: 600; }
.choice__desc { grid-column: 1; font-size: 14px; color: var(--muted); }
.choice__price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 600; }
.choices--row .choice__body { grid-template-columns: 1fr; text-align: center; }
.choice input:checked + .choice__body { border-color: var(--gray-800); box-shadow: inset 0 0 0 1px var(--gray-800); }
.choice input:focus-visible + .choice__body { outline: 2px solid var(--ink); outline-offset: 2px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--gray-200); border-radius: 999px; }
.qty button { width: 46px; height: 46px; font-size: 20px; transition: transform 0.2s var(--spring); }
.qty button:active { transform: scale(0.85); }
.qty input { width: 48px; text-align: center; border: 0; background: none; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.summary { padding: clamp(20px, 2.5vw, 32px); border-radius: var(--radius); background: var(--gray-50); margin-bottom: 24px; }
.summary h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.summary__lines li, .summary__total { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 15px; }
.summary__lines li span:first-child { color: var(--muted); }
.summary__total { align-items: baseline; flex-wrap: wrap; border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.summary__total [data-summary-total] { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.pay { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.pay__qr { width: 100%; max-width: 280px; padding: 16px; background: var(--white); border-radius: 20px; border: 1px solid var(--gray-200); }
.pay__qr img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pay__status p:not([hidden]) { padding: 14px 18px; border-radius: 14px; border: 1px solid var(--gray-200); background: var(--gray-50); font-size: 15px; margin-bottom: 24px; }
.pay__status [data-state="paid"] { border-color: var(--gray-800); box-shadow: inset 0 0 0 1px var(--gray-800); }
.pay__status [data-state="partial"], .pay__status [data-state="cancelled"] { border: 1px dashed var(--ink); }
.pay__dot { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--ink); vertical-align: 2px; animation: pay-pulse 1.4s ease-in-out infinite; }
@keyframes pay-pulse { 50% { opacity: 0.2; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .pay__dot { animation: none; } }
.pay__qr-missing { aspect-ratio: 1; display: grid; place-items: center; text-align: center; font-size: 13px; color: var(--gray-500); padding: 12px; }
.pay__details { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; align-items: baseline; }
.pay__details dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.pay__details dd { font-weight: 600; word-break: break-word; }
.pay__code { font-family: var(--f-mono); font-size: 20px; letter-spacing: 0.08em; background: var(--gray-800); color: var(--white); padding: 2px 10px; border-radius: 8px; }
.pay__amount { font-size: 24px; font-weight: 700; }
.pay__next { margin-top: 28px; counter-reset: next; }
.pay__next li { counter-increment: next; padding-left: 32px; position: relative; margin-bottom: 10px; }
.pay__next li::before { content: counter(next); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 640px) { .pay { grid-template-columns: minmax(0, 1fr); justify-items: center; } .pay > div:not(.pay__qr) { width: 100%; } }

.notice { padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--ink); font-size: 14px; margin-bottom: 20px; }
.error { color: var(--ink); font-weight: 600; font-size: 14px; margin-top: 8px; }
.error::before { content: "! "; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation: none !important; }
  .js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}
