/* ==========================================================================
   KHHH — Kenya Holy Hip Hop
   Design system built from the KHHH Design System Brief
   Primary tagline: "INVADING THE CULTURE"
   Signature: Maasai shield + mic grille motif
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Color — extracted from logo + brief */
  --deep-purple: #522462;
  --accent-purple: #6e308d;
  --wordmark-dark: #2b1933;
  --ink: #1b0e20;
  --ink-2: #251530;
  --crimson: #91213e;
  --crimson-bright: #b32d4c;
  --kenya-green: #046a38;
  --sand: #e4dccb;
  --paper: #f7f7f5;
  --white: #ffffff;

  /* Role aliases — LIGHT is the default; [data-theme="dark"] overrides below */
  --bg: var(--paper);
  --bg-2: #ffffff;
  --surface: rgba(43, 25, 51, 0.045);
  --surface-2: rgba(43, 25, 51, 0.08);
  --border: rgba(43, 25, 51, 0.12);
  --border-strong: rgba(43, 25, 51, 0.22);
  --text: var(--wordmark-dark);
  --text-muted: #6b5a78;
  --text-dim: #9a8aa6;
  --primary: var(--deep-purple);
  --primary-bright: #6a2d7d;
  --accent: var(--accent-purple);
  --danger: var(--crimson);

  /* Tag colors (theme-aware for contrast) */
  --tag-opinion: var(--crimson-bright);
  --tag-education: var(--kenya-green);
  --tag-news: var(--accent-purple);

  /* Solid cards / elevated surfaces */
  --card-solid: var(--white);
  --card-solid-text: var(--wordmark-dark);

  /* Themed chrome (nav, footer, ticker, etc.) */
  --topbar-bg: rgba(247, 247, 245, 0.85);
  --footer-bg: var(--white);
  --ticker-bg: var(--white);
  --scripture-color: var(--wordmark-dark);
  --grain-opacity: 0.05;
  --grain-blend: multiply;

  /* Hero / page-head backgrounds */
  --hero-bg: linear-gradient(180deg, var(--paper), #ece4f0);
  --hero-glow-1: rgba(110, 48, 141, 0.16);
  --hero-glow-2: rgba(145, 33, 62, 0.12);
  --pagehead-glow: rgba(110, 48, 141, 0.16);
  --pagehead-glow-crimson: rgba(145, 33, 62, 0.12);
  --photo-overlay: linear-gradient(180deg, rgba(247, 247, 245, 0.5), rgba(247, 247, 245, 0.9) 75%);
  --auth-glow: rgba(110, 48, 141, 0.14);
  --shop-head-bg: var(--sand);

  /* Typography */
  --font-display: "Baloo 2", "Poppins", system-ui, sans-serif;
  --font-statement: "Anton", "Bungee", system-ui, sans-serif;
  --font-script: "Permanent Marker", cursive;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;

  /* Scale: mobile -> desktop via clamp */
  --h1: clamp(2.5rem, 6vw + 1rem, 4.75rem);
  --h2: clamp(1.75rem, 3vw + 1rem, 3rem);
  --h3: clamp(1.25rem, 1.5vw + 1rem, 1.75rem);
  --body: clamp(1rem, 0.2vw + 0.95rem, 1.0625rem);
  --meta: 0.8125rem;
  --meta-lg: 0.875rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Motion — snappy, not smooth */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-punch: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 180ms;
  --dur-fast: 120ms;

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;
  --nav-h: 80px;
  --nav-h-mobile: 60px;

  color-scheme: light;
}

/* ===== DARK THEME (opt-in via [data-theme="dark"]) ===== */
[data-theme="dark"] {
  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f3eef5;
  --text-muted: #b9a9c4;
  --text-dim: #8a7a97;

  --tag-opinion: var(--crimson-bright);
  --tag-education: #4ec07f;
  --tag-news: #c79ee0;

  --card-solid: var(--ink-2);
  --card-solid-text: var(--text);

  --topbar-bg: rgba(27, 14, 32, 0.82);
  --footer-bg: var(--ink-2);
  --ticker-bg: var(--ink-2);
  --scripture-color: var(--white);
  --grain-opacity: 0.035;
  --grain-blend: overlay;

  --hero-bg: linear-gradient(180deg, var(--ink), var(--ink-2));
  --hero-glow-1: rgba(110, 48, 141, 0.35);
  --hero-glow-2: rgba(145, 33, 62, 0.25);
  --pagehead-glow: rgba(110, 48, 141, 0.35);
  --pagehead-glow-crimson: rgba(145, 33, 62, 0.3);
  --photo-overlay: linear-gradient(180deg, rgba(27, 14, 32, 0.6), rgba(27, 14, 32, 0.95) 75%);
  --auth-glow: rgba(110, 48, 141, 0.3);
  --shop-head-bg: var(--ink-2);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: clip;
}
body.theme-ready { transition: background-color 280ms var(--ease), color 280ms var(--ease); }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent-purple); outline-offset: 3px; border-radius: 2px; }

