/* ============================================================
   DEVX — DEEP FIELD
   obsidian · bone · signal red
   ============================================================ */

/* ---------- fonts ---------- */
@font-face {
  font-family: "Clash Display";
  src: url("../fonts/clash-display-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("../fonts/clash-display-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("../fonts/clash-display-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("../fonts/general-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("../fonts/general-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("../fonts/general-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #07080a;
  --bg-2: #0b0d10;
  --panel: rgba(233, 230, 221, 0.028);
  --panel-2: rgba(233, 230, 221, 0.05);
  --ink: #f0eee9;
  --ink-dim: rgba(233, 230, 221, 0.62);
  --ink-faint: rgba(233, 230, 221, 0.34);
  --line: rgba(233, 230, 221, 0.14);
  --line-strong: rgba(233, 230, 221, 0.26);
  --red: #ff3d2e;
  --red-deep: #b3231a;
  --warn: #ff3d2e;
  --obsidian: #07080a;

  --font-display: "Clash Display", "General Sans", sans-serif;
  --font-body: "General Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --wrap: min(1400px, 100% - var(--pad) * 2);

  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--red); color: var(--obsidian); }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: normal; }
s { text-decoration: none; }
b { font-weight: inherit; }
i { font-style: normal; }

:focus-visible { outline: 1px solid var(--red); outline-offset: 3px; }

/* ---------- fixed atmosphere ---------- */
#gl {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 10%, transparent 40%, rgba(4, 5, 6, 0.55) 100%),
    linear-gradient(180deg, rgba(4,5,6,.35) 0%, transparent 18%, transparent 82%, rgba(4,5,6,.5) 100%);
}
.grain {
  position: fixed; inset: -100px; z-index: 2; pointer-events: none;
  opacity: 0.055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(2) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 18px); }
  100% { transform: translate(14px, -22px); }
}

main { position: relative; z-index: 3; }
.wrap { width: var(--wrap); margin-inline: auto; }
section[id] { scroll-margin-top: 4.5rem; }

/* ============================================================
   BOOT VEIL
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__mark { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 9vw, 6rem); line-height: 1; letter-spacing: -0.02em; }
.boot__x { color: var(--red); }
.boot__bar { width: min(320px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out); }
.boot__meta { display: flex; gap: 2.5rem; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.18em; color: var(--ink-faint); }

/* ============================================================
   CURSOR
   ============================================================ */
.cursor { display: none; }
@media (pointer: fine) {
  /* native cursor stays until JS confirms the custom cursor is active (html.custom-cursor) */
  html.custom-cursor, html.custom-cursor a, html.custom-cursor button,
  html.custom-cursor input, html.custom-cursor textarea, html.custom-cursor label {
    cursor: none;
  }
  .custom-cursor .cursor {
    display: block; position: fixed; z-index: 100; top: 0; left: 0;
    width: 8px; height: 8px; margin: -4px 0 0 -4px;
    pointer-events: none; will-change: transform;
  }
}
.cursor span {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--red);
  transition: transform 0.35s var(--ease-out), opacity 0.35s, background 0.35s;
}
.cursor.is-grow span { transform: scale(4.5); background: rgba(255, 61, 46, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 61, 46, 0.65); }
.cursor.is-down span { transform: scale(0.6); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.1rem var(--pad);
  transition: background 0.5s, border-color 0.5s, padding 0.5s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(7, 8, 10, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 0.8rem;
}
.topbar__brand { display: flex; align-items: center; }
.topbar__word { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.04em; }
/* the club mark sets DEV in white with an X that runs larger than the letters
   beside it, so the wordmark follows that proportion rather than keeping the X
   on the same size as the rest of the word */
.topbar__word em {
  color: var(--red);
  display: inline-block;
  font-size: 1.26em;
  line-height: 0.8;
  margin-left: -0.02em;
  transform: translateY(0.03em);
}
.topbar__nav { display: flex; gap: 1.9rem; }
.topbar__nav a {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-dim); position: relative; padding-block: 0.3rem;
  transition: color 0.3s;
}
.topbar__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease-out);
}
.topbar__nav a:hover, .topbar__nav a.is-active { color: var(--ink); }
.topbar__nav a:hover::after, .topbar__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.topbar__cta {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em;
  border: 1px solid var(--line-strong); padding: 0.62rem 1rem; color: var(--ink);
  transition: background 0.35s, color 0.35s, border-color 0.35s; white-space: nowrap;
}
.topbar__cta:hover { background: var(--red); border-color: var(--red); color: var(--obsidian); }
.topbar__burger { display: none; width: 40px; height: 40px; position: relative; }
.topbar__burger i {
  position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--ink);
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.topbar__burger i:nth-child(1) { top: 16px; }
.topbar__burger i:nth-child(2) { top: 23px; }
.topbar__burger[aria-expanded="true"] i:nth-child(1) { top: 19px; transform: rotate(45deg); }
.topbar__burger[aria-expanded="true"] i:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* mobile nav overlay */
.mobilenav {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(7, 8, 10, 0.96);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center; gap: 0.2rem;
  padding: 6rem var(--pad) 3rem;
  opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.mobilenav.is-open { opacity: 1; visibility: visible; }
.mobilenav a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.25; color: var(--ink);
  transform: translateY(24px); opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out), color 0.3s;
}
.mobilenav.is-open a { transform: none; opacity: 1; }
.mobilenav a:nth-child(1) { transition-delay: 0.05s; } .mobilenav a:nth-child(2) { transition-delay: 0.1s; }
.mobilenav a:nth-child(3) { transition-delay: 0.15s; } .mobilenav a:nth-child(4) { transition-delay: 0.2s; }
.mobilenav a:nth-child(5) { transition-delay: 0.25s; } .mobilenav a:nth-child(6) { transition-delay: 0.3s; }
.mobilenav a:active { color: var(--red); }
.mobilenav a s { font-family: var(--font-mono); font-size: 0.7rem; color: var(--red); letter-spacing: 0.1em; }
.mobilenav__foot { margin-top: 3rem; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--ink-faint); }

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: fixed; z-index: 40; right: 1.4rem; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  mix-blend-mode: difference;
}
.hud__idx { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--ink); }
.hud__line { position: relative; width: 1px; height: 88px; background: var(--line); overflow: hidden; }
.hud__line i { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--red); transform-origin: top; transform: scaleY(0); }
.hud__name { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.2em; color: var(--ink-dim); writing-mode: vertical-rl; }
@media (max-width: 1100px) { .hud { display: none; } }

