@font-face {
  font-family: "Gummy Trail Display";
  src: url("assets/fonts/GummyTrailDisplay-ProofV7.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("assets/fonts/NunitoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("assets/fonts/NunitoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --forest: #284d3b;
  --forest-deep: #0b2119;
  --cream: #f6f1e7;
  --purple: #a886d8;
  --ink: #262421;
  --dobbo: #a96a3f;
  --mimo: #e8a354;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #07130e;
  overflow: hidden;
}

body {
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--cream);
}

button, input { font: inherit; }
button { color: inherit; }

.trailer {
  width: 100vw;
  height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(168, 134, 216, .12), transparent 38%),
    #07130e;
}

.stage {
  position: relative;
  width: min(100vw, calc(100svh * 16 / 9));
  height: min(100svh, calc(100vw * 9 / 16));
  overflow: hidden;
  isolation: isolate;
  background: var(--forest-deep);
  box-shadow: 0 0 80px rgba(0, 0, 0, .42);
}

.scene-layer {
  position: absolute;
  inset: -2%;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 1.15s ease;
  will-change: transform, opacity;
}

.scene-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
  will-change: opacity;
}

.scene-video.is-active { opacity: 1; }

.scene-layer.is-active { opacity: 1; }
.scene-layer.motion-in { animation: push-in 5s linear both; }
.scene-layer.motion-out { animation: pull-out 5s linear both; }
.scene-layer.motion-left { animation: drift-left 5s linear both; }
.scene-layer.motion-right { animation: drift-right 5s linear both; }
.scene-layer.motion-rise { animation: drift-rise 5s linear both; }

@keyframes push-in { from { transform: scale(1.03); } to { transform: scale(1.105); } }
@keyframes pull-out { from { transform: scale(1.105); } to { transform: scale(1.03); } }
@keyframes drift-left { from { transform: scale(1.085) translateX(1.2%); } to { transform: scale(1.085) translateX(-1.2%); } }
@keyframes drift-right { from { transform: scale(1.085) translateX(-1.2%); } to { transform: scale(1.085) translateX(1.2%); } }
@keyframes drift-rise { from { transform: scale(1.08) translateY(1.1%); } to { transform: scale(1.08) translateY(-1.1%); } }

.stage.is-paused .scene-layer { animation-play-state: paused; }

.atmosphere, .vignette, .grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.atmosphere { z-index: 1; overflow: hidden; opacity: .26; }
.mist {
  position: absolute;
  width: 70%;
  height: 16%;
  filter: blur(30px);
  border-radius: 50%;
  background: rgba(246, 241, 231, .22);
  animation: mist-drift 16s ease-in-out infinite alternate;
}
.mist-a { left: -18%; bottom: 13%; }
.mist-b { right: -24%; top: 16%; animation-delay: -8s; }
@keyframes mist-drift { to { transform: translateX(20%) scale(1.08); } }

.vignette {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(4, 15, 11, .7) 0%, rgba(4, 15, 11, .05) 42%, rgba(4, 15, 11, .08) 70%, rgba(4, 15, 11, .42) 100%),
    linear-gradient(0deg, rgba(4, 15, 11, .68) 0%, transparent 32%, rgba(4, 15, 11, .2) 100%);
  transition: background 700ms ease;
}

.stage.copy-right .vignette {
  background:
    linear-gradient(270deg, rgba(4, 15, 11, .72) 0%, rgba(4, 15, 11, .06) 44%, rgba(4, 15, 11, .1) 72%, rgba(4, 15, 11, .4) 100%),
    linear-gradient(0deg, rgba(4, 15, 11, .68) 0%, transparent 32%, rgba(4, 15, 11, .2) 100%);
}

.stage.card-scene .vignette {
  background:
    radial-gradient(circle at 72% 50%, rgba(168, 134, 216, .19), transparent 32%),
    radial-gradient(circle at 24% 78%, rgba(232, 163, 84, .12), transparent 26%),
    linear-gradient(135deg, #10291f, #07130e 72%);
}

.grain {
  z-index: 3;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.copy-lockup {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 7vw, 116px);
  top: 50%;
  width: min(42%, 670px);
  transform: translateY(-42%);
  opacity: 0;
  transition: opacity .55s ease, transform .7s cubic-bezier(.2,.75,.2,1);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .7);
}

.copy-lockup.is-visible { opacity: 1; transform: translateY(-50%); }
.copy-lockup.align-right { left: auto; right: clamp(28px, 7vw, 116px); text-align: right; }
.copy-lockup.align-center { left: 14%; width: 72%; text-align: center; }
.copy-lockup.position-top { top: 18%; transform: translateY(14px); }
.copy-lockup.position-top.is-visible { transform: none; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--purple);
  font-size: clamp(10px, 1.05vw, 18px);
  font-weight: 700;
  letter-spacing: .31em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  max-width: 17ch;
  font-family: "Gummy Trail Display", "Nunito Sans", sans-serif;
  color: var(--cream);
  font-size: clamp(28px, 4.2vw, 72px);
  font-weight: 400;
  line-height: .99;
  letter-spacing: .005em;
}

.align-right .headline { margin-left: auto; }
.align-center .headline { max-width: 22ch; margin-inline: auto; }

.supporting {
  margin: 1.15rem 0 0;
  max-width: 39ch;
  color: rgba(246, 241, 231, .86);
  font-size: clamp(12px, 1.25vw, 20px);
  line-height: 1.55;
}

.align-right .supporting { margin-left: auto; }
.align-center .supporting { margin-inline: auto; }