/* ---------- Grain & atmosphere ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: var(--grain-blend);
}

/* ---------- Scripture-as-texture layer ---------- */
.scripture-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.scripture-texture p {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.4;
  color: var(--scripture-color);
  opacity: 0.05;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transform: rotate(-2deg);
  user-select: none;
}
.scripture-texture p:nth-child(1) { top: 8%; left: -5%; }
.scripture-texture p:nth-child(2) { top: 38%; left: 10%; transform: rotate(1.5deg); }
.scripture-texture p:nth-child(3) { top: 65%; left: -8%; transform: rotate(-1deg); }
.scripture-texture p:nth-child(4) { top: 22%; right: -10%; transform: rotate(2deg); }
.scripture-texture p:nth-child(5) { top: 82%; right: -5%; transform: rotate(-1.5deg); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container.narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--space-8); }
.section-lg { padding-block: var(--space-9); }
@media (min-width: 768px) {
  .container { padding-inline: var(--space-6); }
  .section { padding-block: var(--space-9); }
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--h2);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-statement);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--crimson-bright);
  margin-bottom: var(--space-3);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 2px solid var(--accent-purple);
  padding-bottom: 2px;
  transition: transform var(--dur) var(--ease), color var(--dur);
}
.link-arrow:hover { transform: translateX(4px); color: var(--text); }
.link-arrow::after { content: "\2192"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Page head (shared across subpages) ---------- */
.page-head {
  padding-top: var(--space-7);
  padding-bottom: var(--space-5);
  position: relative;
  overflow: hidden;
  background: radial-gradient(700px 300px at 90% -20%, var(--pagehead-glow), transparent 60%);
}
.page-head h1 {
  font-family: var(--font-statement);
  font-weight: 400;
  font-size: var(--h1);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.page-head p {
  color: var(--text-muted);
  max-width: 50ch;
  margin-top: var(--space-4);
}
.page-head--crimson {
  background: radial-gradient(700px 300px at 90% -20%, var(--pagehead-glow-crimson), transparent 60%);
}
.page-head--hero {
  background:
    radial-gradient(900px 500px at 80% -10%, var(--hero-glow-1), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, var(--hero-glow-2), transparent 60%),
    var(--hero-bg);
}

/* ---------- Noscript fallback ---------- */
noscript .noscript-msg {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ---------- Role picker chips (shared — join + dashboard) ---------- */
.role-grid { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .role-grid { grid-template-columns: repeat(3, 1fr); } }
.role-pick { padding: 0.7rem 0.5rem; border: 1px solid var(--border-strong); border-radius: var(--r-md); text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); transition: all var(--dur); cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; font-family: var(--font-body); -webkit-user-select: none; user-select: none; }
.role-pick:hover { border-color: var(--accent-purple); color: var(--text); }
.role-pick.active { background: var(--deep-purple); border-color: var(--deep-purple); color: var(--white); }
.role-pick.primary { box-shadow: 0 0 0 2px var(--crimson-bright); }

/* ---------- Grille divider (signature element) ---------- */
.grille-divider {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding-block: var(--space-5);
  overflow: hidden;
}
.grille-divider span {
  display: block;
  width: 3px;
  height: 28px;
  background: linear-gradient(180deg, transparent, var(--accent-purple) 50%, transparent);
  border-radius: 2px;
  opacity: 0.6;
}
.grille-divider span:nth-child(5n) { background: linear-gradient(180deg, transparent, var(--crimson) 50%, transparent); height: 36px; }

/* ---------- Top bar (desktop nav) — bold, fixed, stunning ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--deep-purple);
  border-bottom: none;
  transition: height 360ms var(--ease), box-shadow 360ms var(--ease), background 360ms var(--ease);
  box-shadow: 0 4px 24px rgba(27, 14, 32, 0.35);
}
/* Offset body content for the fixed nav */
body { padding-top: var(--nav-h); }

/* Mobile nav — shorter, logo only (no wordmark), balanced actions */
@media (max-width: 899px) {
  .topbar { height: var(--nav-h-mobile); }
  body { padding-top: var(--nav-h-mobile); }
  .topbar .brand-mark { width: 38px; height: 38px; }
  .topbar .brand-text { display: none; }
  .topbar .brand { gap: 0; }
  .topbar .container { gap: var(--space-2); }
  .topbar .nav-actions { gap: var(--space-2); }
  .topbar .theme-toggle { width: 38px; height: 38px; }
  .topbar .theme-toggle svg { width: 16px; height: 16px; }
  .topbar .hamburger { width: 38px; height: 38px; }
  .topbar .hamburger span { width: 18px; }
  .mobile-menu { top: var(--nav-h-mobile); }
}

/* Bold animated equalizer bars — the signature music element, always on */
.topbar::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--crimson) 0%,
    var(--crimson-bright) 15%,
    var(--accent-purple) 35%,
    #a040c0 50%,
    var(--accent-purple) 65%,
    var(--crimson-bright) 85%,
    var(--crimson) 100%);
  background-size: 200% 100%;
  animation: nav-eq 4s linear infinite;
  box-shadow: 0 0 16px rgba(145, 33, 62, 0.6);
}
/* Static grille-line accent above the equalizer — 1px hairline */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