/* ============================================================
   SHARED TYPE
   ============================================================ */
.kicker {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em;
  color: var(--ink-dim); text-transform: uppercase;
}
.kicker__dot { width: 7px; height: 7px; background: var(--red); flex: none; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6.2vw, 5.6rem);
  line-height: 1.02; letter-spacing: -0.02em;
}
.h2 em {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red);
  text-stroke: 1.5px var(--red);
}
.prose { font-size: clamp(1rem, 1.35vw, 1.15rem); color: var(--ink-dim); max-width: 56ch; line-height: 1.75; }

.chap-head {
  display: flex; align-items: baseline; gap: 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.chap-head__no { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--red); letter-spacing: 0.06em; }
.chap-head__label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.24em; color: var(--ink-faint); text-transform: uppercase; }
.chap-head::after { content: ""; flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.9rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; font-weight: 500;
  padding: 1.06em 1.55em; border: 1px solid var(--line-strong);
  overflow: hidden; white-space: nowrap;
  transition: color 0.4s, border-color 0.4s; will-change: transform;
}
.btn span { position: relative; z-index: 1; }
.btn__arrow { position: relative; z-index: 1; transition: transform 0.4s var(--ease-out); font-weight: 400; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  transform: translateY(101%); transition: transform 0.5s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--obsidian); }
.btn--solid::before { background: var(--red); }
.btn--solid:hover::before { transform: translateY(0); }
.btn--ghost { color: var(--ink); background: transparent; }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--obsidian); border-color: var(--ink); }
.btn--ghost:hover::before { transform: translateY(0); }

.linkline {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--ink-dim);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 0.35rem;
  transition: color 0.3s, border-color 0.3s; white-space: nowrap;
}
.linkline:hover { color: var(--red); border-color: var(--red); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(7rem, 14vh, 10rem) var(--pad) clamp(5rem, 10vh, 7rem);
}
.hero__inner { width: var(--wrap); margin-inline: auto; position: relative; }
.hero__kicker { margin-bottom: clamp(1.6rem, 4vh, 3rem); }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(4.2rem, 16vw, 14.5rem);
  line-height: 0.8; letter-spacing: -0.025em;
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline;
  margin-left: -0.04em;
}
/* the club mark runs the X larger than the letters beside it, so the hero
   follows the same proportion; the outline is thickened with it so the bigger
   X does not read as a thinner stroke */
.hero__row--x {
  font-size: 1.22em;
  color: transparent;
  -webkit-text-stroke: clamp(1.7px, 0.32vw, 4px) var(--red);
  margin-left: clamp(0.04em, 0.4vw, 0.12em);
}
.hero__tag {
  margin-top: clamp(1.1rem, 2.4vh, 1.8rem);
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(0.72rem, 1.1vw, 0.86rem); letter-spacing: 0.34em;
  color: var(--red);
}
.hero__lede { margin-top: 1rem; max-width: 46ch; color: var(--ink-dim); font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.7; }
.hero__cta { margin-top: clamp(1.5rem, 3.2vh, 2.2rem); display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

.hero__rail {
  position: absolute; right: var(--pad); bottom: clamp(5.5rem, 12vh, 8rem);
  display: flex; flex-direction: column; gap: 0.65rem; text-align: right;
}
.rail-row { display: flex; gap: 1.4rem; justify-content: flex-end; align-items: baseline; }
.rail-row s { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.2em; color: var(--ink-faint); }
.rail-row b { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 0.2rem; }

.hero__scrollcue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.hero__scrollcue span { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.3em; color: var(--ink-faint); }
.hero__scrollcue i { width: 1px; height: 44px; background: var(--line-strong); position: relative; overflow: hidden; }
.hero__scrollcue i::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--red); animation: cue 2.2s var(--ease-io) infinite;
}
@keyframes cue { 0% { top: -100%; } 55% { top: 0; } 100% { top: 100%; } }