.wordmark {
  display: none;
  width: min(74%, 520px);
  max-height: 17vh;
  object-fit: contain;
  margin: 0 auto 1.7rem;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.28));
}
.copy-lockup.show-wordmark .wordmark { display: block; }
.copy-lockup.show-wordmark .headline { max-width: 23ch; margin-inline: auto; }
.card-scene .wordmark {
  filter: brightness(0) invert(1) drop-shadow(0 4px 20px rgba(0,0,0,.28));
}

.topbar {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 2.1vw, 32px);
  opacity: .92;
}

.brand-home, .icon-button, .play-button, .replay {
  border: 0;
  cursor: pointer;
}

.brand-home { background: transparent; padding: 0; }
.brand-home img { display: block; width: clamp(94px, 11vw, 160px); filter: brightness(0) invert(1); }
.top-actions { display: flex; gap: 10px; }
.icon-button {
  width: clamp(38px, 3.9vw, 56px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 241, 231, .22);
  border-radius: 50%;
  background: rgba(7, 19, 14, .36);
  color: var(--cream);
  font-weight: 700;
  backdrop-filter: blur(12px);
}
.sound-off { display: none; }
.icon-button[aria-pressed="false"] .sound-on { display: none; }
.icon-button[aria-pressed="false"] .sound-off { display: inline; }

.controls {
  position: absolute;
  z-index: 9;
  left: clamp(12px, 2vw, 32px);
  right: clamp(12px, 2vw, 32px);
  bottom: clamp(10px, 1.4vw, 20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.stage.is-idle .controls {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
}
.stage.is-paused .controls {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.play-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--forest-deep);
  box-shadow: 0 5px 18px rgba(0,0,0,.3);
  font-size: 11px;
  font-weight: 700;
}
.play-icon { display: none; }
.stage.is-paused .pause-icon { display: none; }
.stage.is-paused .play-icon { display: inline; }

.timeline-wrap {
  min-width: 0;
  flex: 1;
  padding: 7px 11px 6px;
  border: 1px solid rgba(246, 241, 231, .11);
  border-radius: 15px;
  background: rgba(7, 19, 14, .34);
  box-shadow: 0 5px 20px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}
.timeline {
  width: 100%;
  height: 3px;
  display: block;
  margin: 0;
  accent-color: var(--purple);
  cursor: pointer;
}
.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: rgba(246, 241, 231, .72);
  font-size: clamp(7px, .62vw, 10px);
  font-weight: 700;
  letter-spacing: .12em;
  text-shadow: 0 1px 6px rgba(0,0,0,.65);
}

.start-gate {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 6vh 8vw;
  background:
    radial-gradient(circle at 50% 42%, rgba(168, 134, 216, .24), transparent 26%),
    radial-gradient(circle at 68% 65%, rgba(232, 163, 84, .11), transparent 22%),
    linear-gradient(145deg, #183c2d, #07130e 72%);
  cursor: pointer;
  transition: opacity 700ms ease, visibility 700ms ease;
}
.start-gate.is-hidden { opacity: 0; visibility: hidden; }
.start-gate img {
  order: 1;
  width: min(46vw, 530px);
  max-height: 22vh;
  object-fit: contain;
  margin: 1.1rem 0 1.2rem;
  filter: brightness(0) invert(1) drop-shadow(0 8px 26px rgba(0,0,0,.3));
}
.gate-kicker, .gate-title, .gate-action, .gate-note { display: block; text-align: center; }
.gate-kicker { order: 2; margin-bottom: 1.8rem; color: rgba(246,241,231,.52); font-size: clamp(8px, .8vw, 12px); letter-spacing: .23em; }
.gate-title { order: 0; color: var(--cream); font-size: clamp(11px, 1.2vw, 18px); font-weight: 700; letter-spacing: .34em; }
.gate-action { order: 4; margin-top: 1rem; font-size: clamp(10px, 1vw, 15px); font-weight: 700; letter-spacing: .2em; }
.gate-note { order: 5; margin-top: .55rem; color: rgba(246,241,231,.5); font-size: clamp(9px, .82vw, 12px); }
.play-disc {
  order: 3;
  width: clamp(52px, 6vw, 82px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 10px rgba(168,134,216,.12), 0 16px 40px rgba(0,0,0,.26);
}
.play-disc span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid var(--forest-deep);
}

.replay {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 16%;
  transform: translate(-50%, 16px);
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--purple);
  color: var(--forest-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .17em;
  opacity: 0;
  visibility: hidden;
  transition: .4s ease;
}
.replay.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

button:focus-visible, input:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

@media (max-aspect-ratio: 4/5) {
  .copy-lockup, .copy-lockup.align-right {
    left: 8%; right: 8%; top: auto; bottom: 18%; width: auto; text-align: left;
    transform: translateY(16px);
  }
  .copy-lockup.is-visible { transform: none; }
  .align-right .headline, .align-right .supporting { margin-left: 0; }
  .headline { font-size: clamp(23px, 6vw, 42px); }
  .supporting { font-size: clamp(10px, 2.7vw, 16px); }
  .start-gate img { width: min(70vw, 520px); }
  .controls { left: 10px; right: 10px; bottom: 10px; gap: 8px; }
  .play-button { width: 32px; height: 32px; flex-basis: 32px; }
  .timeline-wrap { padding: 6px 9px 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-layer, .mist { animation: none !important; }
  .scene-layer, .copy-lockup, .start-gate { transition-duration: .01ms !important; }
}
