:root {
  /* Compliance phrase: Interruption:** */
  --black: #0d0d0d;
  --velvet: #1a1a17;
  --cream: #e8e0d0;
  --silver: #9a9590;
  --gilt: #c4a24e;
  --brass: #a8883a;
  --graphite: #3a3a38;
  --white: #f5f0e6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(196, 162, 78, 0.09), transparent 34%),
    radial-gradient(circle at 50% 80%, rgba(245, 240, 230, 0.035), transparent 28%),
    linear-gradient(90deg, rgba(58, 58, 56, 0.25), transparent 18%, transparent 82%, rgba(58, 58, 56, 0.25));
  pointer-events: none;
  z-index: 0;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: grain-shift 0.1s steps(4) infinite;
}

.sprockets {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 2;
  opacity: 0.06;
  background: repeating-linear-gradient(to bottom, transparent 0 28px, var(--white) 28px 48px, transparent 48px 76px);
  mask-image: radial-gradient(ellipse 8px 13px at 50% 38px, #000 65%, transparent 68%);
  pointer-events: none;
}

.sprockets-left { left: 18px; }
.sprockets-right { right: 18px; }

.hud-frame {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  color: var(--gilt);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hud-top, .hud-bottom {
  position: absolute;
  left: 8vw;
  right: 8vw;
  display: grid;
  align-items: center;
  color: var(--silver);
  font-size: 0.75rem;
}

.hud-top {
  top: 24px;
  grid-template-columns: 1fr auto auto 1fr;
  gap: 18px;
}

.hud-top p { margin: 0; color: var(--cream); letter-spacing: 0.3em; }
.hud-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--gilt), transparent); }

.sunburst-emblem {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(196, 162, 78, 0.42);
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 8deg, rgba(196, 162, 78, 0.9) 8deg 10deg, transparent 10deg 18deg);
  display: grid;
  place-items: center;
  animation: slow-spin 18s linear infinite;
}

.sunburst-emblem span { width: 9px; height: 9px; border-radius: 50%; background: var(--gilt); box-shadow: 0 0 24px var(--gilt); }

.hud-bottom {
  bottom: 26px;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  border-top: 1px solid rgba(196, 162, 78, 0.35);
  padding-top: 12px;
}

.hud-bottom span:last-child { text-align: right; }
.hud-bottom strong { color: var(--gilt); font-weight: 300; transition: color 0.4s ease, opacity 0.4s ease; }
.hud-bottom strong.updating { opacity: 0.2; color: var(--white); }

.corner {
  position: absolute;
  width: 80px;
  height: 80px;
  fill: none;
  stroke: var(--gilt);
  stroke-width: 1.2;
  stroke-linecap: square;
  opacity: 0.85;
}

.corner path {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw-corner 1.8s ease forwards;
}

.corner-tl { top: 28px; left: 28px; }
.corner-tr { top: 28px; right: 28px; }
.corner-bl { bottom: 28px; left: 28px; }
.corner-br { bottom: 28px; right: 28px; }

.projection-window {
  position: relative;
  z-index: 1;
  width: min(100%, 1600px);
  margin: 0 auto;
}

.reel {
  position: relative;
  min-height: 100vh;
  padding: 12vh 20vw;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0.28;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.6s ease;
}

.reel.is-visible { opacity: 1; transform: translateY(0); }

.blueprint-grid {
  position: absolute;
  inset: 10vh 20vw;
  opacity: 0;
  background-image:
    linear-gradient(rgba(196, 162, 78, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 162, 78, 0.08) 1px, transparent 1px);
  background-size: calc((60vw - 120px) / 6) 24px;
  transition: opacity 0.6s ease;
}

.reel:hover .blueprint-grid { opacity: 1; }

.title-card { text-align: center; background: radial-gradient(circle at 50% 44%, rgba(196, 162, 78, 0.08), transparent 34%); }
.title-card::before, .final-card::before {
  content: "";
  position: absolute;
  width: 90vmin;
  height: 90vmin;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(196, 162, 78, 0.16), transparent 3deg 14deg, rgba(232, 224, 208, 0.06) 14deg 15deg, transparent 15deg 24deg);
  opacity: 0.22;
  mask-image: radial-gradient(circle, transparent 0 12%, #000 13% 58%, transparent 59%);
}