@media (max-width: 900px) {
  .hero__rail { display: none; }
  .hero { padding-top: 8rem; }
}

/* ============================================================
   SIGNAL BAND (marquee)
   ============================================================ */
.band {
  position: relative; z-index: 3;
  padding-block: clamp(2.2rem, 5vh, 4rem);
  overflow: clip;
}
.band__row { overflow: clip; border-block: 1px solid var(--line); }
.band__row--ghost { border-block-color: transparent; opacity: 0.4; }
.band__row--ghost .band__track { font-size: 0.62em; color: var(--ink-faint); }
.band__row--rev .band__track { animation-direction: reverse; }
.band__row--slow .band__track { animation-duration: 46s; }
.band__track {
  display: flex; width: max-content;
  gap: 3.2rem; padding: 0.85rem 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  letter-spacing: 0.01em; color: var(--ink);
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.band__track b { color: var(--red); font-weight: 500; font-size: 0.7em; align-self: center; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   CHAPTERS — shared
   ============================================================ */
.chapter { position: relative; padding-block: clamp(5.5rem, 13vh, 10rem); }

/* ============================================================
   CH.01 — THE UNIT
   ============================================================ */
.unit__grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.unit__sticky { position: sticky; top: clamp(6rem, 14vh, 9rem); }
.unit__vitals { margin-top: clamp(2.2rem, 5vh, 3.6rem); }
.unit__vitals-label, .crew__label, .doctrine__label, .count__label {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.26em; color: var(--ink-faint);
}
.unit__vitals-label { margin-bottom: 1.1rem; }
.vitals {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.vitals li {
  padding: 1.15rem 0.2rem 1.05rem;
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.vitals li:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 1.2rem; }
.vitals li:nth-child(even) { padding-left: 1.4rem; }
.vitals b { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1; color: var(--ink); }
.vitals s { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; color: var(--ink-faint); text-transform: uppercase; }

.unit__body { display: flex; flex-direction: column; gap: 1.7rem; padding-top: 0.4rem; }
.pull {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.3rem); line-height: 1.3; letter-spacing: -0.01em;
  color: var(--ink);
  padding-left: 1.5rem; border-left: 2px solid var(--red);
  margin-bottom: 0.8rem;
}

/* doctrine */
.doctrine { margin-top: clamp(5rem, 12vh, 9rem); }
.doctrine__label { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-bottom: clamp(2rem, 5vh, 3.4rem); }
.doctrine__stack { display: flex; flex-direction: column; gap: clamp(2.4rem, 6vh, 4.2rem); }
.doctrine__item { position: relative; display: flex; flex-direction: column; gap: 0.5rem; }
.doctrine__item:nth-child(2) { align-items: flex-end; text-align: right; }
.doctrine__item:nth-child(3) { align-items: center; text-align: center; }
.doctrine__word {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 10.5rem);
  line-height: 0.92; letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.5s;
}
.doctrine__item.is-hot .doctrine__word { color: var(--red); }
.doctrine__meaning {
  font-family: var(--font-mono); font-size: clamp(0.68rem, 1vw, 0.8rem);
  letter-spacing: 0.14em; color: var(--ink-dim); text-transform: uppercase;
}

/* ============================================================
   CH.02 — DISCIPLINES
   ============================================================ */
.disc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.6rem; margin-bottom: clamp(2.6rem, 6vh, 4.6rem); }
.disc-head__text { min-width: min(100%, 30rem); }
.disc-head__sub { padding-bottom: 0.4rem; }
.disc-head__hint {
  display: flex; align-items: center; gap: 0.6rem; margin-top: 1.1rem;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-faint);
}
.disc-head__hint-key { color: var(--red); font-size: 0.85rem; }
.disc-head__brochure { flex-direction: row; align-items: center; text-align: left; }
.brochure__stack { position: relative; z-index: 1; display: grid; gap: 0.25rem; }
.brochure__sub {
  font-family: var(--font-body); font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: none; opacity: 0.62;
}

