:root {
  --ink: #f4f7ff;
  --muted: #b3c7df;
  --ice: #9ed8ff;
  --deep: #061b37;
  --pink: #f05d88;
  --line: rgba(211, 236, 255, 0.24);
  --display: "Helvetica Neue", "Arial Narrow", "Aptos Display", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --sans: "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--deep); scroll-behavior: smooth; }

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--sans);
}

button,
a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 4px;
}

.experience {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 20%, rgba(91, 171, 242, 0.16), transparent 33rem),
    linear-gradient(145deg, #082d57 0%, #061b37 47%, #031228 100%);
  transition: background 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.experience.is-reveal {
  background: #0b0b0a;
}

.atmosphere,
.atmosphere::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.atmosphere::after {
  content: "";
  opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 4.9rem 4.9rem;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  transition: opacity 1400ms ease;
}

.is-reveal .atmosphere::after { opacity: 0.06; }

.aurora {
  position: absolute;
  width: 42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(4.5rem);
  opacity: 0.2;
  transition: opacity 1400ms ease;
}

.aurora-one { top: -20rem; left: -15rem; background: var(--ice); animation: drift 14s ease-in-out infinite alternate; }
.aurora-two { right: -18rem; bottom: -24rem; background: var(--pink); opacity: 0.12; animation: drift 17s ease-in-out -3s infinite alternate-reverse; }
.is-reveal .aurora { opacity: 0.035; }

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  transition: opacity 1400ms ease;
}

.is-reveal .grain { opacity: 0.035; }

.particles { position: absolute; inset: 0; overflow: hidden; transition: opacity 900ms ease; }
.is-reveal .particles { opacity: 0.18; }

.particle {
  position: absolute;
  top: -5%;
  width: var(--size);
  height: var(--size);
  border-radius: 100%;
  background: rgba(226, 246, 255, 0.76);
  box-shadow: 0 0 12px rgba(176, 226, 255, 0.45);
  animation: fall var(--duration) linear var(--delay) infinite;
}

.topbar,
.footer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1.2rem, 4.5vw, 4.4rem);
}

.topbar { justify-content: flex-end; padding-top: clamp(1.2rem, 3vw, 2.6rem); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-decoration: none;
}

