/* ============================================================
   ROYAL FAMILY RP — "The City Charter" design system v2
   Obsidian · Graphite · Chrome · Royal Gold
   ============================================================ */

:root {
  /* surfaces */
  --obsidian: #08080B;
  --bg-deep:  #0B0B0F;
  --graphite: #121218;
  --panel:    #15151C;
  --panel-2:  #191922;
  --line:     #23232C;
  --line-soft:#1C1C24;

  /* metals */
  --gold:       #E8B33A;
  --gold-hi:    #F6D67C;
  --gold-deep:  #9A6D1B;
  --gold-soft:  rgba(232, 179, 58, 0.09);
  --gold-glow:  rgba(232, 179, 58, 0.22);
  --chrome:     #C9CDD4;
  --bone:       #F2F0EA;
  --muted:      #8B8E98;
  --faint:      #5C5F6A;

  /* status */
  --good: #4CAF7D; --bad: #C24545; --warn: #D9A441; --info: #6B8FBF;

  /* gradients */
  --grad-gold: linear-gradient(135deg, #F6D67C 0%, #E8B33A 34%, #B8860B 68%, #9A6D1B 100%);
  --grad-gold-btn: linear-gradient(180deg, #F2C862 0%, #DFA82F 48%, #B9831C 100%);
  --grad-chrome: linear-gradient(180deg, #E8EAEE 0%, #B9BEC7 55%, #8F949E 100%);
  --grad-panel: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 55%), var(--panel);
  --hairline: linear-gradient(180deg, rgba(232,179,58,0.55), rgba(232,179,58,0.08) 40%, rgba(255,255,255,0.05));

  /* type */
  --font-display: 'Cinzel', 'Marcellus', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --fs-xs: 0.72rem; --fs-sm: 0.855rem; --fs-base: 0.975rem;

  --radius-sm: 8px; --radius: 14px; --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.5), 0 8px 28px rgba(0,0,0,0.35);
  --shadow-2: 0 2px 6px rgba(0,0,0,0.55), 0 18px 50px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 0 1px rgba(232,179,58,0.25), 0 8px 30px rgba(232,179,58,0.10);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

/* ---------------- base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0; background: var(--obsidian); color: var(--chrome);
  font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(232,179,58,0.28); color: var(--bone); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb { background: #26262F; border-radius: 10px; border: 3px solid var(--obsidian); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

img { max-width: 100%; display: inline-block; }
a { color: var(--gold); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--gold-hi); }

h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 600; color: var(--bone);
  line-height: 1.14; margin: 0 0 0.6em; letter-spacing: 0.015em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: clamp(1.08rem, 1.6vw, 1.3rem); }
p { margin: 0 0 1em; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.2rem); }
.section { padding: clamp(3.6rem, 8vw, 6.5rem) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head.center, .center { text-align: center; }
.section-head.center { margin-left: auto; margin-right: auto; }

.muted { color: var(--muted); } .small { font-size: var(--fs-sm); }
.mono { font-family: var(--font-mono); }
.mt-2 { margin-top: 0.75rem; } .mt-3 { margin-top: 1.4rem; } .mt-4 { margin-top: 2.4rem; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* eyebrow — engraved kicker with gold ticks */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 1.1rem;
}
.eyebrow::before, .section-head.center .eyebrow::after {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-head.center .eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* crown rule divider */
.crown-rule {
  display: flex; align-items: center; gap: 1rem; margin: 0 auto;
  max-width: 420px; padding: 0.4rem 0;
}
.crown-rule::before, .crown-rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,179,58,0.5));
}
.crown-rule::after { background: linear-gradient(90deg, rgba(232,179,58,0.5), transparent); }
.crown-rule span {
  width: 9px; height: 9px; transform: rotate(45deg); flex: none;
  background: var(--grad-gold); box-shadow: 0 0 12px var(--gold-glow);
}

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- announcement ---------------- */
.announce {
  background: linear-gradient(90deg, rgba(232,179,58,0.10), rgba(232,179,58,0.035) 55%, transparent);
  border-bottom: 1px solid rgba(232,179,58,0.16);
  font-size: var(--fs-sm); color: var(--bone);
  padding: 0.5rem clamp(1.1rem, 4vw, 2.2rem); text-align: center;
}
.announce-dot { color: var(--gold); margin-right: 0.5rem; animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } }

