/* ==========================================================================
   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; }
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;
}

/* ---------- 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, perfectly centered text */
.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;
  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; }

/* Tabbar removed — mobile nav is exclusively hamburger menu.
   Theme toggle + hamburger are the only visible topbar elements on mobile. */

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-7) var(--space-6);
  margin-top: var(--space-8);
  background: var(--footer-bg);
}
.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; }
}
