:root {
  --red: #df0018;
  --red-2: #ff2845;
  --red-dark: #840010;
  --white: #ffffff;
  --gold: #ffd269;
  --black: #080808;
  --soft: #d7d7d7;
  --panel: rgba(255,255,255,.055);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #050505; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
}
button, a { font: inherit; }

.app {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 50% 42%, #2b0009 0, #110004 36%, #050505 75%);
}
.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .75s ease, visibility .75s ease;
  z-index: 10;
}
.screen.active { opacity: 1; visibility: visible; }
.center {
  width: min(92vw, 1120px);
  margin: auto;
  text-align: center;
  position: relative;
  z-index: 4;
}

.bg-grid {
  position: absolute;
  inset: -10%;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(900px) rotateX(72deg) translateY(38%);
  transform-origin: center bottom;
  z-index: 0;
}
.scanlines {
  position: absolute;
  inset: 0;
  opacity: .10;
  pointer-events: none;
  z-index: 40;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(255,255,255,.08) 4px);
  mix-blend-mode: overlay;
}
.noise {
  position: absolute;
  inset: -50%;
  z-index: 39;
  pointer-events: none;
  opacity: .035;
  background-image: url("assets/images/noise.svg");
  animation: noiseMove .25s steps(2) infinite;
}
.vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow: inset 0 0 160px rgba(0,0,0,.75);
}
.aurora {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .16;
  z-index: 1;
}
.aurora-1 {
  left: -15vmax;
  top: -10vmax;
  background: radial-gradient(circle, rgba(255,39,73,.65), rgba(255,39,73,0));
  animation: floatOrb 12s ease-in-out infinite;
}
.aurora-2 {
  right: -16vmax;
  bottom: -18vmax;
  background: radial-gradient(circle, rgba(255,255,255,.26), rgba(255,255,255,0));
  animation: floatOrb 15s ease-in-out infinite reverse;
}

.glass-panel {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  box-shadow: 0 20px 100px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
  opacity: .78;
  margin: 0 0 12px;
}

.start-screen {
  background: radial-gradient(circle at 50% 35%, rgba(224,0,24,.24), transparent 42%);
  z-index: 55;
}
.start-card {
  text-align: center;
  width: min(88vw, 640px);
  padding: 34px 26px;
  position: relative;
  z-index: 4;
  border-radius: 32px;
}
.start-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: .5;
}
.orb-1 {
  width: 170px; height: 170px; left: 18%; top: 20%;
  background: radial-gradient(circle, rgba(255,40,69,.45), transparent 70%);
  animation: floatOrb 8s ease-in-out infinite;
}
.orb-2 {
  width: 120px; height: 120px; right: 20%; bottom: 18%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 72%);
  animation: floatOrb 7s ease-in-out infinite reverse;
}
.logo-main {
  width: 112px;
  filter: drop-shadow(0 0 28px rgba(255,0,30,.4));
  animation: float 3s ease-in-out infinite;
}
.start-card h1 {
  margin: 16px 0 0;
  font-size: clamp(56px, 16vw, 116px);
  line-height: .85;
  letter-spacing: -.075em;
  font-style: italic;
}
.start-card h1 span { -webkit-text-stroke: 2px #fff; color: transparent; }
.start-copy {
  max-width: 500px;
  margin: 18px auto 24px;
  color: #dddddd;
  line-height: 1.68;
}
.start-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.audio-note { margin: 16px 0 0; opacity: .45; font-size: 12px; }
.audio-note code { color: #fff; }

.btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 850;
  letter-spacing: .02em;
  transition: transform .2s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.01); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff1733, #bd0016);
  box-shadow: 0 12px 40px rgba(218,0,24,.32);
}
.btn-light {
  color: #a50012;
  background: #fff;
  box-shadow: 0 15px 50px rgba(255,255,255,.14);
}
.btn-ghost {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
}