/* ---------------- header ---------------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: #000; padding: 0.6rem 1rem; z-index: 999; }
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 8, 11, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(232,179,58,0.35) 50%, transparent 95%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.site-header.scrolled { background: rgba(8, 8, 11, 0.92); box-shadow: 0 10px 34px rgba(0,0,0,0.45); }
.site-header.scrolled::after { opacity: 1; }

.header-inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(1rem, 2.5vw, 2.4rem); height: 86px;
}

.brand { display: flex; align-items: center; gap: 0.8rem; flex: none; }
.brand img { width: 58px; height: 58px; filter: drop-shadow(0 0 12px rgba(232,179,58,0.35)); transition: filter 0.3s var(--ease), transform 0.3s var(--ease); }
.brand:hover img { filter: drop-shadow(0 0 20px rgba(232,179,58,0.65)); transform: scale(1.04); }
.brand-word {
  font-family: var(--font-display); font-weight: 700; color: var(--bone);
  font-size: 1.08rem; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.1;
  white-space: nowrap;
}
.brand-word em {
  display: block; font-style: normal; font-size: 0.56rem; font-weight: 600; letter-spacing: 0.52em;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-top: 2px;
}

/* primary nav — centered between brand and actions */
.main-nav {
  display: flex; align-items: center; justify-content: center; gap: 0.15rem;
  min-width: 0;
}
.main-nav > a, .nav-more-btn {
  position: relative; color: var(--muted); font-size: 0.84rem; font-weight: 500;
  letter-spacing: 0.05em; padding: 0.6rem 0.95rem; border-radius: 8px;
  transition: color 0.25s var(--ease); white-space: nowrap;
  background: none; border: 0; cursor: pointer; font-family: var(--font-body);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.main-nav > a::after, .nav-more-btn::after {
  content: ""; position: absolute; left: 50%; bottom: 0.3rem; transform: translateX(-50%) rotate(45deg) scale(0);
  width: 5px; height: 5px; background: var(--grad-gold);
  box-shadow: 0 0 8px var(--gold-glow);
  transition: transform 0.28s var(--ease);
}
.main-nav > a:hover, .nav-more-btn:hover { color: var(--bone); }
.main-nav > a:hover::after { transform: translateX(-50%) rotate(45deg) scale(1); }
.main-nav > a.active, .nav-more-btn.active { color: var(--gold); }
.main-nav > a.active::after, .nav-more-btn.active::after { transform: translateX(-50%) rotate(45deg) scale(1); }
.main-nav > a:focus-visible, .nav-more-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* "More" dropdown */
.nav-more { position: relative; }
.nav-more-btn svg { transition: transform 0.25s var(--ease); opacity: 0.7; }
.nav-more.open .nav-more-btn svg { transform: rotate(180deg); }
.nav-more-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 190px; padding: 0.5rem;
  background: rgba(14, 14, 19, 0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid transparent; border-radius: 12px;
  background-clip: padding-box;
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(232,179,58,0.18);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.nav-more-menu::before { /* caret */
  content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px; background: #0E0E13;
  border-left: 1px solid rgba(232,179,58,0.25); border-top: 1px solid rgba(232,179,58,0.25);
}
.nav-more.open .nav-more-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-more-menu a {
  display: block; padding: 0.6rem 0.9rem; border-radius: 8px;
  color: var(--muted); font-size: 0.84rem; font-weight: 500; letter-spacing: 0.04em;
  transition: all 0.18s var(--ease);
}
.nav-more-menu a:hover { color: var(--bone); background: rgba(232,179,58,0.07); padding-left: 1.15rem; }
.nav-more-menu a.active { color: var(--gold); background: var(--gold-soft); }

/* actions */
.header-actions { display: flex; align-items: center; gap: 0.55rem; flex: none; justify-self: end; }
.header-user {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--chrome); font-size: 0.84rem; font-weight: 600;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem; border-radius: 100px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.02);
  transition: all 0.22s var(--ease); max-width: 190px;
}
.header-user span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-user:hover { border-color: rgba(232,179,58,0.45); color: var(--gold-hi); }
.avatar-xs {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  border: 1px solid var(--gold-deep); object-fit: cover;
}
.avatar-xs-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--gold);
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
}

/* hamburger — real bars, animates to X */
.nav-toggle {
  display: none; position: relative; width: 42px; height: 42px; flex: none;
  background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color 0.25s var(--ease);
}
.nav-toggle:hover { border-color: rgba(232,179,58,0.5); }
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px;
  background: var(--bone); transition: transform 0.3s var(--ease), opacity 0.2s, top 0.3s var(--ease), background 0.3s;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span { background: var(--gold); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* mobile drawer — numbered links, staggered slide-in */
.mobile-nav {
  display: none; position: fixed; inset: 0; top: 0; z-index: 99;
  background: rgba(6, 6, 9, 0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  overflow-y: auto; padding: 110px clamp(1.4rem, 6vw, 3rem) 3rem;
}
.mobile-nav.open { display: block; }
.mobile-nav nav { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; }
.mobile-nav nav > a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 0.2rem; color: var(--chrome);
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0; transform: translateY(14px);
  animation: mobileIn 0.45s var(--ease) forwards;
  animation-delay: calc(var(--mi, 1) * 55ms);
}
.mobile-nav nav > a:hover, .mobile-nav nav > a.active { color: var(--gold); }
.mobile-nav-num {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--gold-deep);
  letter-spacing: 0.2em; flex: none; width: 26px;
}
.mobile-nav nav > a.active .mobile-nav-num { color: var(--gold); }
.mobile-nav-cta {
  margin-top: 2rem; display: flex; gap: 0.7rem; flex-wrap: wrap;
  opacity: 0; transform: translateY(14px);
  animation: mobileIn 0.45s var(--ease) forwards;
  animation-delay: calc(var(--mi, 8) * 55ms);
}
.mobile-nav-cta .btn { flex: 1; min-width: 150px; }
@keyframes mobileIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mobile-nav nav > a, .mobile-nav-cta { animation: none; opacity: 1; transform: none; }
}

