:root {
  --bg: #070504;
  --cream: #f2e6d1;
  --cream-dim: rgba(242, 230, 209, 0.62);
  --gold: #c99b58;
  --gold-light: #f0d4a1;
  --line: rgba(240, 212, 161, 0.22);
  --sans: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---------- environment ---------- */

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(72% 58% at 64% 44%, rgba(140, 88, 36, 0.28) 0%, rgba(83, 49, 19, 0.1) 42%, transparent 72%),
    radial-gradient(100% 80% at 50% 112%, rgba(151, 94, 37, 0.16) 0%, transparent 58%),
    linear-gradient(180deg, #0b0806 0%, #070504 48%, #0a0704 100%);
}

.ambient-bg::before {
  content: "";
  position: absolute;
  left: 59%;
  top: 46%;
  width: min(68vw, 980px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 198, 127, 0.12) 0%, rgba(199, 130, 56, 0.06) 38%, transparent 68%);
  filter: blur(40px);
  animation: aura-breathe 9s ease-in-out infinite alternate;
}

@keyframes aura-breathe {
  from { opacity: 0.65; transform: translate(-50%, -50%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(2, 2, 1, 0.36) 76%, rgba(2, 2, 1, 0.78) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, transparent 16%, transparent 74%, rgba(0, 0, 0, 0.42) 100%);
}

.film-grain {
  position: fixed;
  inset: -30%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.115;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: grain-drift 1.2s steps(4) infinite;
}

@keyframes grain-drift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2%, 1.5%, 0); }
  50% { transform: translate3d(1.5%, -2%, 0); }
  75% { transform: translate3d(-1%, -1%, 0); }
  100% { transform: translate3d(2%, 1%, 0); }
}

/* ---------- chrome ---------- */

.ui {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(24px, 3.6vh, 46px) clamp(24px, 4vw, 62px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-cn {
  padding-right: 15px;
  border-right: 1px solid var(--line);
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 0.2em;
  line-height: 1;
  text-shadow: 0 0 26px rgba(233, 188, 118, 0.22);
}

.brand-en {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--sans);
}

.brand-en strong {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: rgba(242, 230, 209, 0.82);
}

.brand-en span {
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(242, 230, 209, 0.38);
}

.film-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-family: var(--sans);
  text-align: right;
}

.film-meta strong {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.36em;
  color: rgba(242, 230, 209, 0.64);
}

.film-meta span {
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(242, 230, 209, 0.32);
}

.side-label {
  position: absolute;
  z-index: 3;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.38em;
  color: rgba(242, 230, 209, 0.25);
  text-transform: uppercase;
}

.side-label.left {
  left: clamp(10px, 1.45vw, 24px);
}

.side-label.right {
  right: clamp(10px, 1.45vw, 24px);
}

.corner {
  position: absolute;
  z-index: 3;
  width: 26px;
  height: 26px;
  opacity: 0.35;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: var(--gold);
}

.corner::before {
  width: 100%;
  height: 1px;
}

.corner::after {
  width: 1px;
  height: 100%;
}

.corner.tl { left: 22px; top: 22px; }
.corner.tr { right: 22px; top: 22px; transform: rotate(90deg); }
.corner.bl { left: 22px; bottom: 22px; transform: rotate(-90deg); }
.corner.br { right: 22px; bottom: 22px; transform: rotate(180deg); }

/* ---------- copy scenes ---------- */

.scene {
  position: absolute;
  left: clamp(26px, 7vw, 112px);
  bottom: clamp(116px, 16vh, 184px);
  width: min(570px, 45vw);
  z-index: 4;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 3px 34px rgba(0, 0, 0, 0.7);
}

.scene > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease,
    transform 1.15s cubic-bezier(0.16, 0.8, 0.2, 1);
}

.scene.on > * {
  opacity: 1;
  transform: translateY(0);
}

.scene.on > :nth-child(1) { transition-delay: 0.04s; }
.scene.on > :nth-child(2) { transition-delay: 0.13s; }
.scene.on > :nth-child(3) { transition-delay: 0.25s; }
.scene.on > :nth-child(4) { transition-delay: 0.35s; }

.scene:not(.on) > * {
  transition-duration: 0.32s;
  transition-delay: 0s;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 2.4vh, 28px);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--gold);
}

.kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(201, 155, 88, 0));
}