.stage { display: grid; place-items: center; }
.scene-logo { width: 130px; opacity: 0; transform: scale(.55); }
.intro-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(64px, 15vw, 146px);
  font-weight: 400;
  letter-spacing: -.02em;
  opacity: 0;
  transform: translateY(32px) skewX(-6deg);
}
.intro-title span { color: #ff1530; }
.intro-sub {
  margin: 10px 0 0;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #d2d2d2;
  opacity: 0;
  transform: translateY(16px);
}
.intro-scene.active .scene-logo { animation: logoReveal 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.intro-scene.active .intro-title { animation: titleReveal .9s .55s cubic-bezier(.2,.8,.2,1) forwards; }
.intro-scene.active .intro-sub { animation: fadeUp .8s 1.15s ease forwards; }
.pulse-ring {
  position: absolute;
  width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,0,30,.3);
  opacity: 0;
}
.intro-scene.active .ring-1 { animation: ring 2s .3s ease-out infinite; }
.intro-scene.active .ring-2 { animation: ring 2s 1s ease-out infinite; }
.intro-scene.active .ring-3 { animation: ring 2s 1.7s ease-out infinite; }

.flag-scene {
  background: linear-gradient(180deg, #b90014 0 49.5%, #f8f8f8 50% 100%);
  overflow: hidden;
}
.flag-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0, rgba(0,0,0,.28) 100%);
}
.flag-ribbon {
  position: absolute;
  width: 150%;
  min-width: 1400px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-4deg);
  opacity: .44;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.18));
}
.flag-copy { text-shadow: 0 4px 35px rgba(0,0,0,.35); }
.flag-copy .small-title { font-weight: 900; letter-spacing: .22em; font-size: 12px; }
.flag-copy h2 {
  margin: 5px 0 2px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(88px, 20vw, 190px);
  line-height: .86;
  letter-spacing: .01em;
}
.flag-copy .tagline {
  width: min(86vw, 720px);
  margin: 18px auto 0;
  font-weight: 700;
  line-height: 1.55;
  color: #121212;
  text-shadow: none;
}
.flag-scene.active .flag-ribbon { animation: ribbonMove 6s ease-in-out infinite alternate; }
.flag-scene.active .flag-copy { animation: flagCopy .9s ease both; }