/* ---------------- buttons ---------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.05em;
  padding: 0.72rem 1.5rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; overflow: hidden; white-space: nowrap;
  transition: transform 0.22s var(--ease), box-shadow 0.28s var(--ease), border-color 0.25s, background 0.25s, color 0.25s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 0.95rem 2.2rem; font-size: 0.95rem; border-radius: 12px; }

.btn-gold {
  background: var(--grad-gold-btn); color: #1B1405;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  border-color: rgba(255, 224, 138, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 4px 16px rgba(232,179,58,0.22);
}
.btn-gold::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 46%;
  left: -70%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transition: left 0.55s var(--ease);
}
.btn-gold:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 8px 28px rgba(232,179,58,0.4); transform: translateY(-1px); color: #1B1405; }
.btn-gold:hover::before { left: 125%; }

.btn-chrome {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  color: var(--bone); border-color: rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-chrome:hover { border-color: rgba(232,179,58,0.5); color: var(--gold-hi); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 6px 22px rgba(0,0,0,0.4); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--bone); border-color: var(--faint); background: rgba(255,255,255,0.03); }

.btn-danger { background: rgba(194,69,69,0.12); color: #E08585; border-color: rgba(194,69,69,0.4); }
.btn-danger:hover { background: rgba(194,69,69,0.22); color: #F0A0A0; }

.btn-discord { background: #5865F2; color: #fff; border-color: #6B76F5; width: 100%; box-shadow: 0 4px 18px rgba(88,101,242,0.35); }
.btn-discord:hover { background: #6873F5; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 26px rgba(88,101,242,0.5); }

.copy-btn {
  background: rgba(232,179,58,0.1); border: 1px solid rgba(232,179,58,0.35); color: var(--gold);
  border-radius: 7px; padding: 0.35rem 0.8rem; font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.06em; cursor: pointer; transition: all 0.2s var(--ease); flex: none;
}
.copy-btn:hover { background: rgba(232,179,58,0.2); }

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(5rem, 12vw, 9.5rem) 0 clamp(6.5rem, 13vw, 10rem);
  isolation: isolate;
}
.hero::before { /* gold aurora + vignette */
  content: ""; position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse 62% 46% at 50% -6%, rgba(232,179,58,0.17), transparent 62%),
    radial-gradient(ellipse 40% 32% at 82% 6%, rgba(107,143,191,0.06), transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 115%, rgba(0,0,0,0.75), transparent 55%),
    linear-gradient(180deg, var(--bg-deep), var(--obsidian));
}
.hero::after { /* film grain */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.hero-skyline { /* two-layer skyline via clip-path panels */
  position: absolute; left: -2%; right: -2%; bottom: 0; height: 34%; z-index: -2; pointer-events: none;
}
.hero-skyline::before, .hero-skyline::after {
  content: ""; position: absolute; inset: 0;
}
.hero-skyline::before { /* far layer */
  background: linear-gradient(180deg, #101017, #0B0B10);
  clip-path: polygon(0 78%, 4% 78%, 4% 58%, 9% 58%, 9% 72%, 14% 72%, 14% 46%, 17% 46%, 17% 40%, 20% 40%, 20% 66%, 26% 66%, 26% 52%, 31% 52%, 31% 70%, 37% 70%, 37% 34%, 40% 34%, 40% 28%, 43% 28%, 43% 60%, 49% 60%, 49% 48%, 54% 48%, 54% 64%, 60% 64%, 60% 38%, 64% 38%, 64% 56%, 70% 56%, 70% 44%, 75% 44%, 75% 68%, 81% 68%, 81% 50%, 86% 50%, 86% 62%, 92% 62%, 92% 42%, 96% 42%, 96% 74%, 100% 74%, 100% 100%, 0 100%);
  opacity: 0.85;
}
.hero-skyline::after { /* near layer with window glints */
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(232,179,58,0.05) 16px 17px),
    linear-gradient(180deg, #0A0A0E, #060608);
  clip-path: polygon(0 100%, 0 66%, 6% 66%, 6% 84%, 11% 84%, 11% 52%, 15% 52%, 15% 46%, 18% 46%, 18% 78%, 25% 78%, 25% 60%, 30% 60%, 30% 88%, 36% 88%, 36% 42%, 39% 42%, 39% 36%, 42% 36%, 42% 42%, 45% 42%, 45% 74%, 52% 74%, 52% 56%, 57% 56%, 57% 82%, 63% 82%, 63% 48%, 68% 48%, 68% 70%, 74% 70%, 74% 58%, 79% 58%, 79% 86%, 85% 86%, 85% 64%, 90% 64%, 90% 76%, 95% 76%, 95% 54%, 100% 54%, 100% 100%);
}
.hero .wrap { position: relative; }
.hero-logo {
  width: clamp(190px, 25vw, 300px); height: auto; margin-bottom: 2.2rem;
  filter: drop-shadow(0 0 46px rgba(232,179,58,0.45)) drop-shadow(0 18px 38px rgba(0,0,0,0.65));
  animation: heroFloat 7s ease-in-out infinite;
}
@keyframes heroFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem); font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.45em;
}
.hero h1 .gold {
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(232,179,58,0.3));
}
.hero-sub {
  max-width: 640px; margin: 0 auto 2.4rem; color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem); line-height: 1.75;
}
.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ---------------- ledger (live status strip) ---------------- */
.ledger {
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,0.012) 3px 4px),
    linear-gradient(180deg, #101016, #0B0B10);
  border-top: 1px solid rgba(232,179,58,0.22);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.ledger::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,179,58,0.7) 50%, transparent);
}
.ledger-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1180px; margin: 0 auto;
}
.ledger-cell {
  padding: 1.5rem clamp(1rem, 2.5vw, 2rem); text-align: center;
  border-left: 1px solid var(--line-soft); position: relative;
}
.ledger-cell:first-child { border-left: 0; }
.ledger-k {
  display: block; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.5rem;
}
.ledger-v {
  font-family: var(--font-mono); font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  color: var(--bone); font-weight: 500; display: inline-flex; align-items: center; gap: 0.55rem;
}
.ledger-v .unit { font-size: 0.8rem; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-on { background: var(--good); box-shadow: 0 0 0 3px rgba(76,175,125,0.18), 0 0 14px rgba(76,175,125,0.7); animation: pulse 2.2s infinite; }
.dot-off { background: var(--bad); box-shadow: 0 0 0 3px rgba(194,69,69,0.15); }

/* ---------------- cards ---------------- */
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; background: var(--grad-panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.8rem; box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before { /* top highlight hairline */
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
}
a.card { color: inherit; display: block; }
a.card:hover, .card.hoverable:hover {
  transform: translateY(-5px); border-color: rgba(232,179,58,0.4);
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(232,179,58,0.14), 0 14px 44px rgba(232,179,58,0.07);
}
a.card:hover h3 { color: var(--gold-hi); }
.card h3 { transition: color 0.25s var(--ease); }

.card-charter { /* prestige card with gold gradient frame */
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(160deg, rgba(232,179,58,0.65), rgba(232,179,58,0.12) 38%, rgba(255,255,255,0.06) 72%, rgba(232,179,58,0.4)) border-box;
  box-shadow: var(--shadow-1), 0 0 44px rgba(232,179,58,0.05);
}
.card-charter::after {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border: 1px solid rgba(232,179,58,0.1); border-radius: calc(var(--radius) - 6px);
}

/* pillar */
.pillar { text-align: left; }
.pillar h3 { display: flex; align-items: center; gap: 0.7rem; }
.pillar h3::before {
  content: ""; width: 8px; height: 8px; transform: rotate(45deg); flex: none;
  background: var(--grad-gold); box-shadow: 0 0 10px var(--gold-glow);
}
.pillar p { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 0; }

/* department shield cards */
.dept-card {
  text-align: center; padding-top: 2.2rem;
  clip-path: polygon(0 0, 100% 0, 100% 84%, 50% 100%, 0 84%);
  padding-bottom: 3.4rem; border-radius: var(--radius) var(--radius) 0 0;
}
.dept-card .dept-logo { width: 62px; height: 62px; object-fit: contain; margin-bottom: 0.9rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5)); }
.dept-card .tagline { color: var(--muted); font-size: var(--fs-sm); min-height: 2.6em; }
.badge-recruiting {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--good); background: rgba(76,175,125,0.1);
  border: 1px solid rgba(76,175,125,0.3); border-radius: 100px; padding: 0.28rem 0.85rem;
}

