/* ═══════════════════════════════════════════════════════════════════
   Hat jemand Rezrollen? [れ巳エれ]
   Cinematic dark-fantasy guild site — design system + components
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ─────────────────────────────────────────────────────────── */
:root {
  /* — Surfaces: near-black through desaturated stone — */
  --c-void:        #08080a;
  --c-abyss:       #0c0c10;
  --c-charcoal:    #121218;
  --c-stone:       #1c1c24;
  --c-stone-2:     #262630;
  --c-stone-edge:  #33333f;

  /* — Warm gold: muted, never neon — */
  --c-gold:        #c9a54e;
  --c-gold-bright: #ecd7a4;
  --c-gold-deep:   #8f7132;
  --c-gold-a12:    rgba(201, 165, 78, 0.12);
  --c-gold-a24:    rgba(201, 165, 78, 0.24);
  --c-gold-a40:    rgba(201, 165, 78, 0.40);

  /* — Accents — */
  --c-blood:       #8a2626;
  --c-blood-a20:   rgba(138, 38, 38, 0.20);
  --c-mist:        #7d8b9e;
  --c-mist-a10:    rgba(125, 139, 158, 0.10);
  --c-mist-a18:    rgba(125, 139, 158, 0.18);

  /* — Text — */
  --c-text:        #e6e3dc;
  --c-text-soft:   #b8b4ab;
  --c-text-muted:  #8d8981;
  --c-text-faint:  #6a675f;

  /* — Type — */
  --f-display: "Cinzel", "Trajan Pro", "Palatino Linotype", Georgia, serif;
  --f-body:    "Barlow", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-tag:     "Barlow", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;

  --fs-hero:   clamp(2.9rem, 8.5vw, 7rem);
  --fs-creed:  clamp(1.85rem, 4.8vw, 4.1rem);
  --fs-h2:     clamp(2rem, 4.4vw, 3.35rem);
  --fs-h3:     clamp(1.15rem, 1.8vw, 1.4rem);
  --fs-lead:   clamp(1.05rem, 1.5vw, 1.24rem);
  --fs-body:   1.0625rem;
  --fs-sm:     0.9375rem;
  --fs-xs:     0.8125rem;
  --fs-label:  0.72rem;

  --lh-tight:  1.06;
  --lh-snug:   1.28;
  --lh-body:   1.72;

  --ls-label:  0.34em;
  --ls-display: 0.012em;

  /* — Space — */
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.5rem;
  --sp-6:   2rem;
  --sp-7:   3rem;
  --sp-8:   4rem;
  --sp-9:   6rem;
  --sp-10:  8rem;
  --sp-section: clamp(5.5rem, 12vw, 11rem);

  /* — Layout — */
  --w-shell:  1140px;
  --w-narrow: 720px;
  --w-prose:  62ch;
  --pad-x:    clamp(1.25rem, 5vw, 3rem);
  --nav-h:    72px;

  /* — Radius / borders — */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-pill: 999px;
  --hairline: 1px solid var(--c-stone-edge);

  /* — Shadow — */
  --sh-soft:  0 18px 50px -20px rgba(0, 0, 0, 0.85);
  --sh-lift:  0 30px 70px -24px rgba(0, 0, 0, 0.92);
  --sh-gold:  0 0 0 1px var(--c-gold-a24), 0 20px 45px -22px rgba(201, 165, 78, 0.35);

  /* — Motion — */
  --dur-fast: 180ms;
  --dur-mid:  340ms;
  --dur-slow: 720ms;
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* ───────────────────────────────────────────────────────────────
   2. RESET & BASE
   ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--c-void);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Faint film grain over the whole page — texture without noise files */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image:
    radial-gradient(circle at 15% 25%, #fff 0.5px, transparent 0.5px),
    radial-gradient(circle at 68% 72%, #fff 0.5px, transparent 0.5px),
    radial-gradient(circle at 42% 88%, #fff 0.5px, transparent 0.5px);
  background-size: 7px 7px, 11px 11px, 13px 13px;
}

img, svg { display: block; max-width: 100%; }

/* The rule above sets `display` on every svg, which would otherwise beat
   the `hidden` attribute and leave the play/pause icons stacked. */
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

ul { list-style: none; padding: 0; }

blockquote { quotes: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--c-gold-a40); color: var(--c-void); }

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ───────────────────────────────────────────────────────────────
   3. UTILITIES
   ─────────────────────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--w-shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.shell--narrow { max-width: var(--w-narrow); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  background: var(--c-gold);
  color: var(--c-void);
  font-weight: 600;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.eyebrow {
  font-family: var(--f-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-gold);
  line-height: 1.4;
}
.eyebrow__dot { color: var(--c-gold-deep); margin-inline: 0.35em; }

.h2 {
  font-size: var(--fs-h2);
  color: var(--c-text);
  margin-top: var(--sp-4);
}

.section__head { margin-bottom: var(--sp-7); }
.section__head--center { text-align: center; }
.section__sub {
  color: var(--c-text-muted);
  font-size: var(--fs-lead);
  font-style: italic;
  margin-top: var(--sp-4);
}

.prose {
  max-width: var(--w-prose);
  color: var(--c-text-soft);
  font-size: var(--fs-lead);
  display: grid;
  gap: var(--sp-5);
}

.section {
  position: relative;
  padding-block: var(--sp-section);
}

/* Animated underline for inline links */
.link {
  position: relative;
  color: var(--c-text-soft);
  transition: color var(--dur-fast) var(--ease);
}
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-mid) var(--ease-out);
}
.link:hover, .link:focus-visible { color: var(--c-gold-bright); }
.link:hover::after, .link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ───────────────────────────────────────────────────────────────
   4. BUTTONS
   ─────────────────────────────────────────────────────────── */
