@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/barlow-condensed.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "MILE Inter";
  src: url("assets/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --accent: #ff651e;
  --paper: #fff4ed;
  background: #080808;
  color: var(--paper);
  font-family: "MILE Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --gutter: clamp(24px, 6vw, 96px);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.topbar {
  position: fixed;
  z-index: 8;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 80px);
  pointer-events: none;
  opacity: var(--chrome-opacity, 1);
}

.topbar:focus-within { opacity: 1; }
.topbar a { pointer-events: auto; }
.top-actions { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 14px); }
.language-select {
  display: flex;
  padding: 3px;
  border: 1px solid #fff4ed34;
  border-radius: 999px;
  background: #100e0dcc;
  pointer-events: auto;
}
.language-select button {
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 .4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #e1d1c6;
  font: 600 .75rem/1 "MILE Inter", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.language-select button[aria-pressed="true"] { color: var(--paper); background: #ffffff18; border-color: #ffffff30; }
.language-select button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: .45rem .55rem .45rem 1rem;
  border: 1px solid #fff4ed42;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 650;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.button-quiet {
  background: #100e0d90;
  box-shadow: inset 0 1px 0 #fff2, 0 5px 16px #0004;
  backdrop-filter: blur(12px);
}
.button-quiet:hover { border-color: #ff9b66ac; background-color: #56321d; }
.replay-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 13px;
  height: 44px;
  flex: none;
  border: 1px solid #fff4ed42;
  border-radius: 999px;
  color: var(--paper);
  background: #100e0d90;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 #fff2, 0 5px 16px #0004;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.replay-shortcut-label { font-size: .875rem; font-weight: 650; }
.replay-shortcut:hover { color: #ffbb98; border-color: #ff9b66ac; background: #382216; }
.explore-icon::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: translateY(-2px) rotate(45deg);
}
.button-icon {
  display: grid;
  place-items: center;
  width: 1.8rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ff651e25;
  color: #ffb58d;
  font: 500 1.15rem/1 system-ui, sans-serif;
}
.button:active, .gateway-link:active .button { transform: translateY(2px); }

.sequence { position: relative; }
.stage { position: relative; overflow: hidden; isolation: isolate; }
.enhanced .sequence { height: 480vh; height: 480svh; }
.enhanced .stage { position: sticky; top: 0; height: 100vh; height: 100svh; }

.film, .shade, .blackout { position: absolute; inset: 0; pointer-events: none; }
.film { overflow: hidden; background: #080808; }
.film-frame, .film-extension { position: absolute; inset: 0; }
.film-frame {
  background: #080808 url("assets/run-poster.webp") 54% center / cover no-repeat;
}
.film-extension { display: none; overflow: hidden; }
.film-extension canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: url("assets/run-poster.webp") center / cover no-repeat;
  object-fit: cover;
  filter: blur(32px) brightness(.8);
  transform: scale(1.16);
}
.film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% center;
}
.film[data-fallback] video { visibility: hidden; }
.shade {
  background: linear-gradient(90deg, #000c 0%, #0005 40%, transparent 70%),
    linear-gradient(0deg, #000a 0%, transparent 32%, transparent 76%, #0007);
}

.intro {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 6rem var(--gutter) 8rem;
  opacity: var(--intro-opacity, 1);
  transform: translateY(var(--intro-y, 0px));
  pointer-events: none;
}
.intro h1 {
  margin: 0;
  font: 700 clamp(3.5rem, 10.4vw, 11rem)/.83 var(--font-display);
  letter-spacing: -.015em;
  text-transform: uppercase;
  text-shadow: 0 4px 32px #0005;
}
.eyebrow {
  margin: 0 0 1.5rem;
  color: #ecd4c6;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .12em;
}
.intro .hero-caption { margin: 1.65rem 0 0; font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.5; color: #e7d5cb; text-wrap: balance; }
.cue {
  display: none;
  position: absolute;
  left: calc(50% - 1px);
  bottom: 1.6rem;
  width: 2px;
  height: 38px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff4ed0a, #f3c8ad9e 55%, #ff651e);
  opacity: var(--intro-opacity, 1);
}
.enhanced .cue { display: block; }

.chapters {
  position: relative;
  background: #100e0d;
  padding: 2rem var(--gutter) 4rem;
}
.chapter {
  padding: 2rem 0;
  width: min(100%, 58rem);
}
.chapter h2, .product h2 {
  margin: 0;
  font: 700 clamp(3rem, 8.2vw, 8rem)/.92 var(--font-display);
  letter-spacing: -.012em;
  text-transform: uppercase;
  text-wrap: balance;
}
.chapter p:last-child, .product-copy p {
  max-width: 32rem;
  margin: 1.35rem 0 0;
  color: #e7d5cb;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.enhanced .chapters {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: 5rem var(--gutter) 3rem;
  background: none;
  pointer-events: none;
}
.enhanced .chapter {
  grid-area: 1 / 1;
  padding: 0;
  opacity: var(--chapter-opacity, 0);
  visibility: var(--chapter-visible, hidden);
  transform: translateY(var(--chapter-y, 0px));
  text-shadow: 0 3px 22px #000, 0 8px 50px #000;
}

.blackout { background: #000; opacity: var(--blackout, 0); }
.reveal, .gateway-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 5rem 1.5rem 2.5rem;
  background: radial-gradient(ellipse at 50% 72%, #36170c, #090707 62%, #000 86%);
}
.enhanced .reveal {
  position: absolute;
  inset: 0;
  opacity: var(--reveal-opacity, 0);
  visibility: var(--reveal-visibility, hidden);
}
.product {
  width: min(100%, 43rem, 105svh);
  display: grid;
  gap: clamp(1.15rem, 2.4vh, 1.75rem);
  text-align: center;
  transform: translateY(var(--product-y, 0px)) rotate(var(--product-angle, 0deg));
}
.product h2 { font-size: clamp(2.05rem, 4.9vw, 4.25rem); }
html[lang="zh-CN"] :is(.intro h1, .chapter h2, .product h2) {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.1;
  letter-spacing: -.045em;
}
html[lang="zh-CN"] .intro h1 { font-size: clamp(2.65rem, 8vw, 8.3rem); }
html[lang="zh-CN"] .chapter h2 { font-size: clamp(2.5rem, 6.2vw, 6.4rem); }
.product-copy p { margin: .6rem auto 0; text-wrap: balance; }
.model-slot {
  margin: 0;
  padding: clamp(1rem, 3vw, 1.65rem);
  min-width: 0;
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid #fff4ed31;
  background: linear-gradient(145deg, #171310, #0d0b0a 65%);
  box-shadow: inset 0 1px 0 #fff1, 0 22px 64px #0008;
}
.model-position {
  position: relative;
  min-height: 9rem;
  height: min(31svh, 18rem);
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 80%, #ff651e21, transparent 57%),
    linear-gradient(#c7a1840f 1px, transparent 1px), linear-gradient(90deg, #c7a1840f 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}
.model-poster, .model-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.model-poster { object-fit: contain; }
.model-canvas { visibility: hidden; cursor: grab; touch-action: none; }
.model-canvas:active { cursor: grabbing; }
.model-canvas:focus-visible { outline: 1px solid var(--accent); outline-offset: -3px; }
.model-slot[data-model-ready] .model-poster { visibility: hidden; }
.model-slot[data-model-ready] .model-canvas { visibility: inherit; }
.model-slot figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  padding-top: .95rem;
  border-top: 1px solid #fff4ed22;
}
.model-slot strong { font-size: 1.15rem; }
.model-slot figcaption span { color: #ccb5a8; font-size: .875rem; }
.gateway { position: relative; background: #090707; }
.enhanced .gateway { height: 155vh; height: 155svh; }
.gateway-stage { overflow: hidden; }
.enhanced .gateway-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}
.gateway-link {
  display: grid;
  justify-items: center;
  width: min(100%, 43rem, 105svh);
  border-radius: 1.25rem;
  text-align: center;
  visibility: var(--logo-visibility, visible);
  transform: translateY(var(--logo-y, 0px)) rotate(var(--logo-angle, 0deg));
}
.gateway-link h2 { margin: 1.2rem 0 0; font-size: clamp(2.2rem, 6vh, 4.4rem); }
.gateway-caption { margin: .6rem 0 0; color: #d2bdb2; letter-spacing: .18em; }
.gateway-link .button { margin-top: 1.35rem; }
.gateway-art {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: clamp(12px, 2vw, 26px);
  border: 1px solid #fff7;
  background: #f5f4f7;
  box-shadow: 0 24px 72px #000b, 0 10px 110px #f65b211c;
  transition: transform .22s ease, box-shadow .22s ease;
}
.gateway-art img { display: block; width: 100%; height: auto; }
.gateway-link:hover .gateway-art, .gateway-link:focus-visible .gateway-art {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px #0009, 0 0 46px #ff651e36;
}
.button-primary {
  padding-left: 1.2rem;
  min-height: 49px;
  color: #211008;
  border-color: #ff9a64;
  background: linear-gradient(180deg, #ffa468, #ff6b24);
  box-shadow: inset 0 1px 0 #fff7, 0 4px 0 #9b300e, 0 9px 24px #ff651e40;
}
.gateway-link:hover .button-primary, .gateway-link:focus-visible .button-primary { background: linear-gradient(180deg, #ffc29e, #ff803d); }
.button-primary .button-icon { color: #ffe5d1; background: #642b16; }
.timeline {
  display: none;
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
  opacity: var(--chrome-opacity, 1);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}
.enhanced .timeline { display: block; }
.product-anchor { position: absolute; bottom: 100vh; bottom: 100svh; }
.explore-anchor { position: absolute; top: 100vh; top: 100svh; }
.enhanced .explore-anchor { top: calc((100% - 100svh) * .245); }

@media (min-aspect-ratio: 2/1) {
  .film-extension { display: block; }
  .film-frame {
    inset: 0 auto 0 50%;
    height: 100%;
    aspect-ratio: 16 / 9;
    transform: translateX(-50%);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }
}

@media (max-aspect-ratio: 3/2) {
  .film-extension { display: block; }
  .film-frame {
    inset: 50% 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    transform: translateY(-50%);
    mask-image: linear-gradient(180deg, transparent, #000 13%, #000 87%, transparent);
  }
}

@media (max-width: 600px) {
  .topbar { padding-top: 16px; }
  .shade { background: linear-gradient(0deg, #000e, #0005 50%, transparent 74%, #0008); }
  .intro { align-content: end; padding-bottom: 20svh; }
  .intro h1 { font-size: clamp(2.85rem, 11.5vw, 5rem); }
  .intro .eyebrow, .chapter .eyebrow { margin-bottom: 1rem; }
  .replay-shortcut { width: 44px; padding-inline: 0; }
  .replay-shortcut-label { display: none; }
  .enhanced .chapters { align-items: end; padding-bottom: 18svh; }
}

@media (max-width: 720px) {
  .model-position { height: min(23svh, 13rem); }
}

@media (max-height: 520px) {
  .reveal, .gateway-stage { padding-block: 3.8rem .75rem; }
  .model-slot { padding: .75rem; }
  .model-position { min-height: 5rem; height: 26svh; }
  .gateway-art { width: min(100%, 73svh); }
  .gateway-link h2 { margin-top: .7rem; }
  .gateway-link .button { margin-top: .7rem; }
}

@media (max-width: 600px) and (max-aspect-ratio: 3/2) {
  .film-frame { top: 43%; }
}

@media (max-width: 440px) {
  .topbar { padding-inline: 14px; }
  .top-actions { gap: 5px; }
  .language-select button { min-width: 1.66rem; min-height: 1.8rem; padding-inline: .28rem; }
  .button-quiet { gap: .38rem; min-height: 39px; padding-inline: .62rem .34rem; }
  .button-quiet .button-icon { width: 1.35rem; }
  .replay-shortcut { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .gateway-art, .replay-shortcut { transition: none; }
}