/* news cards */
.news-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-card .news-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--line); }
.news-card .cat {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); padding: 1.3rem 1.6rem 0;
}
.news-card h3 { padding: 0.45rem 1.6rem 0; font-size: 1.12rem; }
.news-card .excerpt { padding: 0 1.6rem; color: var(--muted); font-size: var(--fs-sm); flex: 1; }
.news-card .date { padding: 0 1.6rem 1.4rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); }

/* event rows */
.event-row { display: flex; gap: 1.3rem; align-items: center; padding: 1.15rem 1.5rem; }
.event-date {
  flex: none; width: 66px; text-align: center; border-radius: 10px; padding: 0.55rem 0;
  background: linear-gradient(180deg, rgba(232,179,58,0.14), rgba(232,179,58,0.05));
  border: 1px solid rgba(232,179,58,0.3);
}
.event-date .d { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-hi); line-height: 1.05; font-weight: 700; }
.event-date .m { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.event-info h3 { margin-bottom: 0.15rem; font-size: 1.06rem; }
.event-info p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

/* pills */
.pill {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; border-radius: 100px; padding: 0.3rem 0.85rem; border: 1px solid;
}
.pill-good { color: var(--good); border-color: rgba(76,175,125,0.35); background: rgba(76,175,125,0.08); }
.pill-bad { color: #E08585; border-color: rgba(194,69,69,0.4); background: rgba(194,69,69,0.08); }
.pill-warn { color: var(--warn); border-color: rgba(217,164,65,0.4); background: rgba(217,164,65,0.08); }
.pill-info { color: #9DB8DC; border-color: rgba(107,143,191,0.4); background: rgba(107,143,191,0.1); }
.pill-muted { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,0.02); }

/* ---------------- forms ---------------- */
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--bone); margin-bottom: 0.45rem; letter-spacing: 0.02em; }
.field label .help { display: block; font-weight: 400; color: var(--faint); font-size: 0.78rem; margin-top: 0.15rem; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"],
.field input[type="number"], .field input[type="datetime-local"], .field select, .field textarea,
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; background: #0D0D12; border: 1px solid var(--line); border-radius: 10px;
  color: var(--bone); font-family: var(--font-body); font-size: 0.93rem;
  padding: 0.72rem 0.95rem; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.field textarea, textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(232,179,58,0.55);
  box-shadow: 0 0 0 3px rgba(232,179,58,0.12); background: #0F0F15;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.choice { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; font-size: var(--fs-sm); color: var(--chrome); cursor: pointer; }
.choice input { width: auto; accent-color: var(--gold); transform: scale(1.15); }
.char-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); text-align: right; margin-top: 0.3rem; }
.char-count.ok { color: var(--good); } .char-count.under { color: var(--warn); } .char-count.over { color: #E08585; }
.field-error { color: #E08585; font-size: 0.8rem; margin: 0.4rem 0 0; }
.form-section-break { border: 0; height: 1px; margin: 2.4rem 0 1.8rem; background: linear-gradient(90deg, rgba(232,179,58,0.4), var(--line) 55%, transparent); }

.flash {
  max-width: 1180px; margin: 1rem auto 0; padding: 0.85rem 1.3rem; border-radius: 10px;
  font-size: var(--fs-sm); border: 1px solid rgba(76,175,125,0.35);
  background: rgba(76,175,125,0.08); color: #A9DDC3;
}
.flash-err { border-color: rgba(194,69,69,0.4); background: rgba(194,69,69,0.09); color: #ECB0B0; }
.flash-warn { border-color: rgba(217,164,65,0.4); background: rgba(217,164,65,0.08); color: #EBCB90; }

/* ---------------- tables ---------------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--graphite); box-shadow: var(--shadow-1); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; font-size: var(--fs-sm); }
table.data th {
  text-align: left; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint); font-weight: 500;
  padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}
table.data td { padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--line-soft); color: var(--chrome); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.2s; }
table.data tbody tr:hover { background: rgba(232,179,58,0.025); }

/* ---------------- rules ---------------- */
.rules-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2.6rem; align-items: start; }
.rules-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 0.1rem; }
.rules-sidebar a {
  color: var(--muted); font-size: var(--fs-sm); padding: 0.5rem 0.9rem;
  border-left: 2px solid var(--line); transition: all 0.22s var(--ease);
}
.rules-sidebar a:hover, .rules-sidebar a.active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-soft); }
.rule { padding: 1.5rem 0; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 100px; }
.rule-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.6rem; }
.rule-head h3 { margin: 0; font-size: 1.08rem; }
.rule-code {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  color: #1B1405; background: var(--grad-gold-btn); padding: 0.26rem 0.7rem; border-radius: 6px; flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.rule-anchor { margin-left: auto; color: var(--faint); opacity: 0; transition: opacity 0.2s; font-size: 1.05rem; }
.rule:hover .rule-anchor { opacity: 1; }
.rule-body { color: var(--chrome); font-size: 0.93rem; }
.rule-body p:last-child { margin-bottom: 0; }
.rule-example {
  margin-top: 0.9rem; padding: 0.85rem 1.15rem; border-left: 2px solid var(--gold-deep);
  background: linear-gradient(90deg, rgba(232,179,58,0.06), transparent 75%);
  border-radius: 0 10px 10px 0; font-size: var(--fs-sm); color: var(--muted);
}
.rule-example strong { color: var(--gold); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------------- prose ---------------- */
.prose { color: var(--chrome); max-width: 68ch; }
.prose h2 { margin-top: 2.2em; }
.prose h2::before { content: "◆ "; color: var(--gold); font-size: 0.6em; vertical-align: 0.25em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--gold); }
.prose a { border-bottom: 1px solid rgba(232,179,58,0.35); }
.prose blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 2px solid var(--gold-deep); color: var(--muted); font-style: italic; }