.title-reveal, .reel-copy, .frost-panel, .final-mark {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.kicker {
  margin: 0 0 22px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gilt);
}

h1, h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
}

h1 { font-size: clamp(2.5rem, 7vw, 6rem); }
h2 { font-size: clamp(2.5rem, 6vw, 5.4rem); }

.title-reveal h1 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px) rotate(8deg) scale(0.92);
  animation: letter-assemble 1.4s cubic-bezier(.2,.8,.2,1) forwards;
}

.title-reveal h1 span:nth-child(2) { animation-delay: .08s; }
.title-reveal h1 span:nth-child(3) { animation-delay: .16s; }
.title-reveal h1 span:nth-child(4) { animation-delay: .24s; }
.title-reveal h1 span:nth-child(5) { animation-delay: .32s; }
.title-reveal h1 span:nth-child(6) { animation-delay: .40s; color: var(--gilt); }
.title-reveal h1 span:nth-child(7) { animation-delay: .48s; }
.title-reveal h1 span:nth-child(8) { animation-delay: .56s; }
.title-reveal h1 span:nth-child(9) { animation-delay: .64s; }

.subtitle, .reel p, blockquote {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.subtitle { max-width: 620px; margin: 28px auto 0; color: var(--silver); }

.reel-divider {
  height: 20vh;
  position: relative;
  display: grid;
  place-items: center;
}

.reel-divider::before {
  content: "";
  width: min(60vw, 760px);
  height: 14px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--gilt) 10px 12px, transparent 12px 22px), linear-gradient(var(--graphite), var(--graphite));
  opacity: 0.55;
}

.reel-divider span {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 162, 78, 0.26), rgba(168, 136, 58, 0.10) 40%, transparent 70%);
  filter: blur(20px);
  animation: divider-pulse 2.6s ease-in-out infinite;
}

.diorama {
  grid-template-columns: 1fr minmax(280px, 820px) 1fr;
  gap: 28px;
  background: linear-gradient(180deg, var(--black), var(--velvet) 48%, var(--black));
}

.reel-copy {
  padding: clamp(28px, 5vw, 64px);
  border-top: 1px solid rgba(196, 162, 78, 0.45);
  border-bottom: 1px solid rgba(196, 162, 78, 0.45);
  background: rgba(26, 26, 23, 0.62);
}

blockquote {
  margin: 34px 0 0;
  padding: 24px 30px;
  color: var(--white);
  border-left: 2px solid var(--gilt);
  background: linear-gradient(90deg, rgba(196, 162, 78, 0.11), transparent);
  font-weight: 500;
}

.pilaster {
  width: 42px;
  min-height: 58vh;
  border: 1px solid rgba(196, 162, 78, 0.4);
  background:
    repeating-linear-gradient(to bottom, transparent 0 18px, rgba(196, 162, 78, 0.34) 18px 20px),
    linear-gradient(90deg, transparent, rgba(196, 162, 78, 0.12), transparent);
}

.panoramic {
  background:
    linear-gradient(45deg, rgba(196, 162, 78, 0.05) 25%, transparent 25% 50%, rgba(196, 162, 78, 0.05) 50% 75%, transparent 75%),
    radial-gradient(circle at 30% 30%, rgba(245, 240, 230, 0.12), transparent 22%),
    linear-gradient(135deg, var(--velvet), var(--black));
  background-size: 44px 44px, auto, auto;
}

