/* FightHub 3D hero (hero3d.js). Always dark: it is a scene, whatever the site theme. */
.h3d {
  position: relative;
  height: 900vh;
  background: #050506;
  color: #fff;
  --h3d-side: max(24px, calc((100vw - 1240px) / 2 + 24px));
}
.h3d-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
/* The opening shot: the ring photo, scaled by hero3d.js as the camera pushes in */
.h3d-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #050506;
}
.h3d-photo-inner {
  position: absolute;
  left: 0;
  top: 0;
  width: 3840px;
  height: 2041px;
  transform-origin: 0 0;
  will-change: transform;
}
.h3d-photo-inner img { display: block; width: 100%; height: 100%; max-width: none; }
/* The spotlights breathe gently */
.h3d-photo-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 16% 34% at 64.5% 0%, rgba(255, 238, 226, 0.16), transparent 70%),
    radial-gradient(ellipse 7% 16% at 92.5% 0%, rgba(255, 70, 85, 0.2), transparent 70%);
  animation: h3d-breathe 6s ease-in-out infinite;
}
@keyframes h3d-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
/* A soft shade behind the opening headline */
.h3d-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.55) 0%, rgba(5, 5, 6, 0.2) 40%, rgba(5, 5, 6, 0) 60%);
}
/* Narrow screens: the photo sits in the upper part, its edges fading into the dark */
@media (max-aspect-ratio: 23/20) {
  .h3d-photo-inner img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28%, #000 78%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 28%, #000 78%, transparent 100%);
  }
  .h3d-photo::after { background: linear-gradient(0deg, rgba(5, 5, 6, 0.85) 0%, rgba(5, 5, 6, 0.4) 35%, rgba(5, 5, 6, 0) 55%); }
}
.h3d-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.h3d-flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 55%, #fff 0%, #ffe3e5 16%, rgba(230, 57, 70, 0.85) 42%, rgba(5, 5, 6, 0) 78%);
}

/* Loading screen */
.h3d-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: #050506;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.h3d-ready .h3d-loader { opacity: 0; visibility: hidden; }
.h3d-loader img { width: 88px; height: 88px; }
.h3d-loader p {
  margin: 0;
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8f8f98;
}
.h3d-loader-bar { width: 180px; height: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.h3d-loader-bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width 0.3s ease; }

/* Text that appears at moments of the journey */
.h3d-copy {
  position: absolute;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
}
.h3d-copy.is-live { pointer-events: auto; }
/* Side text is centred top to bottom, clear of the chapter bar, so it never runs off the screen */
.h3d-intro, .h3d-left, .h3d-right {
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 0 92px;
}
.h3d-intro { left: var(--h3d-side); max-width: 640px; }
.h3d-left { left: var(--h3d-side); max-width: 460px; }
.h3d-right { right: var(--h3d-side); max-width: 460px; }
.h3d-center { left: 0; right: 0; margin: 0 auto; width: min(720px, calc(100% - 32px)); text-align: center; }
.h3d-low { bottom: 16vh; }
.h3d-high { top: calc(var(--navbar-height) + 4vh); }