.btn {
  --btn-py: 0.95rem;
  --btn-px: 2rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: var(--btn-py) var(--btn-px);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  white-space: nowrap;
  isolation: isolate;
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-mid) var(--ease),
    background-color var(--dur-mid) var(--ease),
    color var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
}
.btn__icon {
  width: 1.15em; height: auto;
  transition: transform var(--dur-mid) var(--ease-out);
}
.btn:hover .btn__icon { transform: translateY(-1px) scale(1.06); }

.btn--sm { --btn-py: 0.65rem; --btn-px: 1.35rem; font-size: var(--fs-xs); }
.btn--lg { --btn-py: 1.15rem; --btn-px: 2.75rem; font-size: var(--fs-body); }

/* Gold — primary */
.btn--gold {
  background: linear-gradient(160deg, var(--c-gold-bright), var(--c-gold) 55%, var(--c-gold-deep));
  color: #14100a;
  box-shadow: 0 10px 30px -14px rgba(201, 165, 78, 0.55);
}
.btn--gold:hover,
.btn--gold:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -16px rgba(201, 165, 78, 0.7);
}
.btn--gold:active { transform: translateY(0); filter: brightness(0.94); }

/* Ghost — secondary */
.btn--ghost {
  color: var(--c-text);
  border: 1px solid var(--c-stone-edge);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  transform: translateY(-2px);
  border-color: var(--c-gold-a40);
  color: var(--c-gold-bright);
  background: var(--c-gold-a12);
}
.btn--ghost:active { transform: translateY(0); }

/* ───────────────────────────────────────────────────────────────
   5. REVEAL ANIMATIONS
   ─────────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ───────────────────────────────────────────────────────────────
   6. NAVIGATION
   ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease),
    backdrop-filter var(--dur-mid) var(--ease);
}
.nav.is-stuck {
  background: rgba(10, 10, 13, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: rgba(201, 165, 78, 0.14);
}

.nav__inner {
  max-width: var(--w-shell);
  margin-inline: auto;
  padding: 0 var(--pad-x);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.brand__mark {
  font-family: var(--f-tag);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-gold);
  padding: 0.4em 0.6em;
  border: 1px solid var(--c-gold-a24);
  border-radius: var(--r-sm);
  background: var(--c-gold-a12);
  white-space: nowrap;
  transition: border-color var(--dur-mid) var(--ease), color var(--dur-mid) var(--ease);
}
.brand:hover .brand__mark { border-color: var(--c-gold-a40); color: var(--c-gold-bright); }
.brand__name {
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin: 0;
}
.nav__link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-soft);
  padding-block: 0.4rem;
  transition: color var(--dur-fast) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-mid) var(--ease-out);
}
.nav__link:hover, .nav__link:focus-visible { color: var(--c-gold-bright); }
.nav__link:hover::after, .nav__link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Language switch — sits outside .nav__links so it stays reachable on
   mobile without opening the burger menu. */
.langtog {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: var(--sp-5);
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--c-stone-edge);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color var(--dur-mid) var(--ease),
              border-color var(--dur-mid) var(--ease),
              background var(--dur-mid) var(--ease);
}
.langtog:hover,
.langtog:focus-visible {
  color: var(--c-gold);
  border-color: var(--c-gold-a40);
  background: var(--c-gold-a12);
}
.langtog__globe { width: 17px; height: 17px; flex: none; }
.langtog__code {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

/* Burger — hidden on desktop */
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  place-items: center;
  border-radius: var(--r-sm);
  margin-right: -6px;
}
.nav__burger,
.nav__burger::before,
.nav__burger::after {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--dur-mid) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav__burger { position: relative; }
.nav__burger::before,
.nav__burger::after {
  content: "";
  position: absolute; left: 0;
}
.nav__burger::before { top: -7px; }
.nav__burger::after  { top: 7px; }

body.nav-open .nav__burger { background: transparent; }
body.nav-open .nav__burger::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav__burger::after  { transform: translateY(-7px) rotate(-45deg); }

/* ───────────────────────────────────────────────────────────────
   7. HERO
   ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + var(--sp-8)) var(--pad-x) var(--sp-9);
  overflow: hidden;
  isolation: isolate;
}

.hero__atmosphere {
  position: absolute;
  inset: -12% 0 0 0;
  z-index: -1;
  will-change: transform;
}

/* Optional photograph. Drop assets/images/hero.webp in to use it —
   if absent, the CSS atmosphere below carries the section alone. */
.hero__photo {
  position: absolute;
  inset: 0;
  /* Set from js/main.js (CONFIG.heroImage). Stays `none` while unset, so
     the browser never requests a file that does not exist yet. */
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center 35%;
  opacity: 0.55;
  filter: saturate(0.72) contrast(1.05);
}

/* Base ground: cold stone dusk */
.hero__atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 8%,  #1b2230 0%, transparent 62%),
    radial-gradient(90% 60% at 78% 24%,  rgba(138, 38, 38, 0.16) 0%, transparent 60%),
    radial-gradient(70% 55% at 18% 78%,  rgba(201, 165, 78, 0.10) 0%, transparent 65%),
    linear-gradient(180deg, #0d1017 0%, #0a0a0e 55%, var(--c-void) 100%);
}

/* Drifting fog banks */
.fog {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.fog--a {
  width: 78vw; height: 46vh;
  left: -14vw; top: 24%;
  background: radial-gradient(circle, var(--c-mist-a18), transparent 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}
.fog--b {
  width: 66vw; height: 40vh;
  right: -12vw; top: 44%;
  background: radial-gradient(circle, rgba(201, 165, 78, 0.13), transparent 70%);
  animation: drift-b 44s ease-in-out infinite alternate;
}
.fog--c {
  width: 100vw; height: 32vh;
  left: 0; bottom: -6%;
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(125, 139, 158, 0.14) 45%, transparent);
  filter: blur(48px);
  animation: drift-c 28s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(7vw, -3vh, 0) scale(1.14); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-8vw, 4vh, 0) scale(1); }
}
@keyframes drift-c {
  from { transform: translate3d(-3vw, 0, 0); opacity: 0.42; }
  to   { transform: translate3d(3vw, -2vh, 0); opacity: 0.68; }
}