/* Override text colors — nav is always on deep purple, so use white */
.topbar .brand-text { color: #ffffff; }
.topbar .brand-text small { color: rgba(255, 255, 255, 0.6); }
.topbar .nav-links a { color: rgba(255, 255, 255, 0.65); }
.topbar .nav-links a:hover, .topbar .nav-links a.active { color: #ffffff; }
.topbar .nav-links a::after {
  background: linear-gradient(90deg, var(--crimson-bright), #c79ee0);
}
.topbar .nav-links a.active::after { background: var(--crimson-bright); }
.topbar .btn-ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); }
.topbar .btn-primary { background: var(--crimson); box-shadow: 0 4px 0 0 #6e1a2e; }
.topbar .btn-primary:hover { background: var(--crimson-bright); box-shadow: 0 6px 0 0 #6e1a2e; }
.topbar .theme-toggle { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); }
.topbar .theme-toggle:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.15); }

/* Nav buttons — fixed height, rounded rectangle (matching filter chips) */
.topbar .btn-sm {
  height: 46px;
  padding: 0 1.4rem;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: var(--r-md);
  box-sizing: border-box;
  transition: height 360ms var(--ease), padding 360ms var(--ease), font-size 360ms var(--ease);
}
.topbar .theme-toggle {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: width 360ms var(--ease), height 360ms var(--ease);
}
.topbar .theme-toggle svg { transition: width 360ms var(--ease), height 360ms var(--ease); }

/* --- Scrolled state — coordinated zoom-out (desktop >=900px) --- */
/* Every element scales by the same 0.8 ratio as the nav (80px → 64px) --- */
/* This creates a unified "zoom out" feel, not independent crushing --- */
@media (min-width: 900px) {
  .topbar.scrolled {
    height: 64px;
    background: var(--wordmark-dark);
    box-shadow:
      0 10px 40px rgba(27, 14, 32, 0.5),
      0 2px 12px rgba(82, 36, 98, 0.3);
  }
  .topbar.scrolled::before {
    height: 5px;
    animation: nav-eq 2.5s linear infinite;
    box-shadow: 0 0 20px rgba(145, 33, 62, 0.7), 0 0 40px rgba(110, 48, 141, 0.4);
    background: linear-gradient(90deg,
      var(--crimson) 0%,
      var(--crimson-bright) 10%,
      #c79ee0 25%,
      var(--accent-purple) 40%,
      #c79ee0 55%,
      var(--accent-purple) 70%,
      var(--crimson-bright) 85%,
      var(--crimson) 100%);
    background-size: 200% 100%;
  }
  /* Logo: 56px → 45px (0.8x) */
  .topbar.scrolled .brand-mark { width: 45px; height: 45px; }
  /* Brand text: 1.15rem → 0.92rem (0.8x) */
  .topbar.scrolled .brand-text { font-size: 0.92rem; }
  .topbar.scrolled .brand-text small { font-size: 0.51rem; margin-top: 3px; }
  /* Nav links: 0.95rem → 0.76rem (0.8x) */
  .topbar.scrolled .nav-links { gap: var(--space-4); }
  .topbar.scrolled .nav-links a { font-size: 0.76rem; }
  /* Buttons: 46px → 37px, font 0.88rem → 0.7rem (0.8x) */
  .topbar.scrolled .btn-sm { height: 37px; padding: 0 1.1rem; font-size: 0.7rem; }
  /* Toggle + overflow: 46px → 37px (0.8x) */
  .topbar.scrolled .theme-toggle { width: 37px; height: 37px; }
  .topbar.scrolled .theme-toggle svg { width: 15px; height: 15px; }
}
@keyframes nav-eq {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.brand { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.brand-mark { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r-sm); object-fit: cover; transition: width 360ms var(--ease), height 360ms var(--ease); }
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: font-size 360ms var(--ease);
}
.brand-text small {
  display: block;
  font-family: var(--font-statement);
  font-weight: 400;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 4px;
  transition: font-size 360ms var(--ease), margin-top 360ms var(--ease);
}
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-5);
  transition: gap 320ms var(--ease);
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--dur), font-size 360ms var(--ease);
  position: relative;
  padding-block: 6px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
/* Underline accent — sits at the bottom edge of the nav, adapts to scrolled height */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--accent-purple));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active::after { transform: scaleX(1); background: var(--crimson); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
}

/* ---------- Hamburger menu (mobile only, <900px) ---------- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: background var(--dur);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 280ms var(--ease), opacity 200ms var(--ease);
}
.hamburger:hover { background: rgba(255, 255, 255, 0.15); }
/* Animate to X when active */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) {
  .hamburger { display: none; }
}