.h3d-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 11px/1.2 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.h3d-eyebrow::before { content: ''; width: 26px; height: 2px; background: currentColor; }
.h3d-center .h3d-eyebrow::after { content: ''; width: 26px; height: 2px; background: currentColor; }
.h3d h1, .h3d-title {
  margin: 14px 0 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(38px, min(7.2vw, 11.5vh), 108px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: #fff;
}
.h3d-title { font-size: clamp(32px, min(5vw, 8.5vh), 72px); }
.h3d-lede {
  margin: 16px 0 0;
  font: 400 clamp(15px, 1.25vw, 18px)/1.6 var(--font-body);
  color: #c9c9d1;
  max-width: 560px;
}
.h3d-center .h3d-lede { margin-left: auto; margin-right: auto; }
.h3d-facts { margin: 14px 0 0; font: 600 13px/1.4 var(--font-body); color: #8f8f98; letter-spacing: 0.04em; }
.h3d-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #a6a6ae;
}
.h3d-cue i {
  width: 18px;
  height: 28px;
  border: 1.5px solid #6d6d76;
  border-radius: 10px;
  position: relative;
}
.h3d-cue i::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 6px;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--accent);
  animation: h3d-cue 1.8s ease-in-out infinite;
}
@keyframes h3d-cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
.h3d .hero-buttons { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.h3d-center .hero-buttons { justify-content: center; }

/* Glass cards, like the rest of the site */
.h3d-card {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(12, 12, 15, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.h3d-card strong { font: 400 clamp(26px, 2.4vw, 34px)/1.02 var(--font-heading); letter-spacing: 0.01em; color: #fff; }
.h3d-card small { font: 500 14px/1.4 var(--font-body); color: #a9a9b2; }
.h3d-card a { font: 600 14px/1.4 var(--font-body); color: #ff6b78; text-decoration: none; }
.h3d-card a:hover { color: #fff; }
.h3d-stack { display: grid; gap: 14px; }

/* Chapter bar */
.h3d-chapters {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(12, 12, 15, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}
.h3d-ready .h3d-chapters { opacity: 1; }
.h3d-chapters button, .h3d-chapters a {
  position: relative;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 700 10.5px/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8a93;
  cursor: pointer;
  text-decoration: none;
}
.h3d-chapters button:hover, .h3d-chapters a:hover { color: #fff; }
.h3d-chapters button.is-active { color: #fff; background: rgba(230, 57, 70, 0.2); }
.h3d-chapters a { color: #c9c9d1; border-left: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0 999px 999px 0; }
.h3d-chapters-bar { position: absolute; left: 18px; right: 18px; bottom: 2px; height: 2px; background: rgba(255, 255, 255, 0.06); border-radius: 2px; overflow: hidden; }
.h3d-chapters-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.h3d :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Smooth scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* Short windows: tighter spacing */
@media (max-height: 680px) {
  .h3d-lede { margin-top: 10px; }
  .h3d-cue { margin-top: 14px; }
  .h3d .hero-buttons { margin-top: 16px; }
  .h3d-intro, .h3d-left, .h3d-right { padding: 20px 0 80px; }
}
@media (max-height: 540px) {
  .h3d-cue, .h3d-facts { display: none; }
}

@media (max-width: 700px) {
  .h3d { height: 780vh; }
  .h3d-intro, .h3d-left, .h3d-right { display: block; top: auto; padding: 0; }
  .h3d-intro { bottom: 13vh; right: 16px; left: 16px; }
  .h3d-left, .h3d-right { left: 16px; right: 16px; bottom: 15vh; max-width: none; }
  .h3d-high { top: calc(var(--navbar-height) + 2vh); }
  .h3d-low { bottom: 15vh; }
  .h3d-card { padding: 16px 18px; }
  .h3d-chapters { bottom: 14px; }
  .h3d-chapters button { padding: 9px 8px; letter-spacing: 0.12em; font-size: 9.5px; }
  .h3d-chapters a { padding: 9px 10px; font-size: 9.5px; letter-spacing: 0.12em; }
}

/* Still version: reduced motion, or no 3D on this device */
.h3d-static { height: auto; }
.h3d-static .h3d-stage {
  position: relative;
  height: auto;
  min-height: 100svh;
  padding: calc(var(--navbar-height) + 8vh) 0 10vh;
  background:
    radial-gradient(ellipse 60% 50% at 75% 35%, rgba(230, 57, 70, 0.3), transparent 70%),
    linear-gradient(180deg, #0b0b0d, #050506);
}
.h3d-static .h3d-photo { display: none; }
.h3d-static .h3d-stage {
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.6) 45%, rgba(5, 5, 6, 0.1) 75%),
    url(ring-2400.webp) 70% center / cover no-repeat,
    #050506;
}
.h3d-static .h3d-canvas, .h3d-static .h3d-loader, .h3d-static .h3d-flash, .h3d-static .h3d-chapters { display: none; }
.h3d-static .h3d-copy { display: none; }
.h3d-static .h3d-intro, .h3d-static .h3d-final {
  display: block;
  position: relative;
  inset: auto;
  margin: 0 var(--h3d-side) 8vh;
  padding: 0;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto;
  text-align: left;
}
.h3d-static .h3d-final .h3d-eyebrow::after { display: none; }
.h3d-static .h3d-final .hero-buttons { justify-content: flex-start; }
.h3d-static .h3d-cue { display: none; }

/* The closing line sits a little lower, under FIGHT HUB */
@media (min-width: 701px) {
  .h3d-final { bottom: 9vh; }
}

/* Full screen: the site header slides away during the journey and returns at the end */
body.h3d-immersive .navbar {
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