/* Slow-rising motes of ash */
.hero__embers {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle, rgba(236, 215, 164, 0.55) 1px, transparent 1.4px),
    radial-gradient(circle, rgba(201, 165, 78, 0.40) 1px, transparent 1.4px),
    radial-gradient(circle, rgba(230, 227, 220, 0.30) 1px, transparent 1.4px);
  background-size: 260px 300px, 380px 420px, 500px 560px;
  animation: rise 46s linear infinite;
}
@keyframes rise {
  from { background-position: 0 0, 120px 60px, 40px 180px; }
  to   { background-position: 60px -300px, 180px -360px, 0 -560px; }
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(72% 62% at 50% 44%, transparent 42%, rgba(6, 6, 9, 0.72) 100%),
    linear-gradient(180deg, rgba(6, 6, 9, 0.55) 0%, transparent 22%, transparent 62%, var(--c-void) 100%);
}

/* — Hero content — */
.hero__content {
  position: relative;
  width: 100%;
  max-width: 940px;
  text-align: center;
}
.hero__content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in 1s var(--ease-out) forwards;
}
.hero__eyebrow  { animation-delay: 0.12s; }
.hero__title    { animation-delay: 0.24s; }
.hero__tag      { animation-delay: 0.36s; }
.hero__tagline  { animation-delay: 0.46s; }
.hero__support  { animation-delay: 0.56s; }
.hero__actions  { animation-delay: 0.66s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin-top: var(--sp-5);
  background: linear-gradient(178deg, #fbf6e9 8%, var(--c-gold-bright) 46%, var(--c-gold) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  padding-bottom: 0.06em;
}

.hero__tag {
  font-family: var(--f-tag);
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--c-mist);
  margin-top: var(--sp-5);
  text-indent: 0.42em;
}

.hero__tagline {
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 2.3vw, 1.65rem);
  font-weight: 500;
  font-style: italic;
  color: var(--c-text);
  margin-top: var(--sp-6);
  text-wrap: balance;
}

.hero__support {
  max-width: 56ch;
  margin: var(--sp-5) auto 0;
  color: var(--c-text-muted);
  font-size: var(--fs-body);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-7);
}

/* — Scroll cue — */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 2.75rem);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  opacity: 0;
  animation: hero-in 1s var(--ease-out) 1.15s forwards;
}
.scroll-cue__line {
  width: 1px; height: 46px;
  background: linear-gradient(180deg, transparent, var(--c-gold-a40) 30%, var(--c-gold));
  transform-origin: top;
  animation: cue 2.6s var(--ease-out) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.35; }
  45%      { transform: scaleY(1);    opacity: 1; }
}
.scroll-cue__text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-text-faint);
  transition: color var(--dur-fast) var(--ease);
}
.scroll-cue:hover .scroll-cue__text { color: var(--c-gold); }

/* ───────────────────────────────────────────────────────────────
   8. GUILD SECTION
   ─────────────────────────────────────────────────────────── */
.section--guild {
  background:
    radial-gradient(70% 50% at 82% 0%, rgba(125, 139, 158, 0.07), transparent 70%),
    var(--c-void);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--sp-9);
  border-top: var(--hairline);
}
.pillar {
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  border-right: var(--hairline);
  transition: background-color var(--dur-mid) var(--ease);
}
.pillar:first-child { padding-left: 0; }
.pillar:last-child  { border-right: 0; }
.pillar:hover { background: rgba(255, 255, 255, 0.018); }

.pillar__icon {
  display: block;
  width: 30px; height: 30px;
  color: var(--c-gold);
  margin-bottom: var(--sp-5);
  opacity: 0.9;
}
.pillar__icon svg { width: 100%; height: 100%; }

.pillar__title {
  font-size: var(--fs-h3);
  color: var(--c-text);
}
.pillar__text {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin-top: 0.35rem;
}

/* ───────────────────────────────────────────────────────────────
   9. LEADERSHIP
   ─────────────────────────────────────────────────────────── */
.section--leadership {
  background:
    linear-gradient(180deg, var(--c-void) 0%, var(--c-abyss) 30%, var(--c-abyss) 70%, var(--c-void) 100%);
}

.officers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;                 /* every card the same height */
  gap: clamp(1.25rem, 2.4vw, 2rem);
  margin-top: var(--sp-8);
  padding-bottom: clamp(2rem, 5vw, 5rem);   /* room for the deepest drop */
}
/* Staggered rhythm — middle column drops furthest.
   Carried by a transform, not margin: a margin would shrink the card
   inside its stretched grid cell and make the offset ones shorter. */
.officers > .officer { --drop: 0rem; }
.officers > .officer:nth-child(3n + 2) { --drop: clamp(2rem, 5vw, 5rem); }
.officers > .officer:nth-child(3n)     { --drop: clamp(1rem, 2.5vw, 2.5rem); }

.officer__card {
  position: relative;
  height: 100%;
  transform: translateY(var(--drop));
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--c-stone) 0%, var(--c-charcoal) 100%);
  border: 1px solid var(--c-stone-edge);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-soft);
  transition:
    transform var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease),
    box-shadow var(--dur-mid) var(--ease);
}
.officer__card:hover {
  transform: translateY(calc(var(--drop) - 6px));
  border-color: var(--c-gold-a40);
  box-shadow: var(--sh-lift), 0 0 0 1px var(--c-gold-a24);
}