/* Mobile slide-down menu panel */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 999;
  background: var(--deep-purple);
  border-bottom: 3px solid var(--crimson);
  padding: var(--space-5) var(--space-6) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 360ms var(--ease), opacity 280ms var(--ease);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color var(--dur), padding-left var(--dur);
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.active { color: #ffffff; padding-left: var(--space-3); }
.mobile-menu a.btn {
  color: #ffffff;
  border-bottom: none;
  margin-top: var(--space-3);
  font-size: 1rem;
}
@media (min-width: 900px) {
  .mobile-menu { display: none; }
}
/* Prevent body scroll when menu is open */
body.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  transition: transform var(--dur) var(--ease-punch), background var(--dur), box-shadow var(--dur);
  min-height: 44px;
  white-space: nowrap;
}
.btn:active { transform: scale(0.95); }
.btn-primary {
  background: var(--deep-purple);
  color: var(--white);
  box-shadow: 0 6px 0 0 var(--wordmark-dark);
}
.btn-primary:hover { background: var(--primary-bright); box-shadow: 0 8px 0 0 var(--wordmark-dark); transform: translateY(-2px); }
.btn-primary:active { box-shadow: 0 2px 0 0 var(--wordmark-dark); transform: translateY(2px) scale(0.97); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent-purple); }
.btn-crimson {
  background: var(--crimson);
  color: var(--white);
}
.btn-crimson:hover { background: var(--crimson-bright); }
.btn-whatsapp {
  background: #25d366;
  color: #053b1a;
  font-weight: 800;
}
.btn-whatsapp:hover { background: #2beb74; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.82rem; min-height: 38px; transition: padding 320ms var(--ease), font-size 320ms var(--ease); }
.btn-block { width: 100%; }

/* ---------- Tags / chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 1.05rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
  min-height: 44px;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
  background: var(--deep-purple);
  border-color: var(--deep-purple);
  color: var(--white);
}
.chip-row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chip-row::-webkit-scrollbar { display: none; }

/* ---------- Verified shield badge (signature) ---------- */
.shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  background: linear-gradient(135deg, var(--crimson), #6e1a2e);
  border-radius: 6px 6px 6px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(145, 33, 62, 0.4);
}
.shield-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.shield-badge.og { background: linear-gradient(135deg, var(--kenya-green), #023d20); }
.shield-badge.headliner { background: linear-gradient(135deg, var(--accent-purple), var(--deep-purple)); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur), background var(--dur);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }

/* Artist card — grille hover effect */
.artist-card { position: relative; cursor: pointer; }
.artist-card .photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink-2), var(--wordmark-dark));
}
.artist-card .photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
  transition: transform 260ms var(--ease), filter 260ms;
}
.artist-card:hover .photo img { transform: scale(1.05); filter: saturate(1.1) contrast(1.1); }
.artist-card .photo .badge-wrap {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: flex; gap: 6px;
}
.artist-card .role-tag {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(27, 14, 32, 0.75);
  color: var(--white);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Grille bars hover treatment — bars "part" slightly */
.artist-card .grille-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.artist-card:hover .grille-overlay { opacity: 1; }
.artist-card .grille-overlay span {
  width: 4px;
  align-self: center;
  height: 60%;
  background: linear-gradient(180deg, transparent, var(--white) 50%, transparent);
  border-radius: 2px;
  transform: translateY(0);
  transition: transform var(--dur) var(--ease);
}
.artist-card:hover .grille-overlay span:nth-child(odd) { transform: translateY(-8px); }
.artist-card:hover .grille-overlay span:nth-child(even) { transform: translateY(8px); }
.artist-card .info { padding: var(--space-4); color: var(--text); }
.artist-card .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--text);
}
.artist-card .region {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); } }
.grid-3 {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Ticker / marquee ---------- */
.ticker {
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--ticker-bg);
  padding-block: var(--space-3);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex;
  gap: var(--space-6);
  flex-shrink: 0;
  animation: ticker-scroll 38s linear infinite;
  padding-right: var(--space-6);
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}
.ticker-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--crimson); flex-shrink: 0; }
.ticker-item .num { font-family: var(--font-statement); color: var(--crimson-bright); font-size: 0.78rem; }
.ticker-item b { color: var(--text); font-weight: 700; }
@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}

/* ---------- Forms ---------- */
.field { margin-bottom: var(--space-4); }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}
.input, .textarea, .select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--dur), background var(--dur);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: var(--surface-2);
}
.input::placeholder { color: var(--text-dim); }
.textarea { min-height: 120px; resize: vertical; }

/* ========================================================================
   DASHBOARD — Section-based member dashboard
   Mobile-first: base = mobile, min-width queries scale up
   ======================================================================== */

/* --- Shell: sidebar + main grid --- */
.dash-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--nav-h-mobile));
}
@media (min-width: 900px) {
  .dash-shell {
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - var(--nav-h));
  }
}
@media (min-width: 1440px) {
  .dash-shell { grid-template-columns: 280px 1fr; }
}

