/* DEPTHREX™ — scroll-driven 3D championship site */

:root {
  --bg: #020B12;
  --ink: #EDE9E0;
  --ink-dim: rgba(237, 233, 224, 0.52);
  --ink-faint: rgba(237, 233, 224, 0.25);
  --gold: #D4A843;
  --gold-glow: rgba(212, 168, 67, 0.38);
  --gold-soft: rgba(212, 168, 67, 0.55);
  --electric: #00D4FF;
  --line: rgba(237, 233, 224, 0.09);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(24px, 5.5vw, 88px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ── Canvas ── */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: 0;
  background: radial-gradient(140% 130% at 58% 38%, #0c1828 0%, #020B12 55%, #010507 100%);
}

/* ── Overlays ── */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(130% 110% at 50% 50%, transparent 48%, rgba(1, 5, 10, 0.7) 100%);
}

/* ── Nav ── */
.chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 2.8vw, 32px) var(--pad);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
}

.tm {
  color: var(--gold);
  font-size: 0.65em;
  vertical-align: super;
  line-height: 1;
}

.meta {
  display: flex; gap: 10px; align-items: center;
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--ink-dim); text-transform: uppercase;
}
.meta .sep { color: var(--ink-faint); }

.nav-cta {
  font-family: "Bebas Neue", sans-serif;
  font-size: 13px; letter-spacing: 0.2em;
  padding: 9px 22px;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s;
}
.nav-cta:hover { background: var(--gold); color: var(--bg); }

/* ── Scroll rail ── */
.rail {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 5;
  width: 2px; background: var(--line); pointer-events: none;
}
.rail i {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: linear-gradient(var(--gold), var(--electric));
  box-shadow: 0 0 10px var(--gold);
}

/* ── Layout ── */
main { position: relative; z-index: 3; }

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  padding: var(--pad);
  pointer-events: none;
}
.panel > * { pointer-events: auto; }

/* ── HERO ── */
.hero {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.hero-content { max-width: 14ch; }

.eyebrow {
  font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 28px;
}

.display {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(72px, 17vw, 230px);
  line-height: 0.88;
  letter-spacing: 0.04em;
}
.display em {
  font-style: normal;
  color: var(--gold);
  text-shadow: 0 0 60px var(--gold-glow), 0 0 120px var(--gold-glow);
}

.lede {
  margin-top: 28px;
  max-width: 26ch;
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--ink-dim);
  line-height: 1.65;
}

/* ── Hero stats ── */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.stat-sep { color: rgba(212, 168, 67, 0.25); font-size: 11px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 15px; letter-spacing: 0.18em;
  padding: 14px 30px;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.35s var(--ease), color 0.35s, box-shadow 0.35s;
}
.btn:hover {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 48px var(--gold-glow);
}
.btn svg { flex-shrink: 0; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-hero { margin-top: 40px; }

/* ── Scroll cue ── */
.scroll-cue {
  position: absolute;
  bottom: clamp(22px, 4vh, 44px);
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 9px; letter-spacing: 0.32em;
  color: var(--ink-faint);
  pointer-events: none;
}
.cue-line {
  width: 1px; height: 54px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 0; }
  35%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(54px); opacity: 0; }
}

/* ── Depth Meter ── */
.depth-meter {
  position: fixed;
  right: clamp(20px, 3.5vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.depth-meter.vis { opacity: 1; }
.dm-label {
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--ink-dim);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
}
.dm-track {
  width: 2px;
  height: 100px;
  background: var(--line);
  position: relative;
  overflow: visible;
}
.dm-fill {
  position: absolute;
  top: 0; left: 0; width: 2px;
  background: linear-gradient(var(--gold), rgba(212,168,67,0.1));
  height: 0%;
  box-shadow: 0 0 8px rgba(212,168,67,0.6);
}
.dm-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(212,168,67,0.5);
}

/* ── Statements ── */
.statement { align-items: center; }
.statement.right { justify-content: flex-end; text-align: right; }

.stmt-inner {
  position: relative;
  overflow: hidden;
  max-width: min(55vw, calc(100vw - 2 * var(--pad)));
}

/* Gold rule line */
.rule {
  width: clamp(30px, 5vw, 50px);
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
  margin-bottom: 18px;
  transform-origin: left;
}
.statement.right .rule {
  transform-origin: right;
  margin-left: auto;
}

