:root {
  color-scheme: dark;
  font-family:
    Nunito, "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #173d36;
  --stage-ratio: 7 / 4;
  --transition-ms: 700ms;
  --sun: #ffe074;
  --coral: #e9544f;
  --ink: #18372f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(126, 224, 232, 0.38), transparent 50%),
    linear-gradient(160deg, #245f4b 0%, #142f2b 72%);
}

button {
  font: inherit;
}

.experience {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(12px, 3vw, 36px);
}

.stage-shell {
  width: min(100%, calc((100svh - clamp(24px, 6vw, 72px)) * 1.75));
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--stage-ratio);
  overflow: hidden;
  isolation: isolate;
  background: #d9f0eb;
  border-radius: clamp(14px, 2vw, 28px);
  box-shadow:
    0 35px 90px rgba(6, 22, 19, 0.44),
    0 8px 24px rgba(6, 22, 19, 0.22);
}

.slide-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  object-fit: cover;
  opacity: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity, transform, clip-path;
}

.slide-layer.is-active {
  opacity: 1;
}

.slide-layer.is-entering {
  z-index: 3;
  animation-duration: var(--transition-ms);
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.22, 0.75, 0.26, 1);
}

.transition-fade {
  animation-name: fade-in;
}

.transition-zoom {
  animation-name: zoom-in;
}

.transition-slide-left {
  animation-name: slide-left;
}

.transition-slide-right {
  animation-name: slide-right;
}

.transition-slide-up {
  animation-name: slide-up;
}

.transition-slide-down {
  animation-name: slide-down;
}

.transition-page-left {
  animation-name: page-left;
  transform-origin: 0 50%;
}

.transition-page-right {
  animation-name: page-right;
  transform-origin: 100% 50%;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-left {
  from {
    opacity: 0.75;
    transform: translateX(8%);
    clip-path: inset(0 0 0 100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0);
  }
}

@keyframes slide-right {
  from {
    opacity: 0.75;
    transform: translateX(-8%);
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0.7;
    transform: translateY(8%);
    clip-path: inset(100% 0 0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0.7;
    transform: translateY(-8%);
    clip-path: inset(0 0 100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0);
  }
}

@keyframes page-left {
  from {
    opacity: 0.55;
    transform: perspective(1100px) rotateY(-13deg) scale(0.985);
    clip-path: inset(0 100% 0 0 round 0 55% 55% 0);
  }
  to {
    opacity: 1;
    transform: perspective(1100px) rotateY(0) scale(1);
    clip-path: inset(0);
  }
}

@keyframes page-right {
  from {
    opacity: 0.55;
    transform: perspective(1100px) rotateY(13deg) scale(0.985);
    clip-path: inset(0 0 0 100% round 55% 0 0 55%);
  }
  to {
    opacity: 1;
    transform: perspective(1100px) rotateY(0) scale(1);
    clip-path: inset(0);
  }
}

.cover {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  align-items: end;
  color: white;
  transition:
    opacity 520ms ease,
    visibility 520ms ease;
}

.cover.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cover-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 38, 33, 0.06) 10%, transparent 55%),
    linear-gradient(0deg, rgba(8, 31, 27, 0.88) 0%, rgba(8, 31, 27, 0.08) 54%);
}

.cover-content {
  position: relative;
  width: min(760px, 92%);
  padding: clamp(28px, 5.2vw, 74px);
  text-shadow: 0 2px 18px rgba(8, 35, 30, 0.3);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--sun);
  font-size: clamp(0.72rem, 1.35vw, 1rem);
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7.4vw, 6.6rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.intro {
  margin: clamp(10px, 1.6vw, 18px) 0 clamp(18px, 2.6vw, 32px);
  font-size: clamp(1rem, 2.15vw, 1.55rem);
  font-weight: 650;
}

.version-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.5vw, 16px);
}