/* --- Sidebar (desktop only) --- */
.dash-side {
  display: none;
}
@media (min-width: 900px) {
  .dash-side {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    padding: var(--space-5) 0;
    border-right: 1px solid var(--border);
    background: var(--bg);
    z-index: 10;
  }
  .topbar.scrolled ~ .dash-shell .dash-side,
  .topbar.scrolled ~ main .dash-shell .dash-side {
    top: 64px;
    height: calc(100vh - 64px);
  }
}

.side-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.side-nav__group {
  padding: var(--space-2) 0;
}
.side-nav__label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: var(--space-3) var(--space-5) var(--space-2);
}
.side-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
  text-decoration: none;
}
.side-nav__item:hover {
  background: var(--surface);
  color: var(--text);
}
.side-nav__item.active {
  border-left-color: var(--accent-purple);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}
.side-nav__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}
.side-nav__item.active svg { opacity: 1; }
.side-nav__divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-3) var(--space-5);
}
.side-nav__footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
}
.side-nav__footer a {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color var(--dur);
}
.side-nav__footer a:hover { color: var(--accent-purple); }

/* Destructive nav item (sign out) */
.side-nav__item--danger { color: var(--crimson-bright); }
.side-nav__item--danger:hover { background: rgba(145, 33, 62, 0.06); color: var(--crimson-bright); }

/* --- Mobile tab bar (< 900px only) --- */
.dash-tabs {
  position: sticky;
  top: var(--nav-h-mobile);
  z-index: 50;
  display: flex;
  align-items: stretch;
  background: var(--card-solid);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  height: 48px;
}
.dash-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .dash-tabs { display: none; }
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--space-4);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur);
  scroll-snap-align: center;
  flex-shrink: 0;
  min-width: 0;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-body);
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent-purple);
}
.tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- Main content area --- */
.dash-main {
  padding: var(--space-5);
  padding-bottom: var(--space-8);
  max-width: 100%;
  overflow-x: hidden;
  background: radial-gradient(700px 400px at 80% 10%, var(--auth-glow), transparent 60%);
}
@media (min-width: 900px) {
  .dash-main {
    padding: var(--space-6);
    padding-bottom: var(--space-9);
  }
}
.dash-main-inner {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

/* --- Sections (toggled via JS) --- */
.dash-section { animation: dash-fade-in 200ms var(--ease); }
@keyframes dash-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .dash-section { animation: none; }
}

/* --- Status banner --- */
.dash-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--r-lg);
  border-left: 0;
  margin-bottom: var(--space-6);
  background: rgba(82, 36, 98, 0.06);
  flex-wrap: wrap;
}
.dash-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--accent-purple);
  border-radius: 0 2px 2px 0;
}
.dash-banner__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.dash-banner__body { flex: 1; min-width: 200px; }
.dash-banner__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: var(--space-1);
}
.dash-banner__text {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dash-banner__action {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-purple);
  white-space: nowrap;
  align-self: center;
  transition: color var(--dur);
}
.dash-banner__action:hover { color: var(--deep-purple); }

/* Banner variants */
.dash-banner--verified {
  background: rgba(4, 106, 56, 0.08);
}
.dash-banner--verified::before { background: var(--kenya-green); }
.dash-banner--verified .dash-banner__title { color: var(--kenya-green); }
.dash-banner--verified .dash-banner__action { color: var(--kenya-green); }
.dash-banner--verified .dash-banner__icon { color: var(--kenya-green); }

.dash-banner--pending {
  background: rgba(255, 193, 7, 0.08);
}
.dash-banner--pending::before { background: #c7940a; }
.dash-banner--pending .dash-banner__title { color: #c7940a; }
.dash-banner--pending .dash-banner__action { color: #c7940a; }
.dash-banner--pending .dash-banner__icon { color: #c7940a; }

/* --- Dashboard cards --- */
.dash-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-5);
}
@media (min-width: 600px) {
  .dash-card { padding: var(--space-6); }
}
.dash-card + .dash-card { margin-top: var(--space-5); }

.dash-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.dash-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}
.dash-card__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Card — elevated variant (hero / overview) */
.card-elevated {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
@media (min-width: 600px) {
  .card-elevated { padding: var(--space-6); }
}

/* --- Hero card (Overview section) --- */
.dash-hero {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  flex-direction: column;
  text-align: center;
}
@media (min-width: 600px) {
  .dash-hero {
    flex-direction: row;
    text-align: left;
  }
}
.dash-hero__avatar {
  width: 80px;
  height: 100px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink-2), var(--wordmark-dark));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 600px) {
  .dash-hero__avatar { width: 96px; height: 120px; }
}
.dash-hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dash-hero__avatar-placeholder {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.4);
}
.dash-hero__info { flex: 1; min-width: 0; }
.dash-hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  margin-bottom: var(--space-2);
}
.dash-hero__roles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-3);
}
@media (min-width: 600px) {
  .dash-hero__roles { justify-content: flex-start; }
}
.dash-hero__role-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.dash-hero__role-chip--primary {
  border-color: var(--crimson-bright);
  color: var(--crimson-bright);
}