.index { position: relative; border-top: 1px solid var(--line); }
.index__row {
  position: relative; display: grid; width: 100%;
  grid-template-columns: 4.5rem 1fr auto 2.2rem;
  align-items: baseline; gap: 1.4rem;
  text-align: left;
  padding: clamp(1.3rem, 2.6vh, 2rem) 0.2rem;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease-out);
}
.index__no { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; color: var(--ink-faint); transition: color 0.35s; }
.index__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 3.8vw, 3.4rem); line-height: 1; letter-spacing: -0.015em;
  color: var(--ink-dim);
  transition: color 0.4s, transform 0.5s var(--ease-out);
}
.index__desc {
  font-family: var(--font-mono); font-size: clamp(0.66rem, 0.9vw, 0.78rem);
  letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase;
  transition: color 0.4s, transform 0.5s var(--ease-out);
  justify-self: end; text-align: right;
}
.index__mark { position: relative; width: 100%; height: 1px; align-self: center; background: transparent; transition: background 0.4s; }
.index__mark::before {
  content: ""; position: absolute; right: 0.4rem; top: 50%; width: 11px; height: 11px;
  border-top: 1.5px solid var(--red); border-right: 1.5px solid var(--red);
  transform: translateY(-50%) rotate(45deg) scale(0.6);
  opacity: 0; transition: opacity 0.35s, transform 0.45s var(--ease-out);
}
.index__row:hover .index__name, .index__row.is-active .index__name { color: var(--ink); transform: translateX(0.6rem); }
.index__row:hover .index__no, .index__row.is-active .index__no { color: var(--red); }
.index__row:hover .index__desc, .index__row.is-active .index__desc { color: var(--red); }
.index__row:hover .index__mark::before, .index__row.is-active .index__mark::before { opacity: 1; transform: translateY(-50%) rotate(45deg) scale(1); }
.index__ghost {
  position: absolute; z-index: -1; right: clamp(0rem, 4vw, 4rem); top: 50%;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(9rem, 24vw, 22rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(233, 230, 221, 0.09);
  transform: translateY(-50%);
  pointer-events: none; user-select: none;
}
@media (max-width: 760px) {
  .index__row { grid-template-columns: 2.6rem 1fr 1.4rem; grid-template-areas: "no name mark" ". desc mark"; row-gap: 0.35rem; }
  .index__no { grid-area: no; align-self: start; margin-top: 0.45rem; }
  .index__name { grid-area: name; }
  .index__desc { grid-area: desc; justify-self: start; text-align: left; }
  .index__mark { grid-area: mark; }
  .index__ghost { display: none; }
  .disc-head { align-items: flex-start; }
  .disc-head__brochure { width: 100%; justify-content: space-between; }
}

/* ============================================================
   CH.03 — DEVYTE 3.0
   ============================================================ */
.chapter--devyte { padding-block: clamp(6rem, 15vh, 12rem); }
.devyte__lede {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 3rem); line-height: 1.15; letter-spacing: -0.01em;
  margin-bottom: 1.4rem; color: var(--ink);
}
.devyte__lede em { color: transparent; -webkit-text-stroke: 1px var(--red); }
.devyte__intro { margin-bottom: clamp(3rem, 7vh, 5rem); }
.devyte__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.4rem, 12.5vw, 12rem);
  line-height: 0.86; letter-spacing: -0.03em;
  display: flex; align-items: baseline; flex-wrap: wrap;
  /* the edition number is its own word, not a suffix crowded against the name */
  column-gap: 0.24em; row-gap: 0.06em;
  margin-left: -0.03em;
}
.devyte__ver {
  color: transparent;
  -webkit-text-stroke: clamp(1.5px, 0.25vw, 3px) var(--red);
}
.devyte__presents {
  margin-top: 1.3rem;
  font-family: var(--font-mono); font-size: clamp(0.66rem, 1vw, 0.8rem);
  letter-spacing: 0.3em; color: var(--red);
}
.devyte__desc { margin-top: 1.6rem; max-width: 52ch; }

.devyte__deck {
  margin-top: clamp(2.6rem, 6vh, 4.2rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 3.5vw, 3rem); align-items: stretch;
}
.facts {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  align-content: start;
}
.fact {
  padding: 1.15rem 0.2rem 1.1rem;
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.4rem;
}
.fact:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 1.2rem; }
.fact:nth-child(even) { padding-left: 1.4rem; }
.fact s { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.22em; color: var(--ink-faint); }
.fact b { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.8rem); letter-spacing: 0.01em; }

