/* =====================================================================
   R.I.P. v2 · eSports layer: fixed animated background, glass panels,
   HUD typography, hero stage, ticker, stats. Loaded after style.css.
   ===================================================================== */
html { background: #050708; }
body { background: transparent; position: relative; }

.bg-canvas, .bg-image, .bg-veil { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bg-canvas { z-index: -3; }
.bg-image { z-index: -3; background-size: cover; background-position: center; }
.bg-veil {
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(7, 9, 10, 0) 0%, rgba(5, 7, 8, 0.4) 60%, rgba(5, 7, 8, 0.82) 100%),
    linear-gradient(180deg, rgba(5, 7, 8, 0.25) 0%, rgba(5, 7, 8, 0.62) 100%);
}
.bg-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("../assets/noise.svg");
}

/* scroll progress */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 80; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--teal), var(--orange)); box-shadow: 0 0 12px rgba(255, 122, 26, 0.7); pointer-events: none; }

/* ---------- type ---------- */
.h {
  font-family: var(--head);
  font-style: italic;
  font-weight: 900;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  letter-spacing: 0.005em;
  line-height: 0.98;
}
.h2 { font-size: clamp(2.1rem, 5.6vw, 4.1rem); }
.h3 { font-size: 1.4rem; font-stretch: 115%; font-variation-settings: "wdth" 115; }
.kicker { font-family: var(--mono); font-style: normal; font-weight: 400; letter-spacing: 0.26em; font-size: 0.8rem; }
.kicker::before { width: 40px; height: 2px; box-shadow: 0 0 10px rgba(34, 195, 192, 0.7); }
.brand { font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; letter-spacing: 0.06em; }
.btn { font-weight: 900; font-stretch: 115%; font-variation-settings: "wdth" 115; letter-spacing: 0.14em; position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 38%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-20deg); transition: left 0.6s var(--ease); }
.btn:hover::after { left: 130%; }
.spec th, .week b, .vote-flow strong, .podium strong, .phase__fee, .card__num, .calc output { font-stretch: 118%; font-variation-settings: "wdth" 118; }
.week b, .vote-flow strong { font-weight: 800; }
.spec th, .tag, .phase__flag, .note, .podium span { font-family: var(--mono); font-style: normal; font-weight: 400; }
.spec th { letter-spacing: 0.14em; font-size: 0.78rem; }
.tag { letter-spacing: 0.18em; }