/* Gold hairline that sweeps across the top edge on hover */
.officer__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  z-index: 3;
  background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
  transform: scaleX(0);
  transition: transform var(--dur-slow) var(--ease-out);
}
.officer__card:hover::before { transform: scaleX(1); }

/* — Portrait: initials by default, photo covers it when present — */
.officer__portrait {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(70% 70% at 50% 30%, var(--c-stone-2), var(--c-charcoal) 78%);
  border-bottom: 1px solid var(--c-stone-edge);
}
.officer__initials {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--c-gold-deep);
  opacity: 0.55;
  letter-spacing: 0.06em;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-mid) var(--ease);
}
.officer__card:hover .officer__initials { transform: scale(1.07); opacity: 0.75; }

/* Photo layer — only present when the officer has a `portrait` set;
   the URL comes inline from the OFFICERS config in js/main.js. */
.officer__photo {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-size: cover;
  background-position: center 20%;
  filter: saturate(0.82) contrast(1.04) brightness(0.86);
  transition: transform var(--dur-slow) var(--ease-out),
              filter var(--dur-mid) var(--ease);
}
.officer__card:hover .officer__photo {
  transform: scale(1.06);
  filter: saturate(0.95) contrast(1.04) brightness(1);
}


/* Vignette so text stays readable against any photo */
.officer__portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 12, 16, 0.75) 100%);
}

.officer__body {
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.officer__role {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-text-faint);
}
.officer__role--lead { color: var(--c-gold); }

.officer__name {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  color: var(--c-text);
  line-height: 1.15;
}

.officer__char {
  font-size: var(--fs-sm);
  color: var(--c-mist);
  line-height: 1.5;
}
.officer__char-name { font-style: italic; }
.officer__sep { color: var(--c-text-faint); margin-inline: 0.4em; }
.officer__prof { color: var(--c-text-muted); }

.officer__quote {
  margin-top: var(--sp-4);
  padding-left: var(--sp-4);
  border-left: 2px solid var(--c-gold-a24);
  color: var(--c-text-soft);
  font-size: var(--fs-sm);
  font-style: italic;
  line-height: 1.6;
  flex: 1;
  transition: border-color var(--dur-mid) var(--ease);
}
.officer__card:hover .officer__quote { border-left-color: var(--c-gold); }

.officer__discord {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: var(--hairline);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--c-text-faint);
}

/* ───────────────────────────────────────────────────────────────
   10. CREED
   ─────────────────────────────────────────────────────────── */
.creed {
  position: relative;
  padding-block: clamp(7rem, 18vw, 15rem);
  padding-inline: var(--pad-x);
  overflow: hidden;
  background: var(--c-void);
  text-align: center;
}
.creed__glow {
  position: absolute;
  left: 50%; top: 50%;
  width: min(1000px, 120%);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 165, 78, 0.09), transparent 68%);
  filter: blur(50px);
  pointer-events: none;
}
.creed__quote {
  position: relative;
  /* Explicit measure: `ch` here would resolve against the inherited body
     size, not the display size set on .creed__line. */
  max-width: min(920px, 92vw);
  margin-inline: auto;
}
.creed__line {
  font-family: var(--f-display);
  font-size: var(--fs-creed);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--c-text);
  text-wrap: balance;
}
.creed__line--dim {
  margin-top: 0.55em;
  color: var(--c-text-muted);
  font-weight: 500;
  font-style: italic;
}

/* ───────────────────────────────────────────────────────────────
   11. DISCORD
   ─────────────────────────────────────────────────────────── */
.section--discord {
  position: relative;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--c-void), var(--c-abyss));
  border-top: 1px solid rgba(201, 165, 78, 0.10);
}
.discord__aura {
  position: absolute;
  left: 50%; bottom: -55%;
  width: min(900px, 130%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 165, 78, 0.14), transparent 62%);
  filter: blur(60px);
  pointer-events: none;
}
.discord__title { margin-bottom: var(--sp-5); }
.discord__text {
  max-width: 58ch;
  margin: 0 auto var(--sp-7);
  color: var(--c-text-soft);
  font-size: var(--fs-lead);
  text-wrap: pretty;
}
.discord__note {
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--c-text-faint);
  font-style: italic;
}

/* ───────────────────────────────────────────────────────────────
   12. FOOTER
   ─────────────────────────────────────────────────────────── */
.footer {
  background: var(--c-void);
  border-top: var(--hairline);
  padding-block: var(--sp-7) var(--sp-6);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
}
.footer__brand {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-text);
}
.footer__tag {
  font-family: var(--f-tag);
  font-weight: 500;
  color: var(--c-gold);
  margin-left: 0.4em;
  letter-spacing: 0.1em;
}
.footer__mid {
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--c-text-muted);
}
.footer__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.footer__legal {
  max-width: var(--w-shell);
  margin: var(--sp-6) auto 0;
  padding: var(--sp-5) var(--pad-x) 0;
  border-top: var(--hairline);
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--c-text-faint);
  text-align: center;
}