.start-button,
.replay-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--sun);
  box-shadow:
    0 12px 28px rgba(16, 43, 37, 0.26),
    inset 0 -3px 0 rgba(174, 111, 31, 0.2);
  cursor: pointer;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 900;
  padding: 0.85rem 1.45rem;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.start-button {
  min-width: clamp(138px, 19vw, 190px);
}

.start-button.is-instrumental {
  background: #f3fff8;
  box-shadow:
    0 12px 28px rgba(16, 43, 37, 0.26),
    inset 0 -3px 0 rgba(45, 125, 99, 0.2);
}

.button-copy {
  display: grid;
  gap: 0.05rem;
  text-align: left;
}

.button-copy small {
  font-size: 0.62em;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.72;
  text-transform: uppercase;
}

.start-button:hover,
.replay-button:hover {
  filter: brightness(1.04);
  transform: translateY(-2px) scale(1.015);
}

.start-button:active,
.replay-button:active {
  transform: translateY(1px) scale(0.99);
}

.start-button:focus-visible,
.replay-button:focus-visible,
.icon-button:focus-visible,
.pause-button:focus-visible {
  outline: 4px solid white;
  outline-offset: 4px;
}

.play-mark {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--coral);
  font-size: 0.76rem;
  padding-left: 0.1rem;
}

.sound-note {
  margin: 0.85rem 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(0.7rem, 1.2vw, 0.88rem);
  font-weight: 650;
}

.top-controls {
  position: absolute;
  z-index: 20;
  top: clamp(10px, 1.8vw, 22px);
  right: clamp(10px, 1.8vw, 22px);
  display: flex;
  gap: 0.5rem;
}

.icon-button,
.pause-button {
  display: grid;
  width: clamp(38px, 5vw, 52px);
  height: clamp(38px, 5vw, 52px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  color: white;
  background: rgba(9, 36, 31, 0.55);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.icon-button:hover,
.pause-button:hover {
  background: rgba(9, 36, 31, 0.75);
  transform: scale(1.06);
}

.pause-button {
  position: absolute;
  z-index: 20;
  right: 50%;
  bottom: clamp(14px, 2.5vw, 28px);
  transform: translateX(50%);
  opacity: 0;
}

.stage:hover .pause-button,
.pause-button:focus-visible,
.pause-button.is-paused {
  opacity: 1;
}

.stage:hover .pause-button:hover {
  transform: translateX(50%) scale(1.06);
}

.progress-track {
  position: absolute;
  z-index: 25;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(4px, 0.55vw, 7px);
  overflow: hidden;
  background: rgba(9, 36, 31, 0.24);
}

.progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ffe074, #ff8c66);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.end-card {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  color: white;
  text-align: center;
  background: rgba(8, 31, 27, 0.54);
  backdrop-filter: blur(3px);
  animation: fade-in 500ms ease both;
}

.end-kicker {
  margin: 0 0 0.4rem;
  color: var(--sun);
  font-size: clamp(0.78rem, 1.5vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.end-card h2 {
  margin: 0 0 clamp(18px, 3vw, 30px);
  font-size: clamp(2rem, 5.8vw, 4.8rem);
  line-height: 1;
  text-shadow: 0 3px 24px rgba(8, 31, 27, 0.48);
}

.status {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

noscript {
  position: fixed;
  z-index: 100;
  inset: auto 12px 12px;
  border-radius: 8px;
  color: white;
  background: #9b2e2e;
  padding: 12px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-aspect-ratio: 7 / 5) {
  .experience {
    padding: 0;
  }

  .stage-shell {
    width: 100%;
  }

  .stage {
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .cover-content {
    padding: 24px;
  }

  .start-button {
    min-height: 46px;
    min-width: 124px;
    padding: 0.65rem 1rem;
  }

  .sound-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-layer.is-entering {
    animation-name: fade-in !important;
    animation-duration: 220ms !important;
  }

  .cover,
  .start-button,
  .replay-button,
  .icon-button,
  .pause-button {
    transition-duration: 0.01ms !important;
  }
}