.count {
  border: 1px solid var(--line); background: var(--panel);
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.count__label { color: var(--red); letter-spacing: 0.26em; }
.count__grid {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.count__cell { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 0; }
.count__cell b {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1;
  color: var(--ink);
  overflow: hidden;
}
.count__cell b.tick { animation: tick 0.5s var(--ease-out); }
@keyframes tick {
  0% { transform: translateY(0.55em); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.count__cell s { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.24em; color: var(--ink-faint); }
.count__sep { font-family: var(--font-mono); font-size: clamp(1.4rem, 3vw, 2.4rem); color: var(--ink-faint); align-self: flex-start; padding-top: 0.1em; }
.count__status { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; color: var(--red); min-height: 1.2em; }

.devyte__cta { margin-top: clamp(2rem, 5vh, 3.2rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }

/* The fest's seven competitions, listed inside the flagship chapter. The rows
   reuse .index from the disciplines chapter, so only the block's own rhythm is
   declared here. */
.devyte__events { margin-top: clamp(3.4rem, 8vh, 6rem); }
.devyte__events .disc-head { margin-bottom: clamp(2rem, 5vh, 3.4rem); }
.devyte__events .index { border-bottom: 1px solid var(--line); }

/* The brochure's IMPORTANT LINKS page, set as the fest publishes it: a caption
   line and one row of square chips, straight after the event list so the last
   thing before the rules is the way in. Chips wrap rather than scroll — five
   links must all be reachable on a phone, and a hidden row is not a link. */
.devyte__links { margin-top: clamp(1.8rem, 4vh, 2.6rem); }
.devyte__links[hidden] { display: none; }
.devyte__links-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.1rem;
  margin-bottom: 1.05rem;
}
.devyte__links-head b {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--red);
}
.devyte__links-head s {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em;
  color: var(--ink-faint); text-decoration: none;
}
.links__chips {
  display: flex; flex-wrap: wrap; gap: 0.55rem;
  border-top: 1px solid var(--line); padding-top: 1.05rem;
}
.linkchip {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.13em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-dim);
  padding: 0.66rem 0.95rem; border: 1px solid var(--line-strong);
  transition: color 0.35s, border-color 0.35s, background 0.35s, transform 0.4s var(--ease-out);
}
.linkchip:hover { color: var(--ink); border-color: var(--red); background: var(--panel-2); transform: translateY(-2px); }
.linkchip__arrow { color: var(--red); font-size: 0.85em; line-height: 1; }

@media (max-width: 900px) { .devyte__deck { grid-template-columns: 1fr; } }

/* ============================================================
   CH.03 — WINNERS
   ============================================================ */
.winners__head {
  display: grid; gap: clamp(1.2rem, 3vh, 1.9rem);
  margin-bottom: clamp(2.6rem, 6vh, 4.4rem);
}
.winners__sub { max-width: 62ch; }

/* one grid definition for the header line and every row, so the four columns
   stay in register down the whole list however long a school name is */
.podium { --cols: minmax(10rem, 0.9fr) repeat(3, minmax(0, 1.2fr)); }
.podium__head {
  display: grid; grid-template-columns: var(--cols); gap: clamp(1rem, 2.5vw, 2rem);
  border-top: 1px solid var(--line);
  padding: 0.95rem 0.2rem;
}
.podium__colhead {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.22em;
  color: rgba(233, 230, 221, 0.55); text-transform: uppercase;
}
.podium__rows { border-top: 1px solid var(--line); }
.podium__head + .podium__rows { border-top: 0; }
.podium__row {
  display: grid; grid-template-columns: var(--cols); gap: clamp(1rem, 2.5vw, 2rem);
  align-items: baseline;
  padding: clamp(1.15rem, 2.4vh, 1.7rem) 0.2rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s, padding 0.4s var(--ease-out);
}
.podium__row:hover { background: var(--panel); padding-left: 0.7rem; }
.podium__event {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem); line-height: 1.15; letter-spacing: -0.01em;
  color: var(--ink);
}
.place { display: flex; flex-direction: column; gap: 0.3rem; }
.place b {
  font-size: clamp(0.86rem, 1vw, 0.98rem); line-height: 1.5; font-weight: 500;
  color: rgba(233, 230, 221, 0.86);
}
.place s {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.2em;
  color: rgba(233, 230, 221, 0.62); text-transform: uppercase;
  /* Wide screens read the captions from the header line, so each cell keeps its
     own caption out of the visual layout but in the accessibility tree — without
     it a screen reader hears four unlabelled items per event. */
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
/* the top three are the point of the chapter, so first place is the loud cell
   and the two below it recede one step each. The steps stay well above the
   bone-on-obsidian contrast the rest of the page uses: --ink-faint (0.34) made
   third place unreadable, so the ladder bottoms out at 0.68 instead. */
.place--1 b { color: var(--ink); }
.place--1 s { color: var(--red); }
.place--3 b { color: rgba(233, 230, 221, 0.68); }

@media (max-width: 980px) {
  /* no header line at this width, so the per-cell caption becomes the label */
  .podium__head { display: none; }
  .podium__row { grid-template-columns: 1fr; gap: 0.85rem; align-items: start; }
  .podium__row:hover { padding-left: 0.2rem; }
  .podium__event { margin-bottom: 0.35rem; }
  .place { flex-direction: row; align-items: baseline; gap: 0.8rem; }
  .place s {
    position: static; width: 6.6rem; height: auto; overflow: visible;
    clip-path: none; flex: none;
  }
}
.winners__note { margin-top: clamp(1.6rem, 4vh, 2.4rem); font-size: 0.92rem; }

/* ============================================================
   CH.04 — ARCHIVE
   ============================================================ */
.timeline {
  position: relative; margin-top: clamp(2rem, 5vh, 3.5rem);
  display: flex; flex-direction: column; gap: clamp(2.6rem, 6vh, 4.2rem);
  padding-left: clamp(1.6rem, 4vw, 3rem);
}
.timeline::before {
  content: ""; position: absolute; left: 0.45rem; top: 0.4rem; bottom: 0.4rem;
  width: 1px; background: var(--line);
}
.tl__node { position: absolute; left: calc(-1 * clamp(1.6rem, 4vw, 3rem) - 0.05rem); top: 0.5rem; width: 1rem; height: 1rem; display: grid; place-items: center; }
.tl { position: relative; }
.tl__node i {
  width: 7px; height: 7px; background: var(--obsidian);
  border: 1.5px solid var(--ink-faint); transform: rotate(45deg);
  transition: border-color 0.4s, background 0.4s;
}
.tl--next .tl__node i { border-color: var(--red); background: var(--red); }
.tl { display: grid; grid-template-columns: minmax(9.5rem, 0.62fr) 2fr; gap: clamp(1.4rem, 3.5vw, 3.4rem); }
.tl__meta { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; padding-top: 0.35rem; }
.tl__edition { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.22em; color: var(--ink-dim); }
.tl__badge {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.2em;
  border: 1px solid var(--line-strong); color: var(--ink-faint);
  padding: 0.34rem 0.6rem;
}
.tl__badge--live { border-color: var(--red); color: var(--obsidian); background: var(--red); font-weight: 500; }
.tl__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.015em;
}
.tl__date { margin-top: 0.65rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--red); }
.tl__desc { margin-top: 0.9rem; color: var(--ink-dim); max-width: 62ch; line-height: 1.7; }
.tl__stats { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tl__stats span {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  border: 1px solid var(--line); padding: 0.42rem 0.7rem; color: var(--ink-dim);
}
@media (max-width: 760px) { .tl { grid-template-columns: 1fr; gap: 1rem; } }

/* ============================================================
   CH.05 — CREW
   ============================================================ */
.crew-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.6rem; margin-bottom: clamp(2.6rem, 6vh, 4.6rem); }
.crew-head__sub { padding-bottom: 0.4rem; }
.crew__label { margin: clamp(2.4rem, 5vh, 3.6rem) 0 1rem; }
.roster { border-top: 1px solid var(--line); }
.roster--faculty .roster__row { grid-template-columns: 3.4rem 1fr auto; }
.roster__row {
  display: grid; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem);
  grid-template-columns: 3.2rem 3.4rem 1fr auto;
  padding: 1.05rem 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s, padding 0.4s var(--ease-out);
}
.roster__row:hover { background: var(--panel); padding-left: 1rem; }
.roster__no { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.roster__tile {
  width: 3.4rem; height: 3.4rem; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--ink-dim); border: 1px solid var(--line);
  transform-style: preserve-3d; will-change: transform;
  transition: color 0.4s, border-color 0.4s;
}
.roster__row:hover .roster__tile { color: var(--obsidian); background: var(--red); border-color: var(--red); }
.roster__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.1; letter-spacing: -0.01em;
  transition: transform 0.5s var(--ease-out);
}
.roster__row:hover .roster__name { transform: translateX(0.5rem); }
.roster__role {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em;
  color: var(--ink-dim); text-transform: uppercase; text-align: right;
}
@media (max-width: 700px) {
  .roster__row { grid-template-columns: 3rem 1fr auto; grid-template-areas: "tile name role"; }
  .roster__no { display: none; }
  .roster__tile { grid-area: tile; width: 3rem; height: 3rem; }
  .roster__name { grid-area: name; }
  .roster__role { grid-area: role; }
}