/* ───────────────────────────────────────────────────────────────
   13. RESPONSIVE
   ─────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 960px) {
  .officers { grid-template-columns: repeat(2, 1fr); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
  .officers > .officer:nth-child(3n + 2),
  .officers > .officer:nth-child(3n) { --drop: 0rem; }
  .officers > .officer:nth-child(2n) { --drop: clamp(1.5rem, 4vw, 3rem); }
}

/* Mobile navigation + stacking */
@media (max-width: 780px) {
  :root { --nav-h: 62px; }

  .brand__name { display: none; }

  .nav__toggle { display: grid; }
  .langtog { margin-left: auto; margin-right: var(--sp-4); }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-7);
    padding: var(--sp-8) var(--pad-x);
    background: rgba(8, 8, 11, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity var(--dur-mid) var(--ease),
      transform var(--dur-mid) var(--ease),
      visibility var(--dur-mid);
  }
  body.nav-open .nav__links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    gap: var(--sp-6);
    text-align: center;
  }
  .nav__link {
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-text);
    padding-block: 0.5rem;
  }
  .nav__cta { --btn-py: 0.9rem; --btn-px: 2rem; font-size: var(--fs-sm); }

  .pillars {
    grid-template-columns: 1fr;
    margin-top: var(--sp-7);
  }
  .pillar {
    padding: var(--sp-5) 0;
    border-right: 0;
    border-bottom: var(--hairline);
  }
  .pillar:last-child { border-bottom: 0; }
  .pillar__icon { margin-bottom: var(--sp-4); }

  .officers { grid-template-columns: 1fr; gap: var(--sp-5); padding-bottom: 0; }
  .officers > .officer:nth-child(n) { --drop: 0rem; }

  .footer__inner { justify-content: center; text-align: center; }
  .footer__mid { order: 3; width: 100%; }
}

/* Small phones */
@media (max-width: 420px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__tag { letter-spacing: 0.3em; }
}

/* Fine pointers only — avoid sticky hover states on touch */
@media (hover: none) {
  .officer__card:hover { transform: translateY(var(--drop)); }
}

/* ───────────────────────────────────────────────────────────────
   14. REDUCED MOTION
   ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero__content > *,
  .scroll-cue { opacity: 1; transform: none; }

  [data-reveal] { opacity: 1; transform: none; }

  .fog, .hero__embers { animation: none; }
}

/* ───────────────────────────────────────────────────────────────
   15. PRINT
   ─────────────────────────────────────────────────────────── */
@media print {
  .nav, .scroll-cue, .hero__atmosphere, .creed__glow, .discord__aura { display: none !important; }
  body { background: #fff; color: #000; }
  body::after { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   16. WHAT WE DO — realms & pursuits
   ═══════════════════════════════════════════════════════════════ */
.section--runs {
  background:
    radial-gradient(60% 40% at 12% 0%, rgba(125, 139, 158, 0.06), transparent 70%),
    var(--c-void);
}
.section__lead {
  max-width: 58ch;
  margin-top: var(--sp-5);
  color: var(--c-text-soft);
  font-size: var(--fs-lead);
  text-wrap: pretty;
}
.prose__pull {
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-style: italic;
  color: var(--c-gold-bright);
  padding-left: var(--sp-5);
  border-left: 2px solid var(--c-gold-a40);
  text-wrap: balance;
}

/* — The two realms — */
.realms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.4vw, 1.75rem);
  margin-top: var(--sp-8);
}

.realm {
  position: relative;
  min-height: clamp(300px, 34vw, 400px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--c-stone-edge);
  border-radius: var(--r-lg);
  transition: transform var(--dur-mid) var(--ease-out),
              border-color var(--dur-mid) var(--ease);
}
.realm:hover { transform: translateY(-4px); }

.realm__atmos { position: absolute; inset: 0; z-index: -1; }
.realm__atmos::after {                 /* readability floor */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(6, 6, 9, 0.46) 0%, rgba(6, 6, 9, 0.54) 40%, rgba(6, 6, 9, 0.94) 100%);
}

/* Screenshot layer — sits under the glow and motes so the coloured
   atmosphere still reads as the top note. Source per realm below. */
.realm__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.62;
  filter: saturate(0.86) contrast(1.06);
  transform: scale(1.02);
  transition: transform var(--dur-slow) var(--ease-out),
              opacity var(--dur-mid) var(--ease);
}
.realm:hover .realm__photo { transform: scale(1.07); opacity: 0.76; }
.realm__glow {
  position: absolute;
  left: 50%; top: 42%;
  width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(46px);
  animation: breathe 11s ease-in-out infinite alternate;
}
@keyframes breathe {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.94); }
  to   { opacity: 0.9;  transform: translate(-50%, -50%) scale(1.1); }
}
.realm__motes {
  position: absolute; inset: 0;
  opacity: 0.4;
  background-image: radial-gradient(circle, currentColor 1px, transparent 1.4px);
  background-size: 150px 190px;
  animation: rise 40s linear infinite;
}