/* --- Next steps checklist (Overview) --- */
.next-steps { margin-top: var(--space-5); }
.next-steps__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: var(--space-4);
}
.next-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.next-step:last-child { border-bottom: none; }
.next-step__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur), border-color var(--dur);
}
.next-step--done .next-step__check {
  background: var(--kenya-green);
  border-color: var(--kenya-green);
  color: var(--white);
}
.next-step__text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.next-step--done .next-step__text {
  text-decoration: line-through;
  color: var(--text-dim);
}
.next-step__action {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-purple);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  transition: color var(--dur);
}
.next-step__action:hover { color: var(--deep-purple); }

/* --- Mini stats row (Overview) --- */
.stats-row {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
  margin-top: var(--space-5);
}
.stats-row::-webkit-scrollbar { display: none; }
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  min-width: 100px;
  flex-shrink: 0;
}
.stat-chip__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}
.stat-chip__label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* --- Status badge (inline pill) --- */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-badge.pending {
  background: rgba(255, 193, 7, 0.2);
  color: #c7940a;
  border: 1px solid rgba(255, 193, 7, 0.4);
}
.status-badge.approved {
  background: rgba(4, 106, 56, 0.2);
  color: var(--kenya-green);
  border: 1px solid rgba(4, 106, 56, 0.4);
}

/* --- Field helpers --- */
.field-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-5) 0;
}
.field-row-2col {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .field-row-2col { grid-template-columns: 1fr 1fr; }
}
.field--error .input,
.field--error .textarea {
  border-color: var(--crimson-bright);
}
.field__helper {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: var(--space-1);
}
.field__helper--error {
  color: var(--crimson-bright);
}
.char-counter {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: var(--space-1);
}

/* --- Media upload zone --- */
.media-upload {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.media-upload__preview {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 2px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--dur);
}
.media-upload__preview--cover {
  width: 160px;
  height: 70px;
}
.media-upload__preview--photo {
  width: 60px;
  height: 76px;
}
.media-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-upload__placeholder {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.media-upload__input {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Links grid (Presence section) --- */
.links-grid {
  display: grid;
  gap: var(--space-3);
}
.link-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
/* Stack label above input on very narrow screens */
@media (max-width: 374px) {
  .link-row {
    flex-direction: column;
    align-items: stretch;
  }
}
.link-row .platform-label {
  min-width: 110px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
}
.link-row .platform-label .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}
.link-row .platform-label .dot.filled {
  background: var(--accent-purple);
}
.link-row input { flex: 1; min-width: 0; }

/* --- Gallery (creative layouts) --- */
/* Mobile-first: single column */
.gallery-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
.gallery-grid .gal-item {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
}
.gallery-grid .gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Creative layouts at >= 600px */
@media (min-width: 600px) {
  .gallery-grid.gal-2 { grid-template-columns: 1fr 1fr; }
  .gallery-grid.gal-2 .gal-item { aspect-ratio: 4/3; }

  .gallery-grid.gal-3 { grid-template-columns: 1.2fr 0.8fr; grid-template-rows: 1fr 1fr; }
  .gallery-grid.gal-3 .gal-item:first-child { grid-row: 1/3; aspect-ratio: auto; }
  .gallery-grid.gal-3 .gal-item:nth-child(2),
  .gallery-grid.gal-3 .gal-item:nth-child(3) { aspect-ratio: 4/3; }

  .gallery-grid.gal-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .gallery-grid.gal-4 .gal-item { aspect-ratio: 4/3; }

  .gallery-grid.gal-5 { grid-template-columns: 1fr 1fr; grid-template-rows: 1.2fr 0.8fr 0.8fr; }
  .gallery-grid.gal-5 .gal-item:first-child { grid-column: 1/3; aspect-ratio: 16/7; }
  .gallery-grid.gal-5 .gal-item:nth-child(n+2) { aspect-ratio: 4/3; }
}

.gal-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  opacity: 0;
  transition: opacity var(--dur);
}
.gal-item:hover .gal-del { opacity: 1; }
/* Always visible on touch devices */
@media (hover: none) { .gal-del { opacity: 1; } }

.gal-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 0.72rem;
}

.gallery-upload {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

/* --- Content sub-tabs (within Content section) --- */
.content-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.content-tab {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-body);
}
.content-tab:hover { color: var(--text); }
.content-tab.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent-purple);
}

/* --- Release card --- */
.release-card {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur);
}
.release-card:hover { border-color: var(--border-strong); }
.release-card__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.release-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.release-card__info { flex: 1; min-width: 0; }
.release-card__title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.release-card__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.release-card__actions {
  display: flex;
  gap: var(--space-2);
}