/* ============================================================
   CH.06 — CONTACT
   ============================================================ */
.contact__sub { margin-bottom: clamp(2.4rem, 6vh, 4rem); }
.contact__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.channels { display: flex; flex-direction: column; }
.channel {
  position: relative; display: flex; flex-direction: column; gap: 0.45rem;
  padding: 1.35rem 0.3rem;
  border-top: 1px solid var(--line);
  transition: padding 0.45s var(--ease-out), background 0.45s;
}
.channels li:last-child .channel { border-bottom: 1px solid var(--line); }
.channel s { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.24em; color: var(--ink-faint); }
.channel b {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -0.01em;
  transition: color 0.35s; overflow-wrap: anywhere;
}
.channel__sub { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink-dim); }
.channel__arrow {
  position: absolute; right: 0.4rem; top: 1.4rem;
  font-family: var(--font-mono); color: var(--ink-faint);
  transition: transform 0.45s var(--ease-out), color 0.35s;
}
.channel:hover { background: var(--panel); padding-left: 1rem; }
.channel:hover b { color: var(--red); }
.channel:hover .channel__arrow { color: var(--red); transform: translateX(5px); }

/* static block that carries a real link (School & Base) */
.channel--static:hover { padding-left: .3rem; }
.channel--static .channel__link {
  color: inherit;
  transition: color 0.35s;
  text-decoration: none;
}
.channel--static .channel__link:hover,
.channel--static .channel__link:focus-visible { color: var(--red); }
.channel--static:hover { background: var(--panel); }