/* ---------------- steps ---------------- */
.steps { max-width: 760px; counter-reset: step; }
.step {
  display: flex; gap: 1.3rem; padding: 1.4rem 0 1.4rem 0.4rem; border-bottom: 1px solid var(--line-soft);
  counter-increment: step; position: relative;
}
.step::before {
  content: counter(step, decimal-leading-zero); flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--faint);
  background: var(--graphite); transition: all 0.3s var(--ease);
}
.step.done::before { content: "✓"; color: #1B1405; background: var(--grad-gold-btn); border-color: var(--gold); box-shadow: 0 0 22px rgba(232,179,58,0.28); }
.step h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.step.done h3 { color: var(--gold-hi); }

/* ---------------- dashboard ---------------- */
.dash-grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.6rem; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 100px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.kv:last-of-type { border-bottom: 0; }
.kv .k { color: var(--faint); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; flex: none; }
.kv .v { color: var(--bone); text-align: right; }

/* ---------------- staff ---------------- */
.staff-card { text-align: center; padding: 2rem 1.3rem 1.6rem; }
.staff-card .avatar, .staff-card .avatar-fallback {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 0.9rem;
  border: 2px solid transparent;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad-gold) border-box;
  object-fit: cover; display: flex; align-items: center; justify-content: center;
}
.staff-card .avatar-fallback { font-family: var(--font-display); font-size: 1.7rem; color: var(--gold); font-weight: 700; }
.staff-card h3 { margin-bottom: 0.1rem; font-size: 1.05rem; }
.staff-card .pos { color: var(--gold); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.6rem; }
.staff-card .bio { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.2rem; }