/* --- Event card --- */
.event-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur);
}
.event-card:hover { border-color: var(--border-strong); }
.event-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  background: rgba(82, 36, 98, 0.06);
  border-radius: var(--r-sm);
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
}
.event-card__day {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent-purple);
}
.event-card__month {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.event-card__info { flex: 1; min-width: 0; }
.event-card__title {
  font-weight: 700;
  font-size: 0.9rem;
}
.event-card__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.event-card__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* --- Empty states --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-7) var(--space-5);
}
.empty-state__icon {
  width: 48px;
  height: 48px;
  color: var(--text-dim);
  margin-bottom: var(--space-4);
  opacity: 0.5;
}
.empty-state__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}
.empty-state__body {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 32ch;
  margin-bottom: var(--space-5);
}

/* --- Toast notifications --- */
.toast-container {
  position: fixed;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  /* Mobile: bottom center */
  bottom: var(--space-5);
  left: var(--space-5);
  right: var(--space-5);
}
@media (min-width: 900px) {
  .toast-container {
    top: calc(var(--nav-h) + var(--space-4));
    right: var(--space-5);
    bottom: auto;
    left: auto;
    width: 360px;
  }
}
.toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toast-in 200ms var(--ease) forwards;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.toast--success {
  background: var(--kenya-green);
  color: var(--white);
}
.toast--error {
  background: var(--crimson-bright);
  color: var(--white);
}
.toast--exit {
  animation: toast-out 200ms var(--ease) forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}
@media (min-width: 900px) {
  @keyframes toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
  }
}

/* --- Sticky save bar (mobile) --- */
.save-bar {
  position: sticky;
  bottom: 0;
  background: var(--card-solid);
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-5);
  z-index: 10;
  margin-top: var(--space-5);
}
@media (min-width: 900px) {
  .save-bar {
    position: static;
    border: none;
    padding: 0;
    background: none;
    margin-top: var(--space-4);
  }
}

/* --- Account section (mobile accordion) --- */
.dash-account-mobile {
  margin-top: var(--space-6);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
}
.dash-account-mobile summary {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  color: var(--text);
}
.dash-account-mobile summary::-webkit-details-marker { display: none; }
.dash-account-mobile summary::after {
  content: "▸";
  transition: transform var(--dur);
}
.dash-account-mobile[open] summary::after {
  transform: rotate(90deg);
}
.dash-account-mobile .account-content {
  padding: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
@media (min-width: 900px) {
  .dash-account-mobile { display: none; }
}

/* Card rail (compact sidebar card) */
.card-rail {
  padding: var(--space-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

/* Newsletter compact form */
.nl-compact {
  display: flex;
  gap: var(--space-2);
}
.nl-compact .input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
}

/* --- Dashboard loading / logged-out states --- */
.dash-loading, .dash-logged-out {
  text-align: center;
  padding: var(--space-9);
}

/* --- Save indicator --- */
.save-indicator {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.save-indicator--saving { color: var(--accent-purple); }
.save-indicator--saved { color: var(--kenya-green); }

/* --- Confirm dialog (bottom sheet on mobile, centered on desktop) --- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: dash-fade-in 150ms var(--ease);
}
@media (min-width: 900px) {
  .confirm-overlay { align-items: center; }
}
.confirm-dialog {
  background: var(--card-solid);
  padding: var(--space-6);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: confirm-slide-up 200ms var(--ease);
}
@media (min-width: 900px) {
  .confirm-dialog {
    border-radius: var(--r-lg);
    animation: dash-fade-in 150ms var(--ease);
  }
}
@keyframes confirm-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.confirm-dialog__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: var(--space-3);
}
.confirm-dialog__body {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.confirm-dialog__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* --- Semantic Utilities & Forms --- */
.card-rail--partner {
  border-color: rgba(4,106,56,0.2);
  background: rgba(4,106,56,0.05);
}
.card-rail--partner .card-rail__title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--kenya-green);
  margin-bottom: 6px;
}
.card-rail--partner .card-rail__desc {
  margin-bottom: 12px;
  font-size: 0.75rem;
}
.btn-partner {
  background: var(--kenya-green);
  box-shadow: none;
  border: none;
}
.side-nav__summary {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2) 0;
}
.nl-form {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: var(--space-2);
}
.side-nav__item--btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
}
.content-form-wrapper {
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.w-100 { width: 100%; }
.text-xs { font-size: 0.75rem; }

/* --- Section header (used within each section) --- */
.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.dash-section-header__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
}

/* --- Dashboard utility classes (replace inline styles) --- */

/* H1 in logged-out / hero state */
.dash-hero-h1 {
  font-family: var(--font-statement);
  font-size: 2rem;
  text-transform: uppercase;
  margin-top: var(--space-3);
}

/* Muted icon (for placeholder avatars etc.) */
.icon-muted { opacity: 0.4; }

/* Done-state check in next-step list */
.next-step__check--done {
  background: var(--kenya-green);
  border-color: var(--kenya-green);
  color: var(--white);
}

/* Chip grid layout (for role selector) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Compact input (smaller padding, smaller font) */
.input--compact {
  flex: 1;
  min-width: 140px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}