.scene h1,
.scene h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(35px, 4vw, 64px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.055em;
  color: var(--cream);
}

.scene h1 em,
.scene h2 em {
  font-style: normal;
  color: var(--gold-light);
}

.scene p {
  max-width: 440px;
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.16em;
  color: var(--cream-dim);
}

.scene p b {
  font-weight: 400;
  color: rgba(242, 230, 209, 0.9);
}

.gold-text {
  background: linear-gradient(176deg, #fff6e3 0%, #f2d7a6 36%, #d4a862 67%, #b48242 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* intro */

.intro {
  bottom: clamp(126px, 18vh, 200px);
}

.intro .title-line {
  display: block;
}

.intro .writing {
  margin-top: 22px;
  padding-left: 2px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.42em;
  color: rgba(240, 212, 161, 0.66);
}

/* brand */

.brand-scene .brand-word {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 1.45em;
  line-height: 1;
  letter-spacing: 0.2em;
}

.brand-scene h2 {
  margin-top: 18px;
  font-size: clamp(28px, 3vw, 45px);
  line-height: 1.42;
  letter-spacing: 0.1em;
}

.brand-scene .mark-note {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: rgba(242, 230, 209, 0.4);
}

.brand-scene .mark-note::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--line);
}

/* quality */

.quality-scene {
  bottom: clamp(112px, 15vh, 170px);
}

.quality-scene h2 {
  font-size: clamp(31px, 3.3vw, 50px);
}

.feature-list {
  display: flex;
  flex-direction: column;
  margin-top: clamp(18px, 2.6vh, 30px);
  max-width: 440px;
}

.feature {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.8s ease,
    transform 0.9s cubic-bezier(0.16, 0.8, 0.2, 1);
}

.feature:last-child {
  border-bottom: 1px solid var(--line);
}

.feature.show {
  opacity: 1;
  transform: translateY(0);
}

.feature .num {
  padding-top: 4px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.feature h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--cream);
}

.feature p {
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.11em;
  color: rgba(242, 230, 209, 0.5);
}

/* nutrition */

.nutrition-scene {
  left: auto;
  right: clamp(26px, 6vw, 96px);
  bottom: clamp(112px, 15vh, 168px);
  width: min(470px, 40vw);
}