/* ---------------- final CTA ---------------- */
.final-cta {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--radius-lg); border: 1px solid transparent;
  background:
    linear-gradient(180deg, #14141B, #0E0E13) padding-box,
    linear-gradient(160deg, rgba(232,179,58,0.6), rgba(232,179,58,0.1) 40%, rgba(232,179,58,0.45)) border-box;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(232,179,58,0.13), transparent 65%);
}
.final-cta > * { position: relative; }
.final-cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); text-transform: uppercase; letter-spacing: 0.06em; }
.final-cta p { color: var(--muted); max-width: 520px; margin: 0 auto 2rem; }

/* ---------------- empty state ---------------- */
.empty-state {
  text-align: center; padding: 3.4rem 2rem; border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--muted);
}
.empty-state h3 { color: var(--chrome); }
.empty-state p { margin-bottom: 0; font-size: var(--fs-sm); }

/* ---------------- auth ---------------- */
.auth-shell {
  min-height: calc(100vh - 76px); display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.2rem; position: relative;
  background: radial-gradient(ellipse 55% 40% at 50% 0%, rgba(232,179,58,0.08), transparent 60%);
}
.auth-card { width: 100%; max-width: 430px; text-align: center; padding: 2.6rem 2.4rem; }
.auth-card .hero-logo { width: 104px; margin-bottom: 1.1rem; animation: none; }
.auth-divider {
  display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0;
  color: var(--faint); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------- footer ---------------- */
.site-footer {
  position: relative; margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg-deep), #050507);
  overflow: hidden;
}
.site-footer::before { /* giant watermark */
  content: "ROYAL"; position: absolute; left: 50%; bottom: -0.28em; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(7rem, 22vw, 17rem);
  letter-spacing: 0.1em; color: rgba(255,255,255,0.012); pointer-events: none; line-height: 1;
}
.site-footer .crown-rule { margin: 2.6rem auto 0; }
.footer-grid {
  position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem; padding-top: 2.8rem; padding-bottom: 2.4rem;
}
.footer-brand img { width: 62px; filter: drop-shadow(0 0 14px rgba(232,179,58,0.3)); margin-bottom: 0.8rem; }
.footer-brand p { color: var(--faint); font-size: var(--fs-sm); max-width: 34ch; }
.site-footer h4 {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; font-weight: 500;
}
.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links a { color: var(--muted); font-size: var(--fs-sm); }
.footer-links a:hover { color: var(--gold-hi); }
.footer-status { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); margin-top: 0.8rem; }
.footer-legal {
  position: relative; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.3rem; padding-bottom: 1.6rem; border-top: 1px solid var(--line-soft);
  color: var(--faint); font-size: 0.76rem;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .rules-sidebar a { border-left: 0; border: 1px solid var(--line); border-radius: 100px; padding: 0.35rem 0.9rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn-ghost, .header-user, .header-actions .btn:not(.btn-gold) { display: none; }
  .header-inner { grid-template-columns: auto 1fr auto auto; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .ledger-inner { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell:nth-child(3) { border-left: 0; }
  .ledger-cell { border-top: 1px solid var(--line-soft); }
  .ledger-cell:nth-child(-n+2) { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .event-row { flex-direction: row; }
  .hero-ctas .btn { width: 100%; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .header-inner { height: 72px; }
  .brand img { width: 46px; height: 46px; }
}

/* ============================================================
   FLAIR LAYER — v2.1
   ============================================================ */

/* scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%; z-index: 200;
  background: var(--grad-gold); box-shadow: 0 0 12px rgba(232,179,58,0.8);
  transition: width 0.08s linear; pointer-events: none;
}

/* animated shimmer on hero gold word */
.hero h1 .gold {
  background: linear-gradient(110deg, #9A6D1B 0%, #E8B33A 22%, #FFF3C4 40%, #F6D67C 50%, #E8B33A 62%, #9A6D1B 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: goldSheen 5.5s var(--ease) infinite;
}
@keyframes goldSheen {
  0%, 55% { background-position: 110% 0; }
  85%, 100% { background-position: -60% 0; }
}

/* rotating royal ring behind hero crest */
.logo-ring {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: clamp(300px, 38vw, 460px); height: clamp(300px, 38vw, 460px);
  margin-top: calc(clamp(190px, 25vw, 300px) / 2 - clamp(300px, 38vw, 460px) / 2 + 1.1rem);
  border-radius: 50%; pointer-events: none; z-index: -1;
}
.logo-ring::before, .logo-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
}
.logo-ring::before {
  background: conic-gradient(from 0deg, transparent 0 8%, rgba(232,179,58,0.5) 12%, transparent 18%,
    transparent 46%, rgba(232,179,58,0.35) 52%, transparent 58%,
    transparent 78%, rgba(246,214,124,0.55) 84%, transparent 90%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  animation: ringSpin 14s linear infinite;
}
.logo-ring::after {
  inset: 9%;
  border: 1px dashed rgba(232,179,58,0.16); animation: ringSpin 26s linear infinite reverse;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* drifting gold embers */
.ember {
  position: absolute; bottom: -8px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, #F6D67C 0%, rgba(232,179,58,0.65) 45%, transparent 72%);
  animation: emberRise linear infinite;
  opacity: 0;
}
@keyframes emberRise {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  8%   { opacity: var(--em-op, 0.55); }
  70%  { opacity: var(--em-op, 0.55); }
  100% { transform: translateY(var(--em-rise, -70vh)) translateX(var(--em-drift, 30px)) scale(0.4); opacity: 0; }
}

/* card sheen sweep on hover */
a.card::after, .card.hoverable::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  left: -60%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), rgba(232,179,58,0.07), transparent);
  transition: left 0.7s var(--ease);
}
a.card:hover::after, .card.hoverable:hover::after { left: 130%; }
.news-card::after { display: none; } /* image cards: skip sheen, keep clean */

/* final CTA — living gold frame */
.final-cta {
  background:
    linear-gradient(180deg, #14141B, #0E0E13) padding-box,
    linear-gradient(120deg, rgba(232,179,58,0.7), rgba(232,179,58,0.08) 30%, rgba(246,214,124,0.55) 50%, rgba(232,179,58,0.08) 70%, rgba(232,179,58,0.7)) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: ctaFrame 9s ease-in-out infinite;
}
@keyframes ctaFrame {
  0%, 100% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
}

/* eyebrow tick draw-in */
.section-head.in .eyebrow::before, .section-head.in .eyebrow::after { animation: tickDraw 0.9s var(--ease) both; }
@keyframes tickDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* crown-rule diamond breathing glow */
.crown-rule span { animation: diamondGlow 3.6s ease-in-out infinite; }
@keyframes diamondGlow {
  0%, 100% { box-shadow: 0 0 10px var(--gold-glow); }
  50% { box-shadow: 0 0 22px rgba(232,179,58,0.55), 0 0 40px rgba(232,179,58,0.18); }
}

/* count-up flash on ledger value */
.ledger-v.ticked { animation: vFlash 0.5s var(--ease); }
@keyframes vFlash { 0% { color: var(--gold-hi); text-shadow: 0 0 18px rgba(232,179,58,0.8); } 100% { color: var(--bone); } }

/* reduce all flair for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero h1 .gold, .logo-ring::before, .logo-ring::after, .ember,
  .final-cta, .crown-rule span, .announce-dot, .dot-on { animation: none !important; }
  .ember { display: none; }
}

/* ---------------- gallery ---------------- */
.gallery-grid { columns: 3 300px; column-gap: 1.2rem; }
.gallery-item {
  position: relative; margin: 0 0 1.2rem; break-inside: avoid;
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); background: var(--graphite);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
.gallery-item img { width: 100%; display: block; transition: transform 0.5s var(--ease); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.1rem 0.9rem; display: flex; flex-direction: column; gap: 0.1rem;
  background: linear-gradient(180deg, transparent, rgba(4,4,6,0.88));
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gallery-item:hover, .gallery-item:focus-visible {
  transform: translateY(-4px); border-color: rgba(232,179,58,0.45);
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(232,179,58,0.15);
  outline: none;
}
.gallery-item:hover img { transform: scale(1.045); }
.gallery-item:hover figcaption, .gallery-item:focus-visible figcaption { opacity: 1; transform: none; }
.gallery-title { color: var(--bone); font-weight: 600; font-size: 0.9rem; }
.gallery-credit { color: var(--gold); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem; padding: 3.5rem 1.2rem 2rem;
  background: rgba(4, 4, 6, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: lbIn 0.25s var(--ease);
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: min(1200px, 94vw); max-height: 80vh; border-radius: var(--radius);
  border: 1px solid rgba(232,179,58,0.3); box-shadow: 0 30px 90px rgba(0,0,0,0.8);
}
.lightbox-caption { color: var(--chrome); font-size: var(--fs-sm); margin: 0; text-align: center; }
.lightbox-close {
  position: absolute; top: 1.1rem; right: 1.3rem; width: 44px; height: 44px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 50%;
  color: var(--bone); font-size: 1.05rem; cursor: pointer; transition: all 0.2s var(--ease);
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); transform: rotate(90deg); }

/* admin gallery list */
.admin-gallery-list { display: flex; flex-direction: column; gap: 0.6rem; }
.admin-gallery-row {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.55rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--graphite);
}
.admin-gallery-row.is-hidden { opacity: 0.5; }
.admin-gallery-row img { width: 84px; height: 52px; object-fit: cover; border-radius: 6px; flex: none; }
.admin-gallery-row .meta { display: flex; flex-direction: column; min-width: 0; }
.admin-gallery-row .meta strong { color: var(--bone); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-gallery-row .acts { margin-left: auto; display: flex; gap: 0.35rem; flex: none; }

/* ============================================================
   LANDING v3 — full-viewport cinematic layer
   ============================================================ */

.section-alt {
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(232,179,58,0.045), transparent 60%),
    var(--bg-deep);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* full-viewport hero */
.hero-full {
  min-height: calc(100svh - 86px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(2.5rem, 5vh, 4rem); padding-bottom: 0;
}
.hero-stage { display: flex; flex-direction: column; align-items: center; padding-bottom: clamp(4rem, 9vh, 7rem); }
.hero-full h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  max-width: 18ch; margin-left: auto; margin-right: auto;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
}
.hero-full .hero-sub { font-size: clamp(1.02rem, 1.7vw, 1.22rem); max-width: 58ch; }

/* live player chip */
.hero-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--chrome); padding: 0.5rem 1.1rem; border-radius: 100px; margin-bottom: 1.6rem;
  border: 1px solid rgba(232,179,58,0.3);
  background: linear-gradient(180deg, rgba(232,179,58,0.09), rgba(232,179,58,0.02));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease);
}
.hero-chip strong { color: var(--gold-hi); font-weight: 600; }
.hero-chip:hover { border-color: var(--gold); color: var(--bone); box-shadow: 0 0 24px rgba(232,179,58,0.2); }

/* scroll indicator */
.hero-scroll {
  position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%);
  width: 26px; height: 44px; border: 1.5px solid rgba(232,179,58,0.4); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px; z-index: 2;
  transition: border-color 0.25s var(--ease);
}
.hero-scroll:hover { border-color: var(--gold); }
.hero-scroll-line {
  width: 2px; height: 9px; border-radius: 2px; background: var(--grad-gold);
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* gold ticker */
.ticker {
  position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; z-index: 2;
  border-top: 1px solid rgba(232,179,58,0.2);
  background: linear-gradient(180deg, rgba(10,10,13,0.65), rgba(8,8,11,0.9));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: inline-flex; align-items: center; gap: 2.2rem; white-space: nowrap;
  padding: 0.85rem 0; will-change: transform;
  animation: tickerScroll 28s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item {
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--chrome);
}
.ticker-sep { color: var(--gold); font-size: 0.6rem; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .hero-scroll-line { animation: none; }
}

/* numbered feature rows */
.features { display: flex; flex-direction: column; gap: clamp(1.4rem, 3vw, 2.2rem); max-width: 1020px; margin: 0 auto; }
.feature-row {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--grad-panel); position: relative; overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}
.feature-row:hover { border-color: rgba(232,179,58,0.35); box-shadow: var(--shadow-2), 0 0 50px rgba(232,179,58,0.05); }
.feature-row.flip { grid-template-columns: 1fr 1.25fr; }
.feature-row.flip .feature-copy { order: 2; }
.feature-row.flip .feature-visual { order: 1; }
.feature-num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1;
  background: linear-gradient(180deg, rgba(232,179,58,0.55), rgba(232,179,58,0.08));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.6rem;
}
.feature-copy h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.feature-copy p { color: var(--muted); margin-bottom: 0; max-width: 44ch; }
.feature-visual {
  position: relative; min-height: 180px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
}
.fv-glyph {
  font-size: 2rem; color: rgba(232,179,58,0.55);
  filter: drop-shadow(0 0 18px rgba(232,179,58,0.5));
}
.fv-1 { background:
  radial-gradient(ellipse 70% 60% at 30% 20%, rgba(232,179,58,0.16), transparent 60%),
  repeating-linear-gradient(115deg, transparent 0 22px, rgba(232,179,58,0.05) 22px 23px),
  linear-gradient(160deg, #14141B, #0B0B10); }
.fv-2 { background:
  radial-gradient(ellipse 60% 70% at 75% 30%, rgba(107,143,191,0.14), transparent 60%),
  radial-gradient(ellipse 50% 50% at 20% 80%, rgba(194,69,69,0.10), transparent 55%),
  linear-gradient(200deg, #14141B, #0B0B10); }
.fv-3 { background:
  radial-gradient(ellipse 80% 60% at 50% 100%, rgba(76,175,125,0.10), transparent 60%),
  repeating-linear-gradient(0deg, transparent 0 18px, rgba(255,255,255,0.02) 18px 19px),
  linear-gradient(180deg, #14141B, #0B0B10); }
.fv-4 { background:
  radial-gradient(ellipse 65% 60% at 50% 0%, rgba(232,179,58,0.14), transparent 55%),
  repeating-radial-gradient(circle at 50% 120%, transparent 0 26px, rgba(232,179,58,0.04) 26px 27px),
  linear-gradient(160deg, #15151C, #0A0A0E); }
.feature-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.35));
}

/* community stat band */
.stat-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; margin-top: clamp(2.2rem, 5vw, 3.6rem);
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-cell { background: var(--graphite); text-align: center; padding: 2rem 1rem 1.7rem; }
.stat-n {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1.1;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-l {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--muted);
}

@media (max-width: 860px) {
  .feature-row, .feature-row.flip { grid-template-columns: 1fr; }
  .feature-row.flip .feature-copy { order: 1; }
  .feature-row.flip .feature-visual { order: 2; }
  .feature-visual { min-height: 120px; }
  .hero-scroll { display: none; }
}

/* auth v3 backdrop */
.auth-shell {
  background:
    radial-gradient(ellipse 60% 45% at 50% -5%, rgba(232,179,58,0.12), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 115%, rgba(0,0,0,0.8), transparent 55%),
    linear-gradient(180deg, var(--bg-deep), var(--obsidian));
  position: relative; overflow: hidden;
}
.auth-shell::before {
  content: "RF"; position: absolute; right: -4%; bottom: -10%;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(14rem, 32vw, 26rem);
  line-height: 1; color: rgba(232,179,58,0.02); pointer-events: none; letter-spacing: -0.02em;
}
.auth-card { position: relative; max-width: 450px; }