.mark {
  display: grid;
  width: 1.72rem;
  height: 1.72rem;
  place-items: center;
  border: 1px solid rgba(223, 243, 255, 0.75);
  color: var(--deep);
  background: var(--ice);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.text-button,
.motion-toggle,
.secondary-button,
.sound-button {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font: 700 0.72rem/1 var(--sans);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.text-button { border-bottom: 1px solid transparent; padding-bottom: 0.28rem; }
.text-button:hover { border-color: var(--ice); color: var(--ink); }

.stage {
  display: grid;
  flex: 1;
  align-items: center;
  width: min(100%, 92rem);
  min-height: calc(100vh - 5.5rem);
  min-height: calc(100svh - 5.5rem);
  margin: auto;
  padding: clamp(2rem, 8vw, 7rem) clamp(1.2rem, 7vw, 7rem) clamp(4rem, 9vw, 7rem);
}

.stage[hidden],
.reveal[hidden] { display: none !important; }

.stage-copy { max-width: 75rem; }

.sequence-text,
.reveal h2 {
  max-width: 16ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.35rem, 10.2vw, 10.3rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 1;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sequence-text .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em) rotate(3deg);
  filter: blur(0.4rem);
  animation: letter-in 780ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sequence-text .space { width: 0.22em; }
.sequence-text .line-break { display: block; height: 1em; }
.sequence-text .number-character { font-family: var(--display); font-stretch: expanded; letter-spacing: 0.045em; }
.sequence-text.is-temperature .temperature-high { color: #fff5e7; animation-name: letter-in, temperature-warm; animation-duration: 780ms, 1200ms; animation-fill-mode: forwards; }
.sequence-text.is-temperature .temperature-low { color: #edf8ff; animation-name: letter-in, temperature-cold; animation-duration: 780ms, 1200ms; animation-fill-mode: forwards; }
.sequence-text.is-angel .letter { color: #f8fbff; background: none; -webkit-background-clip: initial; background-clip: initial; animation-name: angel-in, angel-shimmer; animation-duration: 1700ms, 1850ms; animation-timing-function: cubic-bezier(0.12, 0.95, 0.25, 1), cubic-bezier(0.25, 0.7, 0.2, 1); animation-fill-mode: forwards; padding-bottom: 0.08em; }
.date-note { display: block; width: max-content; margin: 0 0 0.7em 0.12em; color: #8eafc9; font: 700 clamp(0.9rem, 2vw, 1.5rem)/1 var(--display); letter-spacing: 0.14em; opacity: 0; transform: translateY(0.5em); animation: date-in 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.subline {
  min-height: 1.5em;
  max-width: 34rem;
  margin: clamp(1.9rem, 4vw, 3.1rem) 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.7vw, 1.15rem);
  line-height: 1.7;
  opacity: 0;
  animation: subline-in 900ms 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.progress-copy {
  align-self: end;
  justify-self: start;
  margin: 2.8rem 0 0;
  color: rgba(211, 236, 255, 0.48);
  font: 700 0.64rem/1 var(--display);
  letter-spacing: 0.18em;
}

.reveal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 0.55fr);
  gap: clamp(2.5rem, 7vw, 9rem);
  align-items: center;
  width: min(100%, 94rem);
  min-height: calc(100vh - 5.5rem);
  min-height: calc(100svh - 5.5rem);
  margin: auto;
  padding: clamp(3rem, 7vw, 7rem) clamp(1.2rem, 7vw, 7rem) clamp(5.5rem, 8vw, 7rem);
  animation: reveal-in 1500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal[hidden] { display: none; }

.reveal-glow {
  position: absolute;
  z-index: -1;
  width: min(60vw, 53rem);
  aspect-ratio: 1;
  border-radius: 50%;
  right: -12rem;
  bottom: -16rem;
  background: radial-gradient(circle, rgba(240, 93, 136, 0.1), transparent 66%);
  filter: blur(1rem);
}

.reveal h2 {
  max-width: none;
  font-size: clamp(2.9rem, 7.3vw, 7.5rem);
  line-height: 1.04;
}

.reveal h2 span { display: block; }
.reveal h2 span:nth-child(2) { color: #eeeeea; }
.reveal h2 span:nth-child(3) { color: #c9c9c1; }

.reveal-line {
  max-width: 38rem;
  margin: clamp(1.7rem, 3.2vw, 2.7rem) 0 0;
  color: #aaa9a1;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.75;
}

.reveal-line strong { color: #f1f1eb; font-weight: 800; }

.album-credit {
  margin: 1rem 0 0;
  color: #777770;
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.3rem; align-items: center; margin-top: clamp(2.1rem, 4vw, 3.7rem); }

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 1.8rem;
  min-height: 3.5rem;
  padding: 0.7rem 1.1rem 0.7rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #111110;
  background: #f4f4ef;
  box-shadow: 0 0.9rem 2.7rem rgba(0, 0, 0, 0.28), 0 0 0 0.3rem rgba(244, 244, 239, 0.05);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  animation: float-button 4.2s ease-in-out infinite;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-link:hover { transform: translateY(-0.2rem) scale(1.02); background: #fff; box-shadow: 0 1.2rem 3.2rem rgba(0, 0, 0, 0.42), 0 0 0 0.45rem rgba(244, 244, 239, 0.08); }
.arrow { font-size: 1.2rem; line-height: 1; }

.secondary-button { border-bottom: 1px solid rgba(255, 255, 255, 0.18); padding-bottom: 0.38rem; color: #a6a59e; }
.secondary-button:hover { color: #fff; border-color: #fff; }

.sound-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.4rem;
  color: #777770;
}

.sound-control[hidden] { display: none; }
.sound-button { color: #d5d5cc; border-bottom: 1px solid rgba(255, 255, 255, 0.22); padding-bottom: 0.32rem; }
.sound-button:hover { color: #fff; border-color: #fff; }
.sound-note { font: 700 0.62rem/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.sound-control audio { display: none; }

.album-display {
  width: min(100%, 28rem);
  justify-self: end;
}

.album-card {
  position: relative;
  width: min(100%, 28rem);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #191918 0 8%, #4a4a47 8.4% 9%, #181817 9.5% 13%, transparent 13.5%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.17) 0 1px, rgba(0, 0, 0, 0.1) 2px 4px),
    linear-gradient(130deg, #171716, #686862 48%, #111110 75%, #393936);
  box-shadow: 1.4rem 1.5rem 0 rgba(0, 0, 0, 0.24), 0 1.6rem 4rem rgba(0, 0, 0, 0.42);
  animation: spin-disc 22s linear infinite;
}

.album-card::before {
  position: absolute;
  inset: 6.5%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 0 1.2rem rgba(0, 0, 0, 0.08);
}

.album-card::after {
  position: absolute;
  inset: 47.4%;
  z-index: 3;
  border: 2px solid rgba(10, 10, 9, 0.72);
  border-radius: 50%;
  background: rgba(197, 197, 187, 0.55);
  box-shadow: 0 0 0 0.42rem rgba(19, 19, 18, 0.82);
  content: "";
}

.album-card img {
  position: absolute;
  inset: 11%;
  z-index: 2;
  display: block;
  width: 78%;
  height: 78%;
  border: 0.3rem solid rgba(15, 15, 14, 0.8);
  border-radius: 50%;
  object-fit: cover;
  background: #172434;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0.4rem 1.3rem rgba(0, 0, 0, 0.42);
}

.album-caption {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 0.85rem 0.35rem 0;
  border-top: 1px solid rgba(244, 244, 239, 0.32);
  color: #d7d7cf;
  font: 600 clamp(0.75rem, 1.15vw, 1rem)/1.4 var(--display);
  letter-spacing: 0.15em;
  text-transform: none;
}

.album-caption strong { color: #f4f4ef; font-weight: 700; letter-spacing: 0.18em; }

.album-card figcaption {
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 0.75rem;
  color: #74746d;
  font: 700 0.66rem/1.4 var(--display);
  letter-spacing: 0.1em;
}

.album-shadow { display: none; }

.footer-controls {
  gap: 0.5rem;
  padding-bottom: clamp(1.2rem, 3vw, 2.4rem);
  color: rgba(211, 236, 255, 0.48);
  font: 700 0.61rem/1 var(--display);
  letter-spacing: 0.13em;
  transition: color 1400ms ease;
}

.is-reveal .footer-controls { color: #595952; }
.motion-toggle:hover { color: var(--ice); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes letter-in { to { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); } }
@keyframes date-in { to { opacity: 1; transform: translateY(0); } }
@keyframes angel-in { 0% { opacity: 0; transform: translateX(-0.35em) translateY(0.25em) rotate(-7deg); filter: blur(0.75rem); } 72% { opacity: 1; transform: translateX(0.08em) translateY(-0.03em) rotate(2deg); filter: blur(0); } 100% { opacity: 1; transform: translateX(0) translateY(0) rotate(0); filter: blur(0); } }
@keyframes temperature-warm { 0%, 45% { color: #fff5e7; } 100% { color: #ffbd76; } }
@keyframes temperature-cold { 0%, 45% { color: #edf8ff; } 100% { color: #8ccfff; } }
@keyframes angel-shimmer { 0%, 100% { color: #f8fbff; text-shadow: none; } 42% { color: #ffffff; text-shadow: 0 0 0.18em rgba(255, 255, 255, 0.95), 0 0 0.65em rgba(159, 220, 255, 0.6); } }
@keyframes subline-in { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-in { from { opacity: 0; transform: translateY(2.5rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { to { transform: translate(7rem, 5rem) scale(1.16); } }
@keyframes fall { to { transform: translate3d(var(--drift), 112vh, 0) rotate(220deg); opacity: 0.06; } }
@keyframes spin-disc { to { transform: rotate(360deg); } }
@keyframes float-button { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.28rem); } }

.experience.reduced-motion .aurora,
.experience.reduced-motion .particle,
.experience.reduced-motion .album-card { animation: none; }
.experience.reduced-motion .sequence-text .letter { animation: none; opacity: 1; transform: none; filter: none; }
.experience.reduced-motion .date-note { animation: none; opacity: 1; transform: none; }
.experience.reduced-motion .primary-link { animation: none; }
.experience.reduced-motion .sequence-text.is-angel .letter { animation: none; color: #f8fbff; background: none; text-shadow: none; }
.experience.reduced-motion .sequence-text.is-temperature .letter { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .particle,
  .sequence-text .letter,
  .date-note,
  .reveal,
  .album-card,
  .primary-link,
  .sequence-text.is-angel .letter,
  .sequence-text.is-temperature .letter { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-width: 720px) {
  .topbar { padding-top: 1.25rem; }
  .wordmark-text { display: none; }
  .stage { padding-bottom: 5.4rem; }
  .sequence-text { max-width: 100%; font-size: clamp(2rem, 11vw, 5.5rem); letter-spacing: -0.1em; }
  .reveal { grid-template-columns: 1fr; gap: 3.2rem; min-height: calc(100vh - 5.5rem); min-height: calc(100svh - 5.5rem); padding-top: 3.4rem; }
  .reveal h2 { font-size: clamp(2.35rem, 11vw, 5.4rem); line-height: 1.12; }
  .album-display { width: min(83vw, 23rem); justify-self: start; margin-left: 0.7rem; }
  .album-caption { flex-direction: column; align-items: flex-start; gap: 0.4rem; font-size: clamp(0.68rem, 2.6vw, 0.86rem); letter-spacing: 0.1em; }
  .footer-controls { font-size: 0.56rem; }
}

@media (max-width: 385px) {
  .primary-link { gap: 1.05rem; padding-inline: 1rem; font-size: 0.82rem; }
  .footer-controls > span:last-child { display: none; }
}