/* ---------- glass surfaces over the fixed background ---------- */
.nav { background: rgba(5, 7, 8, 0.6); }
.section { background: transparent; }
.section--alt { background: linear-gradient(180deg, rgba(8, 12, 14, 0.62), rgba(8, 12, 14, 0.78)); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border-color: rgba(233, 238, 240, 0.07); }
.card, .panel, .phase, .spec { background: linear-gradient(180deg, rgba(20, 27, 31, 0.72), rgba(11, 16, 19, 0.78)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: rgba(233, 238, 240, 0.09); }
.phase--now { background: linear-gradient(180deg, rgba(34, 195, 192, 0.2), rgba(11, 16, 19, 0.8)); }
.podium div { background: rgba(11, 16, 19, 0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.page-hero { background: linear-gradient(180deg, rgba(5, 7, 8, 0.2), rgba(5, 7, 8, 0.55)); }
.foot { background: rgba(5, 7, 8, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card { transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.card:hover { transform: translateY(-4px); border-color: rgba(34, 195, 192, 0.5); box-shadow: 0 12px 40px rgba(34, 195, 192, 0.12); }
.card--o:hover { border-color: rgba(255, 122, 26, 0.55); box-shadow: 0 12px 40px rgba(255, 122, 26, 0.14); }
.card__num { font-weight: 900; font-size: 4rem; color: rgba(233, 238, 240, 0.07); }

/* ---------- hero stage ---------- */
.hero { overflow: visible; }
.hero__poster { padding-top: 6px; background: transparent; }
.hero__poster::after { display: none; }
.hero__stage {
  --px: 0; --py: 0;
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, #000 80%, transparent 100%);
  mask-composite: intersect;
}
.hero__img { display: block; transform: translate3d(calc(var(--px) * -16px), calc(var(--py) * -10px), 0); transition: transform 0.35s var(--ease); opacity: 0; will-change: transform; }
.hero__img img { max-height: 88vh; width: auto; max-width: 100%; margin: 0 auto; -webkit-mask-image: none; mask-image: none; transform-origin: 50% 62%; }
.hero__stage.is-lit .hero__img { animation: ignite 1.9s linear forwards; }
.hero__stage.is-lit .hero__img img { animation: zoomIn 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes ignite {
  0% { opacity: 0; } 6% { opacity: 0.55; } 9% { opacity: 0.08; } 15% { opacity: 0.85; } 19% { opacity: 0.2; }
  28% { opacity: 0.95; } 33% { opacity: 0.55; } 42% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes zoomIn { from { transform: scale(1.16); filter: brightness(0.55) saturate(0.7); } to { transform: scale(1); filter: none; } }

.hero__fx { position: absolute; inset: 0; pointer-events: none; }
.hero__embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.hero__glow { position: absolute; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; mix-blend-mode: screen; opacity: 0; background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(34, 195, 192, 0.42) 26%, rgba(34, 195, 192, 0) 66%); }
.hero__glow--o { background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 122, 26, 0.45) 26%, rgba(255, 122, 26, 0) 66%); }
.hero__stage.is-lit .hero__glow { animation: pulse 3.4s ease-in-out 1.6s infinite; }
.hero__glow:nth-of-type(2) { animation-delay: 2.2s !important; }
.hero__glow:nth-of-type(3) { animation-delay: 1.9s !important; }
.hero__glow:nth-of-type(4) { animation-delay: 2.6s !important; }
@keyframes pulse { 0%, 100% { opacity: 0; } 18% { opacity: 0.9; } 30% { opacity: 0.35; } 48% { opacity: 0.8; } 70% { opacity: 0.15; } }
.hero__sweep { position: absolute; left: 30%; top: 17%; width: 42%; height: 19%; overflow: hidden; mix-blend-mode: overlay; }
.hero__sweep::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%); background-size: 280% 100%; background-position: 160% 0; animation: sweep 6.5s ease-in-out 2.8s infinite; }
@keyframes sweep { 0% { background-position: 160% 0; } 38%, 100% { background-position: -70% 0; } }
.hero__scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px); opacity: 0.35; mix-blend-mode: multiply; overflow: hidden; }
.hero__scan::after { content: ""; position: absolute; left: 0; right: 0; height: 22%; top: -22%; background: linear-gradient(180deg, transparent, rgba(34, 195, 192, 0.18), transparent); animation: scanbar 7s linear 2s infinite; }
@keyframes scanbar { to { top: 112%; } }
.hero__hud { position: absolute; inset: 16px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; color: rgba(233, 238, 240, 0.7); text-transform: uppercase; opacity: 0; }
.hero__stage.is-lit .hero__hud { animation: fadeIn 1s ease 2.2s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.hero__hud i { position: absolute; width: 22px; height: 22px; border: 2px solid var(--teal); }
.hero__hud .tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.hero__hud .tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-color: var(--orange); }
.hero__hud .bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.hero__hud .br { right: 0; bottom: 0; border-left: 0; border-top: 0; border-color: var(--orange); }
.hero__hud span { position: absolute; }
.hero__hud .l1 { left: 34px; top: 4px; }
.hero__hud .l2 { right: 34px; top: 4px; }
.hero__hud .l3 { left: 34px; bottom: 4px; }
.hero__hud .l4 { right: 34px; bottom: 4px; color: var(--orange); }
.hero__hud b { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 8px; animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.hero__bar { padding-top: clamp(0px, 2vw, 18px); }
.hero__sub { font-size: 1.15rem; color: #b6c0c5; }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-top: 1px solid rgba(233, 238, 240, 0.1); border-bottom: 1px solid rgba(233, 238, 240, 0.1); background: rgba(5, 7, 8, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ticker__track { display: flex; width: max-content; animation: tick 46s linear infinite; }
.ticker__track span { font-family: var(--head); font-style: italic; font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.05rem; padding: 14px 0; white-space: nowrap; color: rgba(233, 238, 240, 0.85); }
.ticker__track em { font-style: normal; color: var(--orange); padding: 0 26px; }
.ticker__track b { color: var(--teal); font-weight: 900; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(233, 238, 240, 0.1); background: rgba(8, 12, 14, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stat { padding: 30px 22px; border-right: 1px solid rgba(233, 238, 240, 0.08); position: relative; }
.stat:last-child { border-right: 0; }
.stat::before { content: ""; position: absolute; left: 22px; top: 0; width: 38px; height: 3px; background: linear-gradient(90deg, var(--teal), var(--orange)); }
.stat b { display: block; font-family: var(--head); font-style: italic; font-weight: 900; font-stretch: 125%; font-variation-settings: "wdth" 125; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; margin-top: 8px; }
.stat b sup { font-size: 0.42em; color: var(--orange); margin-left: 4px; vertical-align: top; position: relative; top: 0.2em; }
.stat span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(233, 238, 240, 0.08); }
}
@media (max-width: 760px) {
  .hero__hud { font-size: 0.58rem; inset: 8px; letter-spacing: 0.1em; }
  .hero__hud i { width: 14px; height: 14px; }
  .hero__hud .l1, .hero__hud .l3 { left: 22px; }
  .hero__hud .l2, .hero__hud .l4 { right: 22px; }
  .hero__img img { max-height: none; width: 100%; }
  .h2 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__img { opacity: 1; }
  .hero__stage.is-lit .hero__img, .hero__stage.is-lit .hero__img img, .hero__glow, .hero__sweep::before, .hero__scan::after, .ticker__track, .hero__hud b { animation: none !important; }
  .hero__hud { opacity: 1; }
  .ticker__track { flex-wrap: wrap; width: auto; }
}
.hero__img { position: relative; }
.hero__hud { inset: 16px 16px 11% 16px; }
