:root {
  --void: #0a0c12;
  --gold: #c9a24b;
  --gold-bright: #f1cf82;
  --ember: #8a2e2e;
  --parchment: #ece4d3;
  --ink: #14100b;

  --font-display: 'Cinzel Decorative', serif;
  --font-caps: 'Cinzel', serif;
  --font-body: 'EB Garamond', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  min-height: 100dvh;
}

body { overflow-x: hidden; }

#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--void);
  z-index: -3;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at center, rgba(10,12,18,0.35) 0%, rgba(8,9,14,0.78) 65%, rgba(6,7,11,0.93) 100%);
}

.embers {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.embers span {
  position: absolute;
  bottom: -20px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright), transparent 70%);
  box-shadow: 0 0 6px 2px rgba(241, 207, 130, 0.55);
  animation: drift linear infinite;
}

.embers span:nth-child(1) { left: 8%;  animation-duration: 15s; animation-delay: 0s; }
.embers span:nth-child(2) { left: 22%; animation-duration: 18s; animation-delay: 2s; }
.embers span:nth-child(3) { left: 40%; animation-duration: 13s; animation-delay: 4s; }
.embers span:nth-child(4) { left: 58%; animation-duration: 20s; animation-delay: 1s; }
.embers span:nth-child(5) { left: 76%; animation-duration: 16s; animation-delay: 5s; }
.embers span:nth-child(6) { left: 90%; animation-duration: 19s; animation-delay: 3s; }

@keyframes drift {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.25; }
  100% { transform: translateY(-110vh) translateX(24px); opacity: 0; }
}

.sound-toggle {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, 0.55);
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(6px);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}
.sound-toggle svg { width: 20px; height: 20px; }
.sound-toggle:hover, .sound-toggle:focus-visible {
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(201, 162, 75, 0.45);
  transform: translateY(-1px);
}
.sound-toggle:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.sound-toggle .icon-unmuted { display: none; }
.sound-toggle.is-unmuted .icon-muted { display: none; }
.sound-toggle.is-unmuted .icon-unmuted { display: block; }

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
  padding: 10vh 6vw 12vh;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.eyebrow {
  font-family: var(--font-caps);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  color: var(--gold-bright);
  letter-spacing: 0.03em;
  margin: 0;
  text-shadow: 0 0 24px rgba(201, 162, 75, 0.45), 0 2px 12px rgba(0, 0, 0, 0.6);
}

.reveal.divider {
  width: 220px;
  max-width: 60vw;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(.16,.8,.3,1);
}
.reveal.divider.is-visible { opacity: 1; transform: scaleX(1); }

.divider-svg { width: 100%; height: 16px; overflow: visible; }
.divider-svg line, .divider-svg circle { stroke: var(--gold); stroke-width: 1; fill: none; }
.divider-svg circle { fill: var(--gold-bright); }

.lore { display: flex; flex-direction: column; gap: 1.1rem; max-width: 62ch; }

.lore p {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  line-height: 1.75;
  color: var(--parchment);
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.lore p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 2.6em;
  float: left;
  line-height: 0.8;
  padding-right: 0.12em;
  padding-top: 0.05em;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(201, 162, 75, 0.5);
}

.cta {
  position: relative;
  margin-top: 1.2rem;
  font-family: var(--font-caps);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.5), 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.cta:hover, .cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(241, 207, 130, 0.8), 0 0 28px rgba(201, 162, 75, 0.55), 0 14px 34px rgba(0, 0, 0, 0.5);
}
.cta:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }

.cta::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid rgba(201, 162, 75, 0.5);
  opacity: 0;
  animation: pulse-ring 2.6s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 480px) {
  .stage { padding: 8vh 6vw 9vh; gap: 1.1rem; }
  .title { letter-spacing: 0.01em; }
  .sound-toggle { right: 1rem; bottom: 1rem; width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.divider { transition: none; opacity: 1; transform: none; }
  .embers span, .cta::after { animation: none; display: none; }
}