/* Underworld — cold, spectral, faintly sick green */
.realm--uw .realm__atmos {
  background:
    radial-gradient(90% 70% at 50% 100%, rgba(74, 138, 128, 0.20), transparent 66%),
    radial-gradient(60% 50% at 22% 18%, rgba(92, 110, 150, 0.18), transparent 70%),
    linear-gradient(175deg, #0a1417 0%, #080e11 60%, #070a0c 100%);
}
.realm--uw .realm__photo { background-image: url("../assets/images/realms/underworld.webp"); }
.realm--uw .realm__glow { background: radial-gradient(circle, rgba(126, 214, 195, 0.24), transparent 68%); }
.realm--uw .realm__motes { color: rgba(150, 226, 208, 0.5); }
.realm--uw .realm__tag { color: #8fe0cc; border-color: rgba(143, 224, 204, 0.34); background: rgba(143, 224, 204, 0.09); }
.realm--uw:hover { border-color: rgba(143, 224, 204, 0.4); }

/* Fissure of Woe — banked embers, warm rust */
.realm--fow .realm__atmos {
  background:
    radial-gradient(90% 70% at 50% 104%, rgba(196, 84, 30, 0.26), transparent 64%),
    radial-gradient(55% 45% at 78% 20%, rgba(138, 38, 38, 0.22), transparent 70%),
    linear-gradient(175deg, #180d09 0%, #110805 62%, #0a0605 100%);
}
.realm--fow .realm__photo { background-image: url("../assets/images/realms/fissure-of-woe.webp"); }
.realm--fow .realm__glow { background: radial-gradient(circle, rgba(232, 132, 58, 0.26), transparent 68%); }
.realm--fow .realm__motes { color: rgba(240, 160, 84, 0.55); }
.realm--fow .realm__tag { color: #f0a860; border-color: rgba(240, 168, 96, 0.34); background: rgba(240, 168, 96, 0.09); }
.realm--fow:hover { border-color: rgba(240, 168, 96, 0.4); }

/* Dungeons — cold stone and lamplight, deliberately neither green nor ember */
.realm--dungeon .realm__atmos {
  background:
    radial-gradient(90% 70% at 50% 100%, rgba(96, 118, 168, 0.20), transparent 66%),
    radial-gradient(60% 50% at 24% 16%, rgba(120, 108, 156, 0.18), transparent 70%),
    linear-gradient(175deg, #101320 0%, #0b0d16 60%, #07080c 100%);
}
/* The other two are wallpapers with a bright sky carrying them; this is a
   dark cavern, so it needs more light to read at the same strength. */
.realm--dungeon .realm__photo {
  background-image: url("../assets/images/realms/dungeons.webp");
  opacity: 0.8;
  filter: saturate(0.95) contrast(1.1) brightness(1.55);
}
.realm--dungeon:hover .realm__photo { opacity: 0.92; }
.realm--dungeon .realm__glow { background: radial-gradient(circle, rgba(150, 172, 226, 0.22), transparent 68%); }
.realm--dungeon .realm__motes { color: rgba(176, 194, 238, 0.5); }
.realm--dungeon .realm__tag { color: #a9bce6; border-color: rgba(169, 188, 230, 0.34); background: rgba(169, 188, 230, 0.09); }
.realm--dungeon:hover { border-color: rgba(169, 188, 230, 0.4); }

.realm__body { position: relative; padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.realm__tag {
  display: inline-block;
  font-family: var(--f-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.35em 0.7em;
  border: 1px solid;
  border-radius: var(--r-sm);
}
.realm__name {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--c-text);
  margin-top: var(--sp-4);
}
.realm__text {
  max-width: 42ch;
  margin-top: 0.5rem;
  color: var(--c-text-soft);
  font-size: var(--fs-sm);
}

/* — Pursuits: text-led, hairline separated, deliberately not cards — */
.pursuits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: var(--sp-8);
}
.pursuit { padding-top: var(--sp-5); border-top: 1px solid var(--c-gold-a24); }
.pursuit__tag {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.pursuit__title { font-size: var(--fs-h3); color: var(--c-text); margin-top: var(--sp-3); }
.pursuit__text { margin-top: 0.6rem; color: var(--c-text-muted); font-size: var(--fs-sm); }

.runs__creed {
  margin-top: var(--sp-8);
  text-align: center;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  font-style: italic;
  color: var(--c-text-soft);
  text-wrap: balance;
}

/* ═══════════════════════════════════════════════════════════════════
   17. GUILD INTELLIGENCE
   ═══════════════════════════════════════════════════════════════ */
.intel {
  padding-block: var(--sp-8);
  background: var(--c-abyss);
  border-block: 1px solid var(--c-stone-edge);
  text-align: center;
}
.intel[hidden] { display: none; }
.intel__label { margin-bottom: var(--sp-6); }
.intel__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-6) var(--sp-8);
  margin: 0;
}
.intel__item { min-width: 150px; }
.intel__value {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--c-gold-bright);
  line-height: 1.1;
  margin: 0;
}
.intel__key {
  margin-top: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-faint);
}

/* ═══════════════════════════════════════════════════════════════════
   18. ALLIANCE
   ═══════════════════════════════════════════════════════════════ */
/* The alliance band is a coda to the Leadership section, not a section of
   its own — so it sits close to the officers above it, with the bigger
   breath saved for whatever follows. Two full section paddings stacked
   either side left it floating in the middle of nowhere. */
.alliance { padding-block: clamp(1.75rem, 3.5vw, 3rem); background: var(--c-void); }
.section--leadership { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
/* While the player has no tracks its section is [hidden] but still in the
   DOM, so the creed is the alliance's neighbour-but-one. Both cases: */
.alliance + .creed,
.alliance + .section[hidden] + .creed { padding-top: clamp(4rem, 9vw, 8rem); }
.alliance__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
}
.alliance__rule {
  width: min(180px, 40%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-a40), transparent);
}
.alliance__text {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--c-text);
}
.alliance__note { font-size: var(--fs-sm); font-style: italic; color: var(--c-text-faint); }

/* Anything that points at the music player — the nav item, Dani's
   "Listen" button — stays out of the way until js/player.js has actually
   loaded a track and put .has-music on the body. Done in CSS rather than
   by toggling each element, so cards rendered later are covered too. */
body:not(.has-music) [data-needs-music] { display: none; }

/* Reusable guild-tag chip */
.gtag {
  display: inline-block;
  font-family: var(--f-tag);
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-gold);
  padding: 0.2em 0.55em;
  margin-inline: 0.15em;
  border: 1px solid var(--c-gold-a24);
  border-radius: var(--r-sm);
  background: var(--c-gold-a12);
  vertical-align: 0.06em;
}

/* ═══════════════════════════════════════════════════════════════════
   19. OFFICER CARD — additions
   ═══════════════════════════════════════════════════════════════ */
.officers-fallback { display: grid; gap: 0.5rem; margin-top: var(--sp-6); color: var(--c-text-soft); }