/* List grid for card lists (releases, events) */
.list-grid {
  display: grid;
  gap: var(--space-3);
}

/* Crimson-outline button variant */
.btn--crimson-outline {
  color: var(--crimson-bright);
  border-color: var(--crimson-bright);
}
.btn--crimson-outline:hover {
  background: var(--crimson-bright);
  color: var(--white);
  border-color: var(--crimson-bright);
}

/* Filled crimson solid button variant (for destructive confirms) */
.btn--crimson-solid {
  background: var(--crimson-bright);
  border-color: var(--crimson-bright);
  color: var(--white);
}
.btn--crimson-solid:hover {
  background: var(--crimson);
  border-color: var(--crimson);
}

/* Button rendered as a text link (used inside banner action when JS-injected) */
.btn-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

/* Compact empty state (inside cards, less padding) */
.empty-state--compact {
  padding: var(--space-4);
}

/* Icon-only delete button (×) used in release/event cards */
.btn-icon-delete {
  color: var(--crimson-bright);
  padding: 0.4rem 0.6rem;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 1;
}
.btn-icon-delete:hover {
  color: var(--white);
  background: var(--crimson-bright);
}

/* ---------- Footer ---------- */
.footer {
  border-top: none;
  padding-block: var(--space-7) var(--space-6);
  margin-top: var(--space-8);
  position: relative;
  background: var(--ink);
  color: #f3eef5;
  /* Always-dark bookend — tokens scoped so every page gets the venue treatment */
  --text: #f3eef5;
  --text-muted: #b9a9c4;
  --text-dim: #8a7a97;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --bg-2: var(--ink-2);
}
.footer::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg,
    var(--crimson) 0%, var(--crimson-bright) 15%, var(--accent-purple) 35%,
    #a040c0 50%, var(--accent-purple) 65%, var(--crimson-bright) 85%, var(--crimson) 100%);
  background-size: 200% 100%;
  animation: nav-eq 4s linear infinite;
}
.footer .container {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer .container { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.footer-brand .brand-text { font-size: 1.2rem; margin-bottom: var(--space-2); }
.footer p { color: var(--text-muted); font-size: 0.88rem; }
.footer h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  color: var(--text);
}
.footer ul li { margin-bottom: var(--space-2); }
.footer ul a { color: var(--text-muted); font-size: 0.88rem; transition: color var(--dur); }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  margin-top: var(--space-6);
  background: var(--deep-purple);
  color: rgba(255, 255, 255, 0.85);
  padding-block: var(--space-5);
}
.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: 0.78rem;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.section--flush { padding-top: 0; }
.section--tight { padding-top: var(--space-5); }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--h2);
  line-height: 1.05;
}
.grid-full { grid-column: 1 / -1; padding: var(--space-7); }
.msg-error { color: var(--crimson-bright); }
.msg-success { color: var(--kenya-green); }
.msg-link { color: var(--accent-purple); font-weight: 700; }
.text-sm { font-size: var(--meta); }
.text-xs { font-size: var(--meta-lg); }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.hide-mobile { display: none !important; }
@media (min-width: 900px) { .hide-mobile { display: inline-flex !important; } .hide-desktop { display: none !important; } }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: color var(--dur), border-color var(--dur), background var(--dur), transform var(--dur) var(--ease-punch), width 320ms var(--ease), height 320ms var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg { width: 18px; height: 18px; transition: width 320ms var(--ease), height 320ms var(--ease); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Selection ---------- */
::selection { background: var(--accent-purple); color: var(--white); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- CLS resistance — reserve space for dynamic content ---------- */
#artists-grid, #product-grid, #post-grid, #upcoming-events, #past-events,
#nominees-grid, #past-winners-container, #featured-post-container,
#featured-artists-carousel {
  min-height: 300px;
  contain: layout style;
}

/* Content-visibility: skip rendering far-offscreen grid children */
.grid > *, .product-grid > *, .post-grid > *, .carousel > *,
.nominee-grid > *, .past-grid > * {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

/* ---------- Page transitions ---------- */
@view-transition { navigation: auto; }

/* ---------- Staggered reveal (cascade delay per card) ---------- */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 60ms; }
.reveal:nth-child(3) { transition-delay: 120ms; }
.reveal:nth-child(4) { transition-delay: 180ms; }
.reveal:nth-child(5) { transition-delay: 240ms; }
.reveal:nth-child(6) { transition-delay: 300ms; }
.reveal:nth-child(7) { transition-delay: 360ms; }
.reveal:nth-child(8) { transition-delay: 420ms; }
.reveal:nth-child(9) { transition-delay: 480ms; }
.reveal:nth-child(10) { transition-delay: 540ms; }
.reveal:nth-child(11) { transition-delay: 600ms; }
.reveal:nth-child(12) { transition-delay: 660ms; }

/* Skip-to-content */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--deep-purple);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-pill);
  font-weight: 700;
  z-index: 10000;
  transition: top 200ms;
}
.skip-link:focus { top: var(--space-3); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track { animation: none; }
}