/* Ghost section number */
.ghost-num {
  position: absolute;
  bottom: -0.08em;
  right: -0.04em;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(110px, 20vw, 280px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(212, 168, 67, 0.055);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.statement.right .ghost-num {
  right: auto;
  left: -0.04em;
}
.stmt-inner > *:not(.ghost-num) { position: relative; z-index: 1; }

.index {
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 20px;
}

.big {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(46px, 8.5vw, 112px);
  line-height: 0.9;
  letter-spacing: 0.04em;
}

.body {
  margin-top: 22px;
  font-size: clamp(14px, 1.3vw, 17px);
  color: var(--ink-dim);
  line-height: 1.65;
}

.statement.right .stmt-inner { margin-left: auto; }

/* ── Disciplines ── */
.disc-list {
  list-style: none;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}
.disc-list li {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  display: flex; align-items: center; gap: 8px;
}
.dn {
  font-family: "Bebas Neue", sans-serif;
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  min-width: 22px;
}

/* ── Events Showcase ── */
.events-showcase {
  flex-direction: column;
  justify-content: center;
  min-height: auto;
  padding-top: clamp(80px, 12vh, 130px);
  padding-bottom: clamp(60px, 10vh, 100px);
}

.events-header {
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: min(55vw, calc(100vw - 2 * var(--pad)));
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.event-card {
  position: relative;
  aspect-ratio: 9 / 13;
  overflow: hidden;
  background: linear-gradient(160deg, #0a1e2e 0%, #030f18 100%);
  cursor: default;
}

/* Placeholder gradient per card — shows while asset loads */
.event-card[data-num="1"],  .event-card[data-num="01"] { background: linear-gradient(160deg, #0d2236 0%, #020b12 100%); }
.event-card[data-num="2"],  .event-card[data-num="02"] { background: linear-gradient(160deg, #0a1a2e 0%, #041020 100%); }
.event-card[data-num="3"],  .event-card[data-num="03"] { background: linear-gradient(160deg, #0c1f34 0%, #030e1c 100%); }
.event-card[data-num="4"],  .event-card[data-num="04"] { background: linear-gradient(160deg, #0e2030 0%, #020c18 100%); }
.event-card[data-num="5"],  .event-card[data-num="05"] { background: linear-gradient(160deg, #09222e 0%, #031118 100%); }
.event-card[data-num="6"],  .event-card[data-num="06"] { background: linear-gradient(160deg, #0b1f2c 0%, #040f16 100%); }
.event-card[data-num="7"],  .event-card[data-num="07"] { background: linear-gradient(160deg, #0d2234 0%, #030e1c 100%); }
.event-card[data-num="8"],  .event-card[data-num="08"] { background: linear-gradient(160deg, #0a1e30 0%, #020c18 100%); }
.event-card[data-num="9"],  .event-card[data-num="09"] { background: linear-gradient(160deg, #0c2030 0%, #031018 100%); }
.event-card[data-num="10"] { background: linear-gradient(160deg, #0e2230 0%, #040e18 100%); }
.event-card[data-num="11"] { background: linear-gradient(160deg, #0a1e2a 0%, #030c14 100%); }
.event-card[data-num="12"] { background: linear-gradient(160deg, #0d2234 0%, #030f1e 100%); }
.event-card[data-num="13"] { background: linear-gradient(160deg, #0b2030 0%, #040e18 100%); }
.event-card[data-num="14"] { background: linear-gradient(160deg, #06121c 0%, #010609 100%); }

.event-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}

.event-card:hover .event-media {
  opacity: 0.92;
  transform: scale(1.04);
}

/* Gold top-edge accent on hover */
.event-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
  z-index: 2;
}
.event-card:hover::before { transform: scaleX(1); }

.event-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 14px 14px;
  background: linear-gradient(transparent, rgba(2, 11, 18, 0.92));
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 2;
}

.event-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold);
  opacity: 0.9;
}

.event-name {
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}

.event-tag {
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--electric);
  opacity: 0.65;
  margin-top: 2px;
}

/* Video icon badge for clip cards */
.event-card--clip .event-overlay::after {
  content: "▶";
  position: absolute;
  top: -28px;
  right: 12px;
  font-size: 8px;
  color: var(--gold);
  opacity: 0.5;
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  .events-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .events-header { max-width: 92vw; }
  .event-card { aspect-ratio: 3 / 4; }
  .event-name { font-size: 11px; }
}
@media (max-width: 400px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── CTA / Register ── */
.cta { align-items: center; justify-content: center; text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.display.alt { font-size: clamp(54px, 11vw, 150px); }

/* ── Form ── */
.reg-form {
  margin-top: 44px;
  max-width: 580px;
  width: 100%;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.reg-form input,
.reg-form select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212, 168, 67, 0.2);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
}
.reg-form input:focus,
.reg-form select:focus { border-color: var(--gold); }
.reg-form input::placeholder { color: var(--ink-faint); }
.reg-form select option { background: #0a1828; color: var(--ink); }
.btn-submit { width: 100%; margin-top: 4px; justify-content: center; }

/* ── Success ── */
.success {
  display: none;
  margin-top: 52px;
  text-align: center;
}
.success-hl {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: 0.08em;
  color: var(--gold);
  text-shadow: 0 0 40px var(--gold-glow);
}
.success-sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-dim);
}

/* ── Footer ── */
.foot {
  margin-top: 64px;
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── Loader ── */
#loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
#loader.done { opacity: 0; visibility: hidden; }

.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.loader-icon { opacity: 0.9; }
.loader-word {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  letter-spacing: 0.22em;
  color: var(--ink);
}
.loader-bar {
  width: clamp(120px, 28vw, 200px);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-bar i {
  display: block; height: 100%; width: 0%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .meta { display: none; }
  .depth-meter { display: none; }
  .statement.right { justify-content: flex-start; text-align: left; }
  .statement.right .stmt-inner { margin-left: 0; }
  .statement.right .rule { transform-origin: left; margin-left: 0; }
  .statement.right .ghost-num { right: -0.04em; left: auto; }
  .stmt-inner { max-width: 92vw; }
  .hero-content { max-width: 92vw; }
  .hero-stats { flex-wrap: wrap; gap: 10px; }
  .disc-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .foot { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .cue-line { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   VANGUARD REDESIGN — Abyss Command Interface
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero hairline ── */
.hero-hairline {
  width: clamp(48px, 8vw, 80px);
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
  margin-bottom: 20px;
}

/* ── Hero content: left-border instrument frame ── */
.hero-content {
  border-left: 2px solid rgba(212, 168, 67, 0.4);
  padding-left: 24px;
  max-width: 14ch;
}

/* ── Panel rule (small gold hairline above .index) ── */
.panel-rule {
  border: none;
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  margin: 0 0 14px 0;
}
.statement.right .panel-rule {
  margin-left: auto;
  margin-right: 0;
}

/* ── Statement frames — instrument panel side borders ── */
.stmt-frame {
  border-left: 1px solid rgba(212, 168, 67, 0.3);
  padding: 0 0 0 32px;
}
.stmt-frame--right {
  border-left: none;
  border-right: 1px solid rgba(212, 168, 67, 0.3);
  padding: 0 32px 0 0;
}

/* ── Ghost numbers: tighter tracking ── */
.ghost-num {
  letter-spacing: -0.02em;
}

/* ── Big display: barely-there gold depth shadow ── */
.big {
  text-shadow: 0 0 80px rgba(212, 168, 67, 0.08);
}

/* ── Events list: single-column numbered card grid ── */
.disc-list {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.disc-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(237, 233, 224, 0.06);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.disc-list li:first-child {
  border-top: 1px solid rgba(237, 233, 224, 0.06);
}
.dn {
  font-family: "Bebas Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  min-width: 28px;
  flex-shrink: 0;
}
.dn-name {
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ── CTA gold rule above form ── */
.cta-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  margin: 32px auto 0;
}

/* ── CTA form: refined gold border states ── */
.reg-form input,
.reg-form select {
  border-color: rgba(212, 168, 67, 0.15);
}
.reg-form input:focus,
.reg-form select:focus {
  border-color: rgba(212, 168, 67, 0.5);
}

/* ── CTA crown: deeper gold glow ── */
.display.alt em {
  text-shadow: 0 0 80px rgba(212, 168, 67, 0.5), 0 0 30px rgba(212, 168, 67, 0.3);
}

/* ── Mobile: collapse frames to left-only ── */
@media (max-width: 720px) {
  .hero-content {
    padding-left: 16px;
    border-left-width: 2px;
    max-width: 92vw;
  }
  .stmt-frame,
  .stmt-frame--right {
    border-left: 1px solid rgba(212, 168, 67, 0.3);
    border-right: none;
    padding: 0 0 0 16px;
  }
  .panel-rule {
    margin-left: 0;
  }
}