.officer__quote { flex: 0 1 auto; }          /* foot now owns the bottom */
.officer__badge { color: var(--c-gold); }
.officer__badge::before { content: "•"; margin-inline: 0.5em; color: var(--c-text-faint); }

.officer__activity { font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: 0.15rem; }
.officer__activity-label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-faint);
  margin-right: 0.5em;
}
.officer__note {
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  font-style: italic;
  color: var(--c-text-faint);
}

.officer__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--sp-5); }
.officer__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55rem 1rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--c-stone-edge);
  border-radius: var(--r-pill);
  color: var(--c-text-soft);
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.officer__action:hover,
.officer__action:focus-visible {
  transform: translateY(-1px);
  color: var(--c-gold-bright);
  border-color: var(--c-gold-a40);
  background: var(--c-gold-a12);
}
.officer__action:active { transform: translateY(0); }
.officer__action--music { color: var(--c-gold); border-color: var(--c-gold-a24); }
.officer__ext { font-size: 0.9em; transition: transform var(--dur-mid) var(--ease-out); }
.officer__action:hover .officer__ext { transform: translate(2px, -2px); }

/* Four-bar equaliser — settles when idle, dances on hover/focus */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i {
  display: block;
  width: 2px;
  height: 35%;
  background: currentColor;
  border-radius: 1px;
  transition: height var(--dur-mid) var(--ease);
}
.officer__action--music:hover .eq i,
.officer__action--music:focus-visible .eq i { animation: eq 900ms ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: 140ms !important; }
.eq i:nth-child(3) { animation-delay: 280ms !important; }
.eq i:nth-child(4) { animation-delay: 420ms !important; }
@keyframes eq { from { height: 25%; } to { height: 100%; } }

.officer__foot {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
}
.officer__discord { margin: 0; padding: 0; border: 0; }

/* ═══════════════════════════════════════════════════════════════════
   20. MUSIC PLAYER
   ═══════════════════════════════════════════════════════════════ */
.section--music {
  background:
    radial-gradient(65% 45% at 50% 0%, rgba(201, 165, 78, 0.07), transparent 70%),
    var(--c-abyss);
  border-top: 1px solid var(--c-stone-edge);
}
.section--music[hidden] { display: none; }

.player {
  max-width: 940px;
  margin: var(--sp-8) auto 0;
  background: linear-gradient(165deg, var(--c-stone) 0%, var(--c-charcoal) 100%);
  border: 1px solid var(--c-stone-edge);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-soft);
}

.player__now {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-6);
}

.player__cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: radial-gradient(70% 70% at 50% 30%, var(--c-stone-2), var(--c-charcoal));
  border: 1px solid var(--c-stone-edge);
}
.player__cover img { width: 100%; height: 100%; object-fit: cover; }

/* Bars sit on the artwork only while audio is actually playing */
.player__bars {
  position: absolute;
  left: 10px; bottom: 10px;
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  padding: 4px 6px;
  border-radius: var(--r-sm);
  background: rgba(8, 8, 11, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.player.is-playing .player__bars { display: flex; }
.player__bars i {
  display: block;
  width: 2px;
  background: var(--c-gold);
  border-radius: 1px;
  animation: eq 780ms ease-in-out infinite alternate;
}
.player__bars i:nth-child(2) { animation-delay: 130ms; }
.player__bars i:nth-child(3) { animation-delay: 260ms; }
.player__bars i:nth-child(4) { animation-delay: 390ms; }

.player__meta { display: flex; flex-direction: column; min-width: 0; }
.player__eyebrow {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-gold);
}
.player__track {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  color: var(--c-text);
  margin-top: 0.35rem;
  line-height: 1.2;
}
.player__artist { font-size: var(--fs-sm); color: var(--c-mist); margin-top: 0.2rem; }
.player__desc {
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.player__desc:empty { display: none; }

.player__seek {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: auto;
  padding-top: var(--sp-5);
}
.player__time {
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--c-text-faint);
  min-width: 3.2ch;
}

/* Range inputs — gold fill driven by --p (0–100) set from JS */
.player__range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg,
      var(--c-gold) 0%, var(--c-gold) calc(var(--p, 0) * 1%),
      var(--c-stone-edge) calc(var(--p, 0) * 1%), var(--c-stone-edge) 100%);
  cursor: pointer;
}
.player__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-gold-bright);
  border: 0;
  box-shadow: 0 0 0 3px rgba(201, 165, 78, 0.22);
  transition: transform var(--dur-fast) var(--ease);
}
.player__range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.player__range::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-gold-bright);
  border: 0;
}
.player__range--vol { flex: 0 0 84px; }

.player__controls {
  display: flex;
  flex-wrap: wrap;               /* volume drops to its own line when tight */
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--sp-5);
}
.player__btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;                /* fixed circles — never let flex squash them */
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--c-text-soft);
  border: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.player__btn svg { width: 20px; height: 20px; }