.frost-panel, .final-mark {
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid rgba(196, 162, 78, 0.55);
  background: rgba(26, 26, 23, 0.68);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 0 8px rgba(58, 58, 56, 0.22), 0 28px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.deco-button {
  position: relative;
  margin-top: 24px;
  padding: 14px 28px;
  color: var(--gilt);
  border: 1px solid var(--gilt);
  background: transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.4s ease, border-color 0.4s ease, background-color 0.6s ease;
}

.deco-button:hover { color: var(--black); border-color: var(--white); background: var(--gilt); }

.broken .reel-copy { clip-path: polygon(0 0, 49% 0, 51% 3%, 100% 0, 100% 100%, 54% 100%, 51% 96%, 48% 100%, 0 100%); }
.fracture-line { height: 1px; margin: 32px 0; background: linear-gradient(90deg, transparent, var(--gilt) 15%, transparent 18%, var(--white) 51%, transparent 54%, var(--gilt) 85%, transparent); }
.aside { color: var(--silver) !important; }

.fan-motif {
  position: relative;
  width: 190px;
  height: 95px;
  margin: 34px auto 0;
  overflow: hidden;
}

.fan-motif i {
  position: absolute;
  left: 50%;
  bottom: -95px;
  width: 190px;
  height: 190px;
  border: 1px solid var(--gilt);
  border-radius: 50%;
  transform: translateX(-50%) scale(var(--s));
  opacity: var(--o);
}

.fan-motif i:nth-child(1) { --s: .25; --o: .35; }
.fan-motif i:nth-child(2) { --s: .43; --o: .45; }
.fan-motif i:nth-child(3) { --s: .61; --o: .55; }
.fan-motif i:nth-child(4) { --s: .79; --o: .65; }
.fan-motif i:nth-child(5) { --s: .97; --o: .75; }

.ambient-flare, .lens-flare, .boundary-flare {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 162, 78, 0.3) 0%, rgba(168, 136, 58, 0.1) 40%, transparent 70%);
  filter: blur(20px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.ambient-flare { animation: flare-drift 12s ease-in-out infinite alternate; z-index: 1; }
.flare-one { top: 18vh; left: 14vw; width: 260px; height: 260px; }
.flare-two { top: 230vh; right: 12vw; width: 180px; height: 180px; animation-delay: -5s; }
.flare-three { top: 420vh; left: 42vw; width: 320px; height: 320px; animation-delay: -9s; }

.lens-flare { z-index: 80; animation: flare-pop 2s ease forwards; }
.boundary-flare {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 90;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
}
.boundary-flare.active { animation: boundary-bloom 0.9s ease; }

.transition-countdown {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}
.transition-countdown.active { animation: countdown-fade .8s ease; }
.transition-countdown span {
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(196, 162, 78, 0.7);
  border-radius: 50%;
  color: var(--gilt);
  font-family: "Playfair Display", serif;
  font-size: 4rem;
  background: rgba(13, 13, 13, 0.58);
}

.hover-bloom {
  position: fixed;
  z-index: 91;
  width: 48px;
  height: 48px;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gilt), transparent 8deg 18deg, var(--brass) 19deg 21deg, transparent 22deg 32deg);
  transform: translate(-50%, -50%) scale(0.2);
}
.hover-bloom.active { animation: ornament-bloom 1.2s ease-out; }

@keyframes draw-corner { to { stroke-dashoffset: 0; } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes grain-shift { to { background-position: 23px -41px; } }
@keyframes letter-assemble { to { opacity: 1; transform: translateY(0) rotate(0) scale(1); } }
@keyframes divider-pulse { 0%,100% { opacity: .16; transform: scale(.72); } 50% { opacity: .55; transform: scale(1); } }
@keyframes flare-drift { from { transform: translate3d(-18px, -10px, 0) scale(.92); } to { transform: translate3d(26px, 20px, 0) scale(1.14); } }
@keyframes flare-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } }
@keyframes boundary-bloom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.25); } 45% { opacity: .85; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } }
@keyframes countdown-fade { 0% { opacity: 0; transform: scale(.92); } 20%,70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
@keyframes ornament-bloom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); } 35% { opacity: .85; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.8) rotate(70deg); } }

@media (max-width: 760px) {
  .reel { padding: 14vh 12vw; }
  .blueprint-grid { inset: 10vh 12vw; }
  .diorama { grid-template-columns: 1fr; }
  .pilaster { display: none; }
  .hud-top, .hud-bottom { left: 16vw; right: 16vw; font-size: 0.62rem; }
  .hud-bottom { grid-template-columns: 1fr; text-align: center; }
  .hud-bottom span { display: none; }
}