.composer {
  border: 1px solid var(--line); background: var(--panel);
  padding: clamp(1.5rem, 3vw, 2.6rem);
}
.composer__badge { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.26em; color: var(--red); margin-bottom: 1rem; }
.composer__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -0.01em; }
.composer__sub { margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--ink-dim); }
.composer form { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 1.4rem; }
.composer__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field s { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.22em; color: var(--ink-faint); }
.field input, .field textarea {
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  color: var(--ink); font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.55rem 0.1rem; border-radius: 0;
  transition: border-color 0.35s; resize: vertical; min-height: 0;
}
.field textarea { line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--red); }
.field.is-error input, .field.is-error textarea { border-bottom-color: var(--warn); }
.composer__foot { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.composer__status { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; color: var(--ink-dim); min-height: 1.2em; }
.composer__status.is-warn { color: var(--warn); }
.composer__status.is-ok { color: var(--ink); }
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .composer__row { grid-template-columns: 1fr; }
}

/* ============================================================
   COLOPHON
   ============================================================ */
.colophon {
  position: relative; z-index: 3;
  border-top: 1px solid var(--line);
  padding: clamp(4rem, 9vh, 7rem) 0 2.2rem;
  background: linear-gradient(180deg, transparent, rgba(4, 5, 6, 0.72));
}
.colophon__motto {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 5vw, 4.2rem); letter-spacing: 0.01em; line-height: 1.05;
  margin-bottom: clamp(3rem, 7vh, 5rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-dim);
}
.colophon__grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2.6rem, 6vh, 4rem);
}
.colophon__word { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.02em; }
.colophon__word em { color: var(--red); }
.colophon__desc { margin-top: 1rem; color: var(--ink-dim); max-width: 34ch; }
.colophon__label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.26em; color: var(--ink-faint); margin-bottom: 1.2rem; }
.colophon__links { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.colophon__links a {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--ink-dim);
  border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; overflow-wrap: anywhere;
}
.colophon__links a:hover { color: var(--red); border-bottom-color: var(--red); }
.colophon__base {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 1.6rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--ink-faint);
}
.colophon__base a { color: var(--ink-dim); transition: color 0.3s; }
.colophon__base a:hover { color: var(--red); }
@media (max-width: 800px) { .colophon__grid { grid-template-columns: 1fr; } }

/* ============================================================
   REVEAL + SPLIT SYSTEM
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

[data-split] .char, [data-split-lines] .line { display: inline-block; will-change: transform; }
[data-split] { display: inline-block; overflow: hidden; }
[data-split] .char { transform: translateY(115%); transition: transform 0.85s var(--ease-out); transition-delay: var(--d, 0s); }
[data-split].is-in .char { transform: none; }
[data-split-lines] { overflow: hidden; }
[data-split-lines] .line { display: block; overflow: hidden; }
[data-split-lines] .line > span { display: inline-block; transform: translateY(115%); transition: transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
[data-split-lines].is-in .line > span { transform: none; }

/* ============================================================
   EVENT MODAL — opens from a Disciplines row
   ============================================================ */
.ev {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0px, 4vw, 2.5rem);
}
.ev[hidden] { display: none; }
.ev__scrim {
  position: absolute; inset: 0; background: rgba(4, 5, 6, 0.84);
  backdrop-filter: blur(12px) saturate(0.65); -webkit-backdrop-filter: blur(12px) saturate(0.65);
  opacity: 0; transition: opacity 0.45s var(--ease-out);
}
.ev.is-open .ev__scrim { opacity: 1; }

.ev__panel {
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(920px, 100%); max-height: min(92vh, 940px);
  background: linear-gradient(178deg, #0d0f13 0%, #08090b 60%, #0a0b0e 100%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.66), inset 0 1px 0 rgba(233, 230, 221, 0.05);
  opacity: 0; transform: translateY(26px) scale(0.986);
  transition: opacity 0.4s var(--ease-out), transform 0.55s var(--ease-out);
  outline: none;
}
.ev.is-open .ev__panel { opacity: 1; transform: none; }
.ev__panel::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--red-deep) 45%, transparent);
}