.nutrition-scene h2 {
  font-size: clamp(31px, 3.35vw, 52px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(22px, 3.2vh, 36px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.stat {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.85s ease,
    transform 0.95s cubic-bezier(0.16, 0.8, 0.2, 1);
}

.stat.show {
  opacity: 1;
  transform: translateY(0);
}

.stat strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--sans);
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.stat strong span {
  font-size: 0.38em;
  letter-spacing: 0.04em;
}

.stat small {
  display: block;
  margin-top: 9px;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: rgba(242, 230, 209, 0.45);
}

.disclaimer {
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(242, 230, 209, 0.24);
}

/* closing */

.closing-scene {
  bottom: clamp(112px, 15vh, 168px);
}

.closing-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.closing-brand .cn {
  font-size: clamp(44px, 4.6vw, 70px);
  line-height: 1;
  letter-spacing: 0.18em;
}

.closing-brand .en {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.32em;
  color: rgba(242, 230, 209, 0.42);
}

.closing-scene h2 {
  font-size: clamp(29px, 3.2vw, 49px);
  line-height: 1.35;
}

.closing-meta {
  margin-top: 24px !important;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px !important;
  letter-spacing: 0.3em !important;
  color: rgba(240, 212, 161, 0.58) !important;
}

.closing-meta::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
}

/* ---------- controls ---------- */

.controls {
  position: absolute;
  z-index: 5;
  left: clamp(24px, 4vw, 62px);
  right: clamp(24px, 4vw, 62px);
  bottom: clamp(20px, 3.2vh, 40px);
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.ctrl-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(240, 212, 161, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.ctrl-btn:hover {
  background: rgba(240, 212, 161, 0.1);
  border-color: rgba(240, 212, 161, 0.5);
  transform: translateY(-1px);
}

.ctrl-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.ctrl-btn .icon-pause,
.ctrl-btn .icon-sound-on {
  display: none;
}

.ctrl-btn.is-playing .icon-play {
  display: none;
}

.ctrl-btn.is-playing .icon-pause {
  display: block;
}

.ctrl-btn.is-muted .icon-sound-on {
  display: none;
}

.ctrl-btn:not(.is-muted) .icon-sound-off {
  display: none;
}

.ctrl-btn:not(.is-muted) .icon-sound-on {
  display: block;
}

.timeline-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 80px;
}

.timeline {
  position: relative;
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.track {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(242, 230, 209, 0.16);
  transition: height 0.25s ease;
}

.timeline:hover .track {
  height: 3px;
}

.fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #8e6736, var(--gold-light));
  box-shadow: 0 0 14px rgba(240, 212, 161, 0.28);
}

.knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #f8e7c7;
  box-shadow: 0 0 12px rgba(248, 231, 199, 0.8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.timeline:hover .knob,
.timeline.is-seeking .knob {
  opacity: 1;
}

.markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.marker {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 6px;
  transform: translate(-50%, -50%);
  background: rgba(242, 230, 209, 0.32);
}

.timecode {
  flex: 0 0 auto;
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.09em;
  color: rgba(242, 230, 209, 0.42);
  font-variant-numeric: tabular-nums;
}

.timecode .current {
  color: rgba(240, 212, 161, 0.78);
}

/* ---------- loader / error ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #070504;
  transition: opacity 1.1s ease 0.15s, visibility 1.1s ease 0.15s;
}

#loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  padding-left: 0.22em;
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: 0.22em;
  color: var(--gold-light);
  text-shadow: 0 0 42px rgba(240, 212, 161, 0.22);
}

.loader-rule {
  position: relative;
  width: 92px;
  height: 1px;
  overflow: hidden;
  background: rgba(240, 212, 161, 0.16);
}

.loader-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  transform: translateX(-100%);
  animation: loader-run 1.5s ease-in-out infinite;
}

@keyframes loader-run {
  to { transform: translateX(100%); }
}

.loader-note {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.36em;
  color: rgba(242, 230, 209, 0.35);
}

#error {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  display: none;
  width: min(90vw, 520px);
  padding: 28px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  background: rgba(12, 9, 6, 0.94);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.05em;
  color: var(--cream-dim);
  text-align: center;
}

#error strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

#error.visible {
  display: block;
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .ui::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 64%;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(7, 5, 4, 0) 0%,
      rgba(7, 5, 4, 0.22) 16%,
      rgba(7, 5, 4, 0.64) 38%,
      rgba(7, 5, 4, 0.9) 62%,
      rgba(7, 5, 4, 0.98) 100%
    );
  }

  .side-label,
  .corner {
    display: none;
  }

  .scene,
  .nutrition-scene,
  .intro,
  .quality-scene,
  .closing-scene {
    left: 26px;
    right: 26px;
    width: auto;
    bottom: 122px;
  }

  .nutrition-scene {
    width: auto;
  }

  .scene h1,
  .scene h2 {
    font-size: clamp(30px, 6.6vw, 48px);
  }

  .scene p {
    max-width: 82%;
  }

  .stat-grid {
    max-width: 430px;
  }

  .controls {
    left: 22px;
    right: 22px;
    bottom: 18px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 20px 22px;
  }

  .brand-en {
    display: none;
  }

  .brand-cn {
    font-size: 21px;
  }

  .film-meta strong {
    letter-spacing: 0.22em;
  }

  .film-meta span {
    display: none;
  }

  .scene,
  .nutrition-scene,
  .intro,
  .quality-scene,
  .closing-scene {
    bottom: 112px;
  }

  .scene h1,
  .scene h2,
  .nutrition-scene h2,
  .quality-scene h2,
  .closing-scene h2 {
    font-size: clamp(26px, 7vw, 36px);
    line-height: 1.3;
  }

  .scene p {
    max-width: 90%;
    font-size: 11px;
    line-height: 1.85;
  }

  .kicker {
    margin-bottom: 14px;
  }

  .feature {
    grid-template-columns: 28px 1fr;
    gap: 10px;
    padding: 10px 0;
  }

  .feature h3 {
    font-size: 16px;
  }

  .feature p {
    font-size: 10px;
  }

  .stat-grid {
    gap: 9px;
  }

  .stat strong {
    font-size: 24px;
  }

  .stat small {
    font-size: 8px;
  }

  .closing-brand .cn {
    font-size: 40px;
  }

  .timecode {
    display: none;
  }

  .ctrl-btn {
    width: 36px;
    height: 36px;
  }

  .controls {
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-grain,
  .ambient-bg::before {
    animation: none;
  }
}