.parade-scene { background: linear-gradient(180deg, #e3001a 0, #9e0013 100%); }
.sunburst {
  position: absolute;
  width: 150vmax;
  aspect-ratio: 1;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.07) 0deg 5deg, transparent 5deg 10deg);
  animation: spin 32s linear infinite;
}
.parade-wrap { position: relative; }
.number81 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(220px, 48vw, 470px);
  line-height: .7;
  font-size: clamp(250px, 55vw, 580px);
  font-weight: 1000;
  letter-spacing: -.16em;
  font-style: italic;
  filter: drop-shadow(0 22px 0 rgba(110,0,12,.25));
}
.number81 .n8 { color: #fff; }
.number81 .n1 { color: transparent; -webkit-text-stroke: 7px #fff; transform: translateX(-.02em); }
.republic {
  margin-top: 8px;
  font-size: clamp(20px, 4vw, 38px);
  font-weight: 1000;
  letter-spacing: .17em;
}
.year { margin-top: 10px; letter-spacing: .32em; font-weight: 900; opacity: .8; }
.parade-line {
  margin-top: 14px;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.city {
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%;
  height: 26vh;
  object-fit: cover;
  object-position: center bottom;
  opacity: .24;
}
.parade-scene.active .number81 { animation: numberDrop 1s cubic-bezier(.16,.9,.28,1.18) both; }
.parade-scene.active .republic { animation: fadeUp .7s .55s both; }
.parade-scene.active .year { animation: fadeUp .7s .75s both; }
.parade-scene.active .parade-line { animation: fadeUp .7s .95s both; }

.reality-scene {
  background: radial-gradient(circle at top, rgba(255,0,25,.16), transparent 35%), linear-gradient(180deg, #0b0b0b 0%, #160004 100%);
}
.reality-wrap h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: .95;
  letter-spacing: -.05em;
}
.reality-wrap h2 span { color: #ff3650; }
.reality-ticker {
  width: min(92vw, 1040px);
  margin: 0 auto 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
}
.reality-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  padding: 12px 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  animation: ticker 22s linear infinite;
}
.reality-ticker-track span:nth-child(odd) { color: #ffd0d4; }
.reality-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: min(94vw, 1120px);
  margin: 0 auto 18px;
}
.reality-card {
  min-height: 250px;
  text-align: left;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,.24);
  opacity: .45;
  transform: scale(.97) translateY(16px);
  transition: .45s ease;
}
.reality-card.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  border-color: rgba(255,95,120,.4);
  box-shadow: 0 22px 70px rgba(255,20,60,.18);
}
.reality-card .card-icon { font-size: 32px; margin-bottom: 12px; }
.reality-card h3 { margin: 0 0 10px; font-size: 26px; }
.reality-card p { margin: 0; color: #dcdcdc; line-height: 1.68; }
.reality-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: min(94vw, 1120px);
  margin: 0 auto;
}
.metric-box, .chart-box {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}
.metric-box .label {
  display: block;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .72;
  margin-bottom: 8px;
}
.metric-box strong {
  display: block;
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 5px;
}
.metric-box small { color: #cdcdcd; }
.metric-box:nth-child(1) strong { color: #ff6b7f; }
.metric-box:nth-child(2) strong { color: #ffffff; }
.metric-box:nth-child(3) strong { color: #ffd56a; }
.chart-box { text-align: left; }
.chart-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: #ffd2d8;
}
.mini-chart {
  position: relative;
  height: 86px;
  border-radius: 16px;
  background:
    linear-gradient(to top, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.05));
  background-size: 100% 25%, 12.5% 100%, auto;
  overflow: hidden;
}
.line-bg,
.line {
  position: absolute;
  inset: 0;
}
.line-rise::before,
.line-flat::before {
  content: "";
  position: absolute;
  inset: 0;
}
.line-rise::before {
  clip-path: polygon(0% 82%, 12% 78%, 24% 74%, 36% 65%, 48% 54%, 60% 40%, 72% 30%, 84% 18%, 100% 5%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, rgba(255,55,85,.08), rgba(255,55,85,.3));
}
.line-flat::before {
  clip-path: polygon(0% 72%, 12% 72%, 24% 71%, 36% 71%, 48% 70%, 60% 70%, 72% 69%, 84% 69%, 100% 68%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.14));
}
.chart-tag {
  position: absolute;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
}
.tag-rise { right: 10px; top: 8px; color: #ff8b9a; }
.tag-flat { left: 10px; bottom: 8px; color: #ffffff; }

.quote-scene {
  background: radial-gradient(circle at 50% 30%, rgba(255,22,48,.22), transparent 38%), linear-gradient(145deg, #090909, #180005);
}
.quote-wrap {
  width: min(88vw, 920px);
  border-radius: 32px;
  padding: clamp(28px, 6vw, 58px);
}
.typewriter-text {
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.quote-sub {
  max-width: 700px;
  margin: 16px auto 0;
  color: #d7d7d7;
  line-height: 1.68;
}

.message-scene {
  background: radial-gradient(circle at 50% 30%, rgba(255,22,48,.2), transparent 36%), linear-gradient(145deg, #080808, #160004);
}
.message-card {
  width: min(88vw, 860px);
  padding: clamp(28px, 6vw, 58px);
  border-radius: 32px;
}
.message-card .mini-flag {
  width: 62px;
  height: 38px;
  margin: auto;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 7px 20px rgba(0,0,0,.25);
}
.mini-flag span { display: block; height: 50%; }
.mini-flag span:first-child { background: #e4001c; }
.mini-flag span:last-child { background: #fff; }
.message-card h2 {
  margin: 8px 0 18px;
  font-size: clamp(38px, 8vw, 74px);
  line-height: .96;
  letter-spacing: -.055em;
}
.message-card h2 strong { color: #ff1733; font-size: 1.08em; }
.message-card > p:last-of-type {
  max-width: 680px;
  margin: 0 auto;
  color: #d7d7d7;
  font-size: clamp(15px, 2.6vw, 19px);
  line-height: 1.72;
}
.message-quote {
  margin: 18px auto 0;
  max-width: 640px;
  color: #ffe0aa;
  font-size: clamp(14px, 2.4vw, 17px);
  font-weight: 750;
  line-height: 1.65;
}
.message-scene.active .message-card { animation: cardIn 1s cubic-bezier(.2,.8,.2,1) both; }

.final-scene { background: linear-gradient(180deg, #df001a 0, #a80014 100%); }
.final-glow {
  position: absolute;
  width: 75vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  filter: blur(20px);
  box-shadow: 0 0 130px rgba(255,255,255,.12);
}
.final-logo { width: 100px; filter: drop-shadow(0 14px 30px rgba(0,0,0,.22)); }
.final-content h2 {
  margin: 8px 0 12px;
  font-size: clamp(44px, 9vw, 88px);
  line-height: .93;
  letter-spacing: -.06em;
}
.final-copy {
  margin: 0 auto 28px;
  max-width: 680px;
  line-height: 1.6;
  font-weight: 650;
}
.final-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-mark {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  opacity: .55;
  text-align: center;
  padding: 0 20px;
}
.final-scene.active .final-content { animation: finalPop .9s cubic-bezier(.2,.8,.2,1) both; }

.sound-btn {
  position: absolute;
  top: max(15px, env(safe-area-inset-top));
  right: 15px;
  z-index: 70;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.progress {
  position: absolute;
  z-index: 70;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255,255,255,.13);
  opacity: 0;
  transition: .3s;
}
.progress.show { opacity: 1; }
.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 15px rgba(255,255,255,.7);
}

.particles,
.fireworks {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  top: -12vh;
  width: 9px;
  height: 18px;
  border-radius: 2px;
  opacity: .92;
  animation: fall linear forwards;
}
.particle.red { background: #e00018; }
.particle.white { background: #fff; }
.fw-burst {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.fw-burst::before {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9) 0 4%, rgba(255,255,255,.4) 4%, rgba(255,255,255,0) 60%);
  opacity: 0;
  animation: explode 1.2s ease-out forwards;
}
.fw-burst.red::before { background: radial-gradient(circle, rgba(255,62,90,.95) 0 4%, rgba(255,62,90,.35) 4%, rgba(255,62,90,0) 60%); }
.fw-burst.gold::before { background: radial-gradient(circle, rgba(255,210,105,.95) 0 4%, rgba(255,210,105,.35) 4%, rgba(255,210,105,0) 60%); }

@keyframes noiseMove {
  0% { transform: translate(0); }
  25% { transform: translate(3%, -2%); }
  50% { transform: translate(-2%, 2%); }
  75% { transform: translate(1%, 3%); }
  100% { transform: translate(0); }
}
@keyframes logoReveal {
  0% { opacity: 0; transform: scale(.45) rotate(-8deg); filter: blur(10px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes titleReveal { to { opacity: 1; transform: translateY(0) skewX(-6deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ring { 0% { opacity: .75; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes ribbonMove { from { transform: translate(-51%, -50%) rotate(-5deg) scale(1.03); } to { transform: translate(-49%, -50%) rotate(-2deg) scale(1.08); } }
@keyframes flagCopy { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes numberDrop {
  0% { opacity: 0; transform: translateY(-80px) scale(1.2); }
  65% { opacity: 1; transform: translateY(12px) scale(.98); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes cardIn { from { opacity: 0; transform: translateY(50px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes finalPop { from { opacity: 0; transform: scale(.91); } to { opacity: 1; transform: scale(1); } }
@keyframes fall { to { transform: translate3d(var(--drift), 120vh, 0) rotate(720deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes floatOrb { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(18px,-20px,0) scale(1.08); } }
@keyframes explode {
  0% { opacity: .95; transform: scale(.25); }
  100% { opacity: 0; transform: scale(1.3); }
}

@media (max-width: 1040px) {
  .reality-grid { grid-template-columns: repeat(2, 1fr); }
  .reality-dashboard { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .intro-sub { font-size: 11px; letter-spacing: .12em; }
  .flag-copy .tagline { font-size: 14px; }
  .number81 { letter-spacing: -.19em; }
  .number81 .n1 { -webkit-text-stroke-width: 4px; }
  .republic { letter-spacing: .1em; }
  .year { letter-spacing: .18em; }
  .btn-light, .btn-ghost, .btn-primary { width: min(86vw, 340px); }
  .reality-grid, .reality-dashboard { grid-template-columns: 1fr; width: min(90vw, 560px); }
  .reality-card { min-height: auto; }
  .footer-mark { font-size: 10px; letter-spacing: .12em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