.ev__head { position: relative; padding: clamp(1.5rem, 3vw, 2.3rem) clamp(1.4rem, 4vw, 2.6rem) 1.2rem; border-bottom: 1px solid var(--line); }
.ev__eyebrow { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.7rem; }
.ev__no { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--red); }
.ev__tag {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line); padding: 0.28em 0.7em;
}
.ev__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3.3rem); line-height: 1; letter-spacing: -0.02em;
  max-width: calc(100% - 5.5rem);
}
.ev__desc {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); margin-top: 0.75rem;
}
.ev__close {
  position: absolute; top: clamp(1.3rem, 3vw, 2rem); right: clamp(1.3rem, 3vw, 2rem);
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em; color: var(--ink-dim);
  border: 1px solid var(--line); padding: 0.6em 0.9em;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.ev__close:hover { color: var(--obsidian); background: var(--ink); border-color: var(--ink); }
.ev__close-glyph { font-size: 0.8rem; }

.ev__body { overflow-y: auto; padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 4vw, 2.6rem) 1.6rem; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.ev__body::-webkit-scrollbar { width: 6px; }
.ev__body::-webkit-scrollbar-thumb { background: var(--line-strong); }
.ev__body::-webkit-scrollbar-track { background: transparent; }

.ev__summary { font-size: clamp(0.95rem, 1.5vw, 1.06rem); line-height: 1.68; color: var(--ink-dim); max-width: 62ch; }

/* each cell carries its own hairline: a three-item row on a two-column grid
   then leaves plain panel space, not a hole punched through to the seam */
.ev__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin: 1.5rem 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ev__fact { background: var(--bg-2); padding: 0.85rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ev__fact dt { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.2em; color: var(--ink-faint); text-transform: uppercase; }
.ev__fact dd { font-family: var(--font-display); font-weight: 500; font-size: 0.94rem; margin-top: 0.3rem; line-height: 1.3; }

.ev__block { margin-top: clamp(1.7rem, 3.5vw, 2.4rem); }
.ev__block[hidden] { display: none; }
.ev__label {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-faint); padding-bottom: 0.7rem; margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.ev__label::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.6rem; background: var(--red); transform: translateY(-1px) rotate(45deg); }

.ev__rules { counter-reset: evrule; display: grid; gap: 0.1rem; }
.ev__rule {
  counter-increment: evrule; position: relative; display: grid; grid-template-columns: 2.1rem 1fr;
  gap: 0.7rem; align-items: baseline; padding: 0.62rem 0;
  font-size: 0.92rem; line-height: 1.6; color: var(--ink-dim);
  border-bottom: 1px solid rgba(233, 230, 221, 0.06);
}
.ev__rule:last-child { border-bottom: 0; }
.ev__rule::before {
  content: counter(evrule, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; color: var(--red);
}
.ev__rule:last-child::before { color: var(--ink); }

.ev__heads { display: grid; gap: 0.2rem; }
.ev__head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.4rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(233, 230, 221, 0.06); }
.ev__head-row:last-child { border-bottom: 0; }
.ev__head-name { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; line-height: 1.2; }
.ev__head-role { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.25rem; }
.ev__head-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.ev__link { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--ink-dim); border-bottom: 1px solid var(--line-strong); padding-bottom: 0.2em; transition: color 0.3s, border-color 0.3s; word-break: break-all; }
.ev__link:hover { color: var(--red); border-color: var(--red); }
.ev__link--ig::after { content: " ↗"; font-size: 0.6em; }
.ev__note { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.62rem; line-height: 1.75; letter-spacing: 0.06em; color: var(--ink-faint); max-width: 64ch; }
.ev__note[hidden] { display: none; }

/* [hidden] loses to any class that sets display, and .ev__facts, .ev__heads and
   .btn all do. The club-domain dialogs have no rules, no heads and no brochure to
   show, so each one has to say here that hiding it means hiding it. */
.ev__label[hidden], .ev__summary[hidden], .ev__facts[hidden], .ev__heads[hidden],
.ev__foot .btn[hidden] { display: none; }

.ev__foot { display: flex; flex-wrap: wrap; gap: 0.8rem; padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.4rem, 4vw, 2.6rem); border-top: 1px solid var(--line); background: rgba(7, 8, 10, 0.6); }
/* registering and joining Discord are the two actions and the brochure is the
   reference; the inbox link is the quiet last resort, so it never competes for
   the button row and keeps its own underline the width of its words */
.ev__foot .linkline { align-self: center; }

@media (max-width: 760px) {
  .ev { padding: 0; align-items: flex-end; }
  .ev__panel { width: 100%; max-height: 94vh; border-left: 0; border-right: 0; border-bottom: 0; transform: translateY(4%); }
  .ev__head { padding-top: 3.6rem; }
  .ev__close { top: 1.1rem; right: 1.1rem; }
  .ev__name { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .ev__foot .btn { flex: 1 1 100%; justify-content: space-between; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .topbar__nav, .topbar__cta { display: none; }
  .topbar__burger { display: block; }
  .unit__grid { grid-template-columns: 1fr; }
  .unit__sticky { position: static; }
  .doctrine__item:nth-child(2), .doctrine__item:nth-child(3) { align-items: flex-start; text-align: left; }
}

/* ============================================================
   REDUCED MOTION — scoped to the event dialog
   This deliberately does NOT touch the site's own reveal, marquee,
   grain or smooth-scroll behaviour. Those are the design; overriding them
   here made the whole page look like its animation had stopped for anyone
   whose OS reports prefers-reduced-motion.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ev__scrim, .ev__panel { transition: none; }
}