.player__btn:hover { color: var(--c-gold-bright); background: var(--c-gold-a12); }
.player__btn:active { transform: scale(0.94); }
.player__btn--play {
  width: 52px; height: 52px;
  color: #14100a;
  background: linear-gradient(160deg, var(--c-gold-bright), var(--c-gold) 55%, var(--c-gold-deep));
  box-shadow: 0 10px 26px -12px rgba(201, 165, 78, 0.6);
}
.player__btn--play:hover { color: #14100a; filter: brightness(1.06); }
.player__btn--play svg { width: 24px; height: 24px; }
/* Icon state is driven by the class, not by `hidden`: SVG elements do not
   implement the hidden IDL property, so assigning it in JS does nothing. */
.player__ico-pause { display: none; }
.player.is-playing .player__ico-play  { display: none; }
.player.is-playing .player__ico-pause { display: block; }
.player__btn--sm { width: 34px; height: 34px; }
.player__btn--sm svg { width: 17px; height: 17px; }
.player__volume { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }

/* Shuffle and repeat read as off until they are on — gold, not a fill,
   so they never compete with the play button. */
.player__btn--mode { position: relative; color: var(--c-text-faint); }
.player__btn--mode.is-on { color: var(--c-gold); background: var(--c-gold-a12); }
.player__one {
  position: absolute;
  right: 3px; bottom: 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: none;
}
.player__btn--mode[data-mode="one"] .player__one { display: block; }
.player.is-muted #pl-wave { opacity: 0.25; }

/* — Lyrics disclosure —
   A quiet strip between the controls and the playlist. Closed it reads as
   one more hairline rule; open it becomes a readable column. */
.lyrics { border-top: 1px solid var(--c-stone-edge); }

.lyrics__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem var(--sp-5);
  cursor: pointer;
  list-style: none;                 /* kill the default disclosure triangle */
  color: var(--c-text-faint);
  transition: color var(--dur-mid) var(--ease), background var(--dur-mid) var(--ease);
}
.lyrics__bar::-webkit-details-marker { display: none; }
.lyrics__bar:hover { color: var(--c-gold); background: rgba(201, 165, 78, 0.05); }
.lyrics__bar:focus-visible { outline: 2px solid var(--c-gold-a40); outline-offset: -2px; }

.lyrics__label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* The "+" is drawn rather than typed, so it can rotate into a "−". */
.lyrics__sign {
  position: relative;
  width: 11px;
  height: 11px;
  margin-left: auto;
  flex: none;
}
.lyrics__sign::before,
.lyrics__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transition: transform var(--dur-mid) var(--ease-out);
}
.lyrics__sign::after { transform: rotate(90deg); }
.lyrics[open] .lyrics__sign::after { transform: rotate(0deg); }
.lyrics[open] .lyrics__bar { color: var(--c-gold); }

.lyrics__text {
  margin: 0;
  padding: 0.25rem var(--sp-5) var(--sp-6);
  max-height: 340px;
  overflow-y: auto;
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--c-text-soft);
  white-space: pre-wrap;            /* keeps the line breaks Dani typed */
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .lyrics__sign::before, .lyrics__sign::after { transition: none; }
}

/* — Find a track — */
.plfind {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem var(--sp-5);
  border-top: 1px solid var(--c-stone-edge);
}
.plfind__input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: rgba(8, 8, 11, 0.55);
  border: 1px solid var(--c-stone-edge);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.plfind__input::placeholder { color: var(--c-text-faint); }
.plfind__input:focus {
  outline: none;
  border-color: var(--c-gold-a40);
  box-shadow: 0 0 0 3px var(--c-gold-a12);
}
.plfind__btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  border: 1px solid var(--c-stone-edge);
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.plfind__btn svg { width: 17px; height: 17px; }
.plfind__btn:hover,
.plfind__btn:focus-visible {
  color: var(--c-gold);
  border-color: var(--c-gold-a40);
  background: var(--c-gold-a12);
}
.plfind__count {
  flex: none;
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  font-variant-numeric: tabular-nums;
}
.plfind__empty {
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--c-text-faint);
  border-top: 1px solid var(--c-stone-edge);
}
.plfind__empty[hidden] { display: none; }

@media (max-width: 560px) {
  .plfind { flex-wrap: wrap; }
  .plfind__count { width: 100%; text-align: right; }
}

/* — Track list — */
.player__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--c-stone-edge);
  /* Roughly a dozen rows before it scrolls — the old 320px showed six,
     which felt cramped long before the collection was actually large. */
  max-height: min(60vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.player__item[hidden] { display: none; }
.player__item { border-bottom: 1px solid rgba(51, 51, 63, 0.5); }
.player__item:last-child { border-bottom: 0; }
.player__item button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0.85rem var(--sp-6);
  text-align: left;
  transition: background-color var(--dur-fast) var(--ease);
}
.player__item button:hover { background: rgba(255, 255, 255, 0.03); }
.player__item.is-active button { background: var(--c-gold-a12); }

.player__num {
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--c-text-faint);
  min-width: 2ch;
}
.player__item.is-active .player__num { color: var(--c-gold); }
.player__item-title {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player__item.is-active .player__item-title { color: var(--c-gold-bright); }
.player__item-artist {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  white-space: nowrap;
}

.player__empty {
  padding: var(--sp-6);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--c-text-faint);
}

/* ═══════════════════════════════════════════════════════════════════
   21. RESPONSIVE — new sections
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  /* Three cards get cramped before the rest of the page does. */
  .realms { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .realms   { grid-template-columns: 1fr; }
  .pursuits { grid-template-columns: 1fr; gap: var(--sp-6); }
}

@media (max-width: 700px) {
  .player__now { grid-template-columns: 1fr; gap: var(--sp-5); padding: var(--sp-5); }
  .player__cover { width: 140px; }
  .player__seek { padding-top: var(--sp-4); }
  .player__controls { gap: 0.35rem; }
  .player__volume { margin-left: 0; width: 100%; margin-top: var(--sp-4); }
  .player__range--vol { flex: 1; }
  .player__item button { padding-inline: var(--sp-5); }
  .player__item-artist { display: none; }
  .intel__list { gap: var(--sp-6) var(--sp-6); }
}

@media (max-width: 420px) {
  .officer__actions { flex-direction: column; align-items: stretch; }
  .officer__action { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .realm__glow, .realm__motes, .eq i, .player__bars i { animation: none !important; }
}

/* Six nav links + CTA crowd the brand name before the mobile breakpoint —
   drop the wordmark early and let the guild mark carry the identity. */
@media (max-width: 1040px) {
  .brand__name { display: none; }
  .nav__list { gap: var(--sp-5); }
}
