/*
 * ============================================================
 *  The Clever Impersonators — Global Stylesheet
 *  Design System v1.0
 * ============================================================
 */

/* ===== DESIGN TOKENS ===== */
:root {
    /* Color Palette — Dark-first */
    --color-bg-dark:        #0a0a0a;
    --color-bg-surface:     #111111;
    --color-bg-card:        #1a1a1a;
    --color-text-primary:   #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-text-muted:     #606060;
    --color-accent-teal:    #2ea8c7;
    --color-accent-purple:  #7b3fa0;
    --color-accent-red:     #b84a4a;
    --color-accent-green:   #6fa832;
    --color-accent-white: var(--color-accent-white-mask);
    --color-accent-white-mask: #d0d0d0;
    --color-border:         #2a2a2a;
    --color-overlay:        rgba(0,0,0,0.7);

    /* Section Backgrounds (Revision 4 v4 — visual rhythm) */
    --color-bg-hero:        #0a0a0f;
    --color-bg-team:        #0f1117;
    --color-bg-community:   #13111a;

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body:    'Inter', sans-serif;

    /* Type Scale */
    --text-xs:  0.75rem;
    --text-sm:  0.875rem;
    --text-base: 1rem;
    --text-lg:  1.125rem;
    --text-xl:  1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Spacing (8px base) */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-7:  28px;
    --space-8:  32px;
    --space-9:  36px;
    --space-10: 40px;
    --space-11: 44px;
    --space-12: 48px;
    --space-13: 52px;
    --space-14: 56px;
    --space-15: 60px;
    --space-16: 64px;
    --space-17: 68px;
    --space-18: 72px;
    --space-19: 76px;
    --space-20: 80px;

    /* Border Radius */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* Glow Effects */
    --glow-teal:   0 0 20px rgba(46, 168, 199, 0.4);
    --glow-purple: 0 0 20px rgba(123, 63, 160, 0.4);
    --glow-red:    0 0 20px rgba(184, 74, 74, 0.4);
    --glow-green:  0 0 20px rgba(111, 168, 50, 0.4);

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 30px rgba(0,0,0,0.5);
    --shadow-xl:  0 16px 50px rgba(0,0,0,0.6);

    /* Transitions */
    --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 500ms;

    /* Layout */
    --header-height: 84px;
    --container-max: 1200px;
}


/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: rgba(46, 168, 199, 0.3);
    color: var(--color-text-primary);
}

/* Focus states */
:focus-visible {
    outline: 2px solid var(--color-accent-teal);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Links */
a {
    color: var(--color-accent-teal);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
    color: #4dc4e0;
}


/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--color-text-primary);
}
h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl);  }
h6 { font-size: var(--text-lg);  }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}
p:last-child {
    margin-bottom: 0;
}

.text-accent  { color: var(--color-accent-teal); }
.text-muted   { color: var(--color-text-muted); }
.text-center  { text-align: center; }


/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
}

.section--surface {
    background-color: var(--color-bg-surface);
}

.section--dark {
    background-color: var(--color-bg-dark);
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section__title {
    margin-bottom: 0;
    position: relative;
    display: inline-block;
}

/* Global Section Divider — 400px purple-to-teal gradient, reusable everywhere */
.section-divider {
    display: block;
    width: min(400px, 90vw);
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-purple), var(--color-accent-teal));
    border-radius: 2px;
    margin: var(--space-4) auto 0;
    border: none;
}

/* Title underline should match the title width */
.section-title-lockup{
  display: inline-block;          /* shrink-wrap to content width */
}

.section-title-lockup .section-divider{
  width: 100% !important;         /* match the lockup width */
  max-width: none !important;     /* defeat global max-width rules */
}

/* ===== SECTION TITLE UNDERLINE (match exact title text width) ===== */
.section-title-stack {
  display: inline-flex;       /* shrink-wrap to contents */
  flex-direction: column;
  align-items: center;        /* keep underline centered under text */
}

/* This is the key: make the title itself shrink to text width */
.section-title-stack .section__title {
  display: inline-block;      /* do NOT span full row */
  width: auto;                /* explicit: width = text */
}

/* Underline becomes exactly as wide as the title element */
.section-divider--title {
  width: 100%;
  max-width: none;
  margin: var(--space-4) 0 0;
}

/* Optional: if you want slightly thicker underline on big titles */
@media (min-width: 768px) {
  .section-divider--title { height: 3px; }
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 640px;
    margin: var(--space-4) auto 0;
}

/* ===== HOMEPAGE: Glow Section Divider (nav-color variants) ===== */
.home-glow-divider {
  position: relative;
  height: 2px;
  width: min(1200px, 92vw);   /* keeps it clean on wide screens */
  margin: 0 auto;            /* centered */
  border: 0;
  z-index: 2;
}

.home-glow-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, transparent 0%, var(--divider-color) 50%, transparent 100%);
  box-shadow:
    0 -15px 30px var(--divider-glow-strong),
    0 -30px 60px var(--divider-glow-soft),
    0  15px 30px var(--divider-glow-strong),
    0  30px 60px var(--divider-glow-soft);
}

/* Color variants (match nav order) */
.home-glow-divider--teal {
  --divider-color: var(--color-accent-teal);
  --divider-glow-strong: rgba(46,168,199,0.30);
  --divider-glow-soft:   rgba(46,168,199,0.15);
}

.home-glow-divider--purple {
  --divider-color: var(--color-accent-purple);
  --divider-glow-strong: rgba(123,63,160,0.30);
  --divider-glow-soft:   rgba(123,63,160,0.15);
}

.home-glow-divider--red {
  --divider-color: var(--color-accent-red);
  --divider-glow-strong: rgba(184,74,74,0.30);
  --divider-glow-soft:   rgba(184,74,74,0.15);
}

.home-glow-divider--green {
  --divider-color: var(--color-accent-green);
  --divider-glow-strong: rgba(111,168,50,0.30);
  --divider-glow-soft:   rgba(111,168,50,0.15);
}

/* Optional: reduce intensity on small screens */
@media (max-width: 480px) {
  .home-glow-divider::before {
    box-shadow:
      0 -10px 20px var(--divider-glow-strong),
      0 -20px 40px var(--divider-glow-soft),
      0  10px 20px var(--divider-glow-strong),
      0  20px 40px var(--divider-glow-soft);
  }
}

/* ===== HEADER / NAVIGATION ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition:
        background-color var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out);
    border-bottom: 1px solid transparent;
}

/* Transparent header over hero */
body[data-hero="true"] .site-header {
    background-color: transparent;
}
body[data-hero="false"] .site-header,
.site-header.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom-color: var(--color-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    z-index: 10;
}
.logo-img {
    height: 52px;
    width: auto;
    transition: opacity var(--duration-base) var(--ease-out);
    object-fit: contain;
}
.logo-light {
    display: none;
}

/* Desktop Nav */
.nav-desktop {
    display: flex;
    align-items: center;
}
.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-1);
}
.nav-list a {
    display: block;
    padding: var(--space-2) var(--space-5);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
    position: relative;
}
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent-teal);
    transition: width var(--duration-base) var(--ease-out), left var(--duration-base) var(--ease-out), background var(--duration-base);
    border-radius: var(--radius-full);
}
.nav-list a:hover::after,
.nav-list a.active::after {
    width: 60%;
    left: 20%;
}

/* Nav color cycling — teal, purple, red, green, teal (Revision 3) */
.nav-list li:nth-child(1) a:hover,
.nav-list li:nth-child(1) a.active { color: var(--color-accent-teal); }
.nav-list li:nth-child(1) a:hover::after,
.nav-list li:nth-child(1) a.active::after { background: var(--color-accent-teal); }

.nav-list li:nth-child(2) a:hover,
.nav-list li:nth-child(2) a.active { color: var(--color-accent-purple); }
.nav-list li:nth-child(2) a:hover::after,
.nav-list li:nth-child(2) a.active::after { background: var(--color-accent-purple); }

.nav-list li:nth-child(3) a:hover,
.nav-list li:nth-child(3) a.active { color: var(--color-accent-red); }
.nav-list li:nth-child(3) a:hover::after,
.nav-list li:nth-child(3) a.active::after { background: var(--color-accent-red); }

.nav-list li:nth-child(4) a:hover,
.nav-list li:nth-child(4) a.active { color: var(--color-accent-green); }
.nav-list li:nth-child(4) a:hover::after,
.nav-list li:nth-child(4) a.active::after { background: var(--color-accent-green); }

.nav-list li:nth-child(5) a:hover,
.nav-list li:nth-child(5) a.active { color: var(--color-accent-teal); }
.nav-list li:nth-child(5) a:hover::after,
.nav-list li:nth-child(5) a.active::after { background: var(--color-accent-teal); }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
}
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    border-radius: var(--radius-full);
    transition:
        transform var(--duration-base) var(--ease-out),
        opacity var(--duration-fast) var(--ease-out);
}

/* Hamburger → X animation */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.nav-mobile {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-10) var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
        opacity var(--duration-base) var(--ease-out),
        visibility var(--duration-base) var(--ease-out),
        transform var(--duration-base) var(--ease-out);
    overflow-y: auto;
}

/* ===== Mobile Nav Hardening Patch ===== */

.nav-mobile[hidden] {
    display: none !important;
}

.nav-mobile {
    z-index: 999;
    width: 100%;
    max-width: 100%;
    pointer-events: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.nav-mobile.open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-logo,
.mobile-menu-toggle {
    position: relative;
    z-index: 1001;
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
    width: 100%;
}

.mobile-nav-list li {
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-list a {
    display: block;
    padding: var(--space-5) var(--space-4);
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    transition: color var(--duration-fast) var(--ease-out);
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    color: var(--color-accent-teal);
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary,
.btn-youtube,
.btn-tiktok,
.btn-instagram,
.btn-spotify,
.btn-applepodcasts,
.btn-patreon,
.btn-discord,
.btn-moxfield,
.btn-topdeck,
.btn-convoke,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        background-color var(--duration-base) var(--ease-out),
        color var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1.5;
}

.btn-primary {
    background-color: transparent;
    color: var(--color-accent-teal);
    border: 2px solid var(--color-accent-teal);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-accent-teal);
    color: var(--color-bg-dark);
    box-shadow: 0 0 20px rgba(46,168,199,0.5), 0 0 40px rgba(46,168,199,0.25);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent-purple);
    border: 2px solid var(--color-accent-purple);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-accent-purple);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(123,63,160,0.4), 0 0 40px rgba(123,63,160,0.25);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* YouTube button — brand red */
.btn-youtube {
    background-color: transparent;
    color: #FF0000;
    border: 2px solid #FF0000;
    transition: all 0.3s ease;
}

.btn-youtube:hover {
    background-color: #FF0000;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255,0,0,0.4), 0 0 40px rgba(255,0,0,0.25);
    transform: translateY(-2px);
}

.btn-youtube:active {
    transform: translateY(0);
}

/* TikTok button */
.btn-tiktok {
    background-color: transparent;
    color: #25F4EE;
    border: 2px solid #25F4EE;
    transition: all 0.3s ease;
}
.btn-tiktok:hover {
    background-color: #25F4EE;
    color: #000000;
    box-shadow: 0 0 20px rgba(37,244,238,0.35), 0 0 40px rgba(37,244,238,0.18);
    transform: translateY(-2px);
}
.btn-tiktok:active { transform: translateY(0); }

/* Instagram button (solid brand accent; keep it clean) */
.btn-instagram {
    background-color: transparent;
    color: #DD2A7B;
    border: 2px solid #DD2A7B;
    transition: all 0.3s ease;
}
.btn-instagram:hover {
    background-color: #DD2A7B;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(221,42,123,0.35), 0 0 40px rgba(221,42,123,0.18);
    transform: translateY(-2px);
}
.btn-instagram:active { transform: translateY(0); }

/* Spotify button */
.btn-spotify {
    background-color: transparent;
    color: #1DB954;
    border: 2px solid #1DB954;
    transition: all 0.3s ease;
}
.btn-spotify:hover {
    background-color: #1DB954;
    color: #000000;
    box-shadow: 0 0 20px rgba(29,185,84,0.35), 0 0 40px rgba(29,185,84,0.18);
    transform: translateY(-2px);
}
.btn-spotify:active { transform: translateY(0); }

/* Apple Podcasts button (note: badges have their own rules; this is a site button) */
.btn-applepodcasts {
    background-color: transparent;
    color: #9333EA;
    border: 2px solid #9333EA;
    transition: all 0.3s ease;
}
.btn-applepodcasts:hover {
    background-color: #9333EA;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(147,51,234,0.35), 0 0 40px rgba(147,51,234,0.18);
    transform: translateY(-2px);
}
.btn-applepodcasts:active { transform: translateY(0); }

/* Patreon button */
.btn-patreon {
    background-color: transparent;
    color: #F96854;
    border: 2px solid #F96854;
    transition: all 0.3s ease;
}
.btn-patreon:hover {
    background-color: #F96854;
    color: #0a0f12;
    box-shadow: 0 0 20px rgba(249,104,84,0.35), 0 0 40px rgba(249,104,84,0.18);
    transform: translateY(-2px);
}
.btn-patreon:active { transform: translateY(0); }

/* Discord button — brand blurple */
.btn-discord {
    background-color: transparent;
    color: #5865F2;
    border: 2px solid #5865F2;
    transition: all 0.3s ease;
}

.btn-discord:hover {
    background-color: #5865F2;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(88,101,242,0.4), 0 0 40px rgba(88,101,242,0.25);
    transform: translateY(-2px);
}

.btn-discord:active {
    transform: translateY(0);
}

/* =========================
   Platform Buttons (Brand-ish)
   ========================= */

/* MOXFIELD (brandfetch) */
.btn-moxfield{
  --platform-accent: #D44071;                 /* Cabaret */
  --platform-text:   #FFFFFF;
  --platform-surface:#0C0620;
  --platform-border: rgba(212, 64, 113, 0.62);

  color: var(--platform-accent);
  border-color: var(--platform-border);
  background: rgba(12, 6, 32, 0.22);
}

.btn-moxfield:hover{
  color: var(--platform-text);
  border-color: rgba(212, 64, 113, 0.90);
  background: linear-gradient(
    180deg,
    rgba(12, 6, 32, 0.55),
    rgba(12, 6, 32, 0.18)
  );
  box-shadow:
    0 10px 34px rgba(212, 64, 113, 0.20),
    0 0 0 1px rgba(212, 64, 113, 0.25) inset;
}

.btn-moxfield:focus-visible{
  outline: 2px solid rgba(212, 64, 113, 0.90);
  outline-offset: 3px;
}
/* TOPDECK.GG (brandfetch) */
.btn-topdeck{
  --platform-accent: #397AB7;                 /* Boston Blue */
  --platform-gold:   #E5B76C;                 /* Equator */
  --platform-text:   rgba(255,255,255,0.96);
  --platform-border: rgba(57, 122, 183, 0.62);

  color: var(--platform-accent);
  border-color: var(--platform-border);
  background: rgba(255,255,255,0.03);
}

.btn-topdeck:hover{
  color: var(--platform-text);
  border-color: rgba(57, 122, 183, 0.92);
  background: rgba(57, 122, 183, 0.13);

  /* subtle gold “glint” that still feels Topdeck */
  box-shadow:
    0 10px 34px rgba(57, 122, 183, 0.18),
    0 0 0 1px rgba(57, 122, 183, 0.22) inset,
    0 0 26px rgba(229, 183, 108, 0.10);
}

.btn-topdeck:focus-visible{
  outline: 2px solid rgba(57, 122, 183, 0.92);
  outline-offset: 3px;
}

/* CONVOKE.GAMES */
.btn-convoke{
  --platform-accent: #955BE3;                 /* Convoke secondary */
  --platform-support:#4A88FF;                 /* Convoke primary, used subtly */
  --platform-text:   rgba(255,255,255,0.96);
  --platform-surface:#0A0A12;                 /* Deep Navy */
  --platform-border: rgba(149, 91, 227, 0.62);

  color: var(--platform-accent);
  border-color: var(--platform-border);
  background: rgba(10, 10, 18, 0.28);
}

.btn-convoke:hover{
  color: var(--platform-text);
  border-color: rgba(149, 91, 227, 0.92);
  background: linear-gradient(
    180deg,
    rgba(149, 91, 227, 0.16),
    rgba(10, 10, 18, 0.34)
  );

  /* purple-forward with a subtle Convoke blue glow */
  box-shadow:
    0 10px 34px rgba(149, 91, 227, 0.22),
    0 0 0 1px rgba(149, 91, 227, 0.22) inset,
    0 0 26px rgba(74, 136, 255, 0.10);
}

.btn-convoke:focus-visible{
  outline: 2px solid rgba(149, 91, 227, 0.92);
  outline-offset: 3px;
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text-primary);
    border: none;
    padding: var(--space-2) var(--space-4);
    position: relative;
}
.btn-ghost::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: var(--space-4);
    right: var(--space-4);
    height: 1px;
    background: var(--color-accent-teal);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--duration-base) var(--ease-out);
}
.btn-ghost:hover {
    color: var(--color-accent-teal);
}
.btn-ghost:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Button variants */
.btn-purple {
    background-color: var(--color-accent-purple);
    color: var(--color-text-primary);
    border-color: var(--color-accent-purple);
}
.btn-purple:hover {
    background-color: #9254b8;
    border-color: #9254b8;
    color: var(--color-text-primary);
    box-shadow: var(--glow-purple);
    transform: translateY(-1px);
}

/* Button sizes */
.btn-lg {
    font-size: var(--text-base);
    padding: var(--space-4) var(--space-10);
}
.btn-sm {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-5);
}

/* ===== CARDS ===== */
.card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    transition:
        transform var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(46, 168, 199, 0.3);
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-teal), transparent);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-out);
}
.card:hover::before {
    opacity: 1;
}

.card__image {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card__tag--purple {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent-purple);
    margin-bottom: var(--space-3);
}

.card__tag--teal {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent-teal);
    margin-bottom: var(--space-3);
}

.card__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--color-text-primary);
}

.card__body {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.card__footer {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Card grid layouts */
.card-grid {
    display: grid;
    gap: var(--space-8);
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Per-card accent hover glow (Revision 4 v4) */
.card--teal:hover { border-color: rgba(46,168,199,0.4); box-shadow: 0 8px 30px rgba(46,168,199,0.15); }
.card--teal::before { background: linear-gradient(90deg, transparent, var(--color-accent-teal), transparent); }
.card--purple:hover { border-color: rgba(123,63,160,0.4); box-shadow: 0 8px 30px rgba(123,63,160,0.15); }
.card--purple::before { background: linear-gradient(90deg, transparent, var(--color-accent-purple), transparent); }
.card--green:hover { border-color: rgba(111,168,50,0.4); box-shadow: 0 8px 30px rgba(111,168,50,0.15); }
.card--green::before { background: linear-gradient(90deg, transparent, var(--color-accent-green), transparent); }

/* ===== Equal-height cards in homepage grids ===== */
.home-blog-grid,
.home-contact-grid {
  display: grid;
  gap: var(--space-8);
  align-items: stretch;
}

.home-blog-grid > .card,
.home-contact-grid > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.home-blog-grid > .card .card__footer,
.home-contact-grid > .card .card__footer {
  margin-top: auto;
}

/* ===== MEET THE IMPERSONATORS — 1x4 Row + Neon Glow (Revision 4 v4) ===== */
.section--team {
  background-color: var(--color-bg-team);
  padding-top: calc(var(--space-20) + var(--space-4));
  padding-bottom: calc(var(--space-20) + var(--space-4));
}

/* Two-button row under team cards */
.team-cta-row {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.section--content { 
  background-color: var(--color-bg-surface); }

/* ===== HOMEPAGE: LATEST CONTENT ===== */
.content-preview-section .section-heading {
  text-align: center;
  margin: 0;
}

.content-preview-section .section-subheading {
  text-align: center;
  max-width: 720px;
  margin: var(--space-4) auto var(--space-10);
  color: var(--color-text-secondary);
}

.content-grid {
  display: grid;
  gap: var(--space-6);
  max-width: 900px;
  margin: var(--space-10) auto 0;
}

.content-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
}

.content-card__thumbnail {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  margin-top: 2px;
}

.content-card__icon {
  width: 30px;
  height: 30px;
  color: var(--color-text-primary);
}

.content-card__category {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.content-card__title {
  margin: 0 0 var(--space-2);
}

.content-card__description {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* ===== HOME: BLOG + CONTACT PREVIEW ===== */
.home-blog-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-8);
    align-items: start;
}

.topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.topic-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.02);
    user-select: none;
}

.home-contact-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: var(--space-8);
    align-items: start;
}

.contact-bullets {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0 0;
    display: grid;
    gap: var(--space-3);
}

.contact-bullets li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.contact-bullets li:first-child {
    border-top: none;
    padding-top: 0;
}

.contact-bullet__label {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent-purple);
}

.contact-bullet__text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.contact-social-buttons {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .home-blog-grid,
    .home-contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-bullets li {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
}

/* CTA row */
.content-preview-section__cta {
  margin-top: var(--space-8);
  text-align: center;
}

/* Color-coded accents (match logo vibes) */
.content-card.card-teal .content-card__category,
.content-card.card-teal .content-card__icon { color: var(--color-accent-teal); }

.content-card.card-purple .content-card__category,
.content-card.card-purple .content-card__icon { color: var(--color-accent-purple); }

.content-card.card-green .content-card__category,
.content-card.card-green .content-card__icon { color: var(--color-accent-green); }

/* Color-coded hover borders + top glow line */
.content-card.card-teal:hover { border-color: rgba(46,168,199,0.4); box-shadow: 0 8px 30px rgba(46,168,199,0.15); }
.content-card.card-teal::before { background: linear-gradient(90deg, transparent, var(--color-accent-teal), transparent); }

.content-card.card-purple:hover { border-color: rgba(123,63,160,0.4); box-shadow: 0 8px 30px rgba(123,63,160,0.15); }
.content-card.card-purple::before { background: linear-gradient(90deg, transparent, var(--color-accent-purple), transparent); }

.content-card.card-green:hover { border-color: rgba(111,168,50,0.4); box-shadow: 0 8px 30px rgba(111,168,50,0.15); }
.content-card.card-green::before { background: linear-gradient(90deg, transparent, var(--color-accent-green), transparent); }

/* Mobile polish */
@media (max-width: 640px) {
  .content-card { gap: var(--space-4); }
  .content-card__thumbnail {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }
  .content-card__icon { width: 24px; height: 24px; }
}

.team-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto var(--space-12);
}
.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6) var(--space-4);
    border-radius: var(--radius-lg);
    transition: background 0.35s ease;
    text-decoration: none;
}
.team-card__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--color-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.team-card__initials {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 700;
    opacity: 0.4;
    user-select: none;
    transition: opacity 0.35s ease;
}
.team-card__name {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
    transition: color 0.35s ease;
    color: var(--color-text-primary);
}
.team-card__role {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* Phil — White/Silver */
.team-card--white .team-card__photo { border: 2px solid rgba(208,208,208,0.5); }
.team-card--white .team-card__initials { color: #d0d0d0; }
.team-card--white:hover .team-card__photo { border-color: #ffffff; box-shadow: 0 0 15px #d0d0d0, 0 0 40px rgba(208,208,208,0.4), 0 0 80px rgba(208,208,208,0.2); }
.team-card--white:hover .team-card__name { color: #ffffff; }
.team-card--white:hover { background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.05) 0%, transparent 70%); }

/* Jarrod — Teal */
.team-card--teal .team-card__photo { border: 2px solid rgba(46,168,199,0.5); }
.team-card--teal .team-card__initials { color: var(--color-accent-teal); }
.team-card--teal:hover .team-card__photo { border-color: var(--color-accent-teal); box-shadow: 0 0 15px var(--color-accent-teal), 0 0 40px rgba(46,168,199,0.4), 0 0 80px rgba(46,168,199,0.2); }
.team-card--teal:hover .team-card__name { color: var(--color-accent-teal); }
.team-card--teal:hover { background: radial-gradient(circle at 50% 30%, rgba(46,168,199,0.05) 0%, transparent 70%); }

/* Greg — Red */
.team-card--red .team-card__photo { border: 2px solid rgba(184,74,74,0.5); }
.team-card--red .team-card__initials { color: var(--color-accent-red); }
.team-card--red:hover .team-card__photo { border-color: var(--color-accent-red); box-shadow: 0 0 15px var(--color-accent-red), 0 0 40px rgba(184,74,74,0.4), 0 0 80px rgba(184,74,74,0.2); }
.team-card--red:hover .team-card__name { color: var(--color-accent-red); }
.team-card--red:hover { background: radial-gradient(circle at 50% 30%, rgba(184,74,74,0.05) 0%, transparent 70%); }

/* Ben — Green */
.team-card--green .team-card__photo { border: 2px solid rgba(111,168,50,0.5); }
.team-card--green .team-card__initials { color: var(--color-accent-green); }
.team-card--green:hover .team-card__photo { border-color: var(--color-accent-green); box-shadow: 0 0 15px var(--color-accent-green), 0 0 40px rgba(111,168,50,0.4), 0 0 80px rgba(111,168,50,0.2); }
.team-card--green:hover .team-card__name { color: var(--color-accent-green); }
.team-card--green:hover { background: radial-gradient(circle at 50% 30%, rgba(111,168,50,0.05) 0%, transparent 70%); }

.section__cta { text-align: center; }

/* ===== HOMEPAGE: LATEST CONTENT ===== */
.content-preview-section .section-heading {
  text-align: center;
  margin: 0;
}

.content-preview-section .section-subheading {
  text-align: center;
  max-width: 720px;
  margin: var(--space-4) auto var(--space-10);
  color: var(--color-text-secondary);
}

.content-grid {
  display: grid;
  gap: var(--space-6);
  max-width: 900px;
  margin: var(--space-10) auto 0;
}

.content-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  height: 100%;
}

.content-card__thumbnail {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  margin-top: 2px;
}

.content-card__icon {
  width: 30px;
  height: 30px;
  color: var(--color-text-primary);
}

.content-card__category {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.content-card__title {
  margin: 0 0 var(--space-2);
}

.content-card__description {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* CTA row */
.content-preview-section__cta {
  margin-top: var(--space-8);
  text-align: center;
}

/* Color-coded accents (match logo vibes) */
.content-card.card-teal .content-card__category,
.content-card.card-teal .content-card__icon { color: var(--color-accent-teal); }

.content-card.card-purple .content-card__category,
.content-card.card-purple .content-card__icon { color: var(--color-accent-purple); }

.content-card.card-green .content-card__category,
.content-card.card-green .content-card__icon { color: var(--color-accent-green); }

/* ===== JOIN THE COMMUNITY — Discord CTA (Revision 4 v4) ===== */
.discord-cta {
    position: relative;
    padding: var(--space-20) 0;
    overflow: hidden;
    text-align: center;
    background-color: var(--color-bg-community);
    border-top: 1px solid var(--color-border);
}
.discord-cta__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(123, 63, 160, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(46, 168, 199, 0.10) 0%, transparent 60%);
    z-index: 0;
}
.discord-cta__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(123, 63, 160, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(46, 168, 199, 0.04) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px;
    opacity: 0.6;
}
.discord-cta__inner {
    position: relative;
    z-index: 1;
}
.discord-cta__section-heading {
    font-size: var(--text-4xl);
    margin-bottom: 0;
    color: var(--color-text-primary);
}
/* Fixed gradient text — starts light (#c0c0c0), always legible */
.discord-cta__body-heading {
    font-size: var(--text-2xl);
    margin-top: var(--space-8);
    margin-bottom: var(--space-5);
    background: linear-gradient(90deg, #c0c0c0 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.discord-cta__heading {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.discord-cta__body {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-10);
}
.discord-cta__btn {
    background-color: var(--color-accent-purple);
    color: var(--color-text-primary);
    border-color: var(--color-accent-purple);
    padding: var(--space-4) var(--space-10);
    font-size: var(--text-base);
}
.discord-cta__btn:hover {
    background-color: #9254b8;
    border-color: #9254b8;
    color: var(--color-text-primary);
    box-shadow: var(--glow-purple);
    transform: translateY(-2px);
}
.discord-cta__btn svg {
    flex-shrink: 0;
}


/* ===== FOOTER (Revision 3: Restructured) ===== */
.site-footer {
    background-color: var(--color-bg-dark);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
    padding-bottom: var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

/* Footer brand column (CENTER) */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}
.footer-logo {
    max-width: 200px;
    height: auto;
}
.footer-logomark {
    height: 50px;
    width: auto;
}
.footer-tagline {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-style: italic;
    font-weight: 400;
    color: var(--color-accent-teal);  /* Changed from text-secondary */
    margin-top: var(--space-12);
    opacity: 0.95;
}

/* Footer nav column (LEFT) */
.footer-heading {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    transition: color var(--duration-fast) var(--ease-out), padding-left var(--duration-fast) var(--ease-out);
}
.footer-links a:hover {
    padding-left: var(--space-2);
}

/* Color-cycling hover on footer nav links (nth-child) */
.footer-links--color-cycle li:nth-child(1) a:hover { color: var(--color-accent-teal); }
.footer-links--color-cycle li:nth-child(2) a:hover { color: var(--color-accent-purple); }
.footer-links--color-cycle li:nth-child(3) a:hover { color: var(--color-accent-red); }
.footer-links--color-cycle li:nth-child(4) a:hover { color: var(--color-accent-green); }
.footer-links--color-cycle li:nth-child(5) a:hover { color: var(--color-accent-teal); }

/* Footer social column (RIGHT) */
.footer-social-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-social-icons{
  display: grid;
  grid-template-columns: repeat(2, 44px); /* 2 columns */
  grid-auto-rows: 44px;                  /* consistent button height */
  gap: var(--space-4);
  justify-content: end;                  /* right-align the grid block */
  align-content: start;
}

/* Social icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition:
        color var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out),
        background-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}
.social-icon:hover {
    transform: translateY(-2px);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.00));
}
.social-icon svg {
    width: 20px;
    height: 20px;
}
.social-icon:focus-visible{
    outline: 2px solid rgba(88, 233, 255, 0.6);
    outline-offset: 3px;
}

/* Platform-specific hover colors */
.social-icon--youtube:hover {
    color: #ff0000;
    border-color: rgba(255, 0, 0, 0.4);
    background-color: rgba(255, 0, 0, 0.08);
    box-shadow: 0 0 16px rgba(255, 0, 0, 0.2);
}
.social-icon--instagram:hover {
    color: #e4405f;
    border-color: rgba(228, 64, 95, 0.4);
    background-color: rgba(228, 64, 95, 0.08);
    box-shadow: 0 0 16px rgba(228, 64, 95, 0.2);
}
.social-icon--tiktok:hover {
    color: #00f2ea;
    border-color: rgba(0, 242, 234, 0.4);
    background-color: rgba(0, 242, 234, 0.08);
    box-shadow: 0 0 16px rgba(0, 242, 234, 0.2);
}
.social-icon--x:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}
.social-icon--discord:hover {
    color: #5865f2;
    border-color: rgba(88, 101, 242, 0.4);
    background-color: rgba(88, 101, 242, 0.08);
    box-shadow: 0 0 16px rgba(88, 101, 242, 0.2);
}
.social-icon--patreon:hover {
    color: #ff424d;
    border-color: rgba(255, 66, 77, 0.4);
    background-color: rgba(255, 66, 77, 0.08);
    box-shadow: 0 0 16px rgba(255, 66, 77, 0.2);
}

/* Footer divider & copyright */
.footer-divider {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-12) 0 var(--space-6);
}
.footer-copyright {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    margin: 0;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition:
        opacity var(--duration-slow) var(--ease-out),
        transform var(--duration-slow) var(--ease-out);
    will-change: opacity, transform;
}

.fade-in-up    { transform: translateY(30px); }
.fade-in-left  { transform: translateX(-30px); }
.fade-in-right { transform: translateX(30px); }

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger delays for groups */
.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 100ms; }
.stagger-3 { transition-delay: 200ms; }
.stagger-4 { transition-delay: 300ms; }
.stagger-5 { transition-delay: 400ms; }
.stagger-6 { transition-delay: 500ms; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    /* Disable nebula animations — show static blobs at fixed positions */
    .nebula-blob-1, .nebula-blob-2, .nebula-blob-3, .nebula-blob-4, .nebula-blob-5 {
        animation: none !important;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== HERO — Mystical Animated Nebula (Revision 4 v4) ===== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: calc(var(--header-height) + 60px) 0 80px;
    background: var(--color-bg-hero);
}

.hero__tagline {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-style: italic;
    font-weight: 600;
    text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.9),
    0 0 22px rgba(46, 168, 199, 0.18);
    color: var(--color-accent-teal);  /* Changed from text-secondary */
    margin-top: var(--space-12);
    opacity: 0.95;
}

.hero__overline {text-align: center; }

/* =========================================================
   HERO CTA BUTTON GROUP
   Desktop/tablet: horizontal
   Mobile: stacked
   ========================================================= */

.hero__cta-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero__cta-group .btn {
  min-width: 240px;
}

@media (max-width: 768px) {
  .hero__cta-group {
    flex-direction: column;
    gap: 18px;
  }

  .hero__cta-group .btn {
    width: 100%;
    max-width: 320px;
    min-width: 0;
  }
}

.hero__pillrow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;              /* controls perceived centering */
}

.hero__pillrow > span{
  opacity: 0.7;           /* makes dots less “heavy” visually */
}

.hero__kicker{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0; /* separators control spacing */
}

.hero__kicker > span{
  display: inline-flex;
  align-items: center;
}

/* separator */
.hero__kicker > span + span::before{
  content: "•";                 /* looks more centered than · */
  display: inline-block;
  margin: 0 0.65em;             /* symmetric spacing */
  opacity: 0.75;
  transform: translateY(-0.02em); /* optical nudge */
}

/* Nebula container — fills entire hero */
.nebula-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Noise grain overlay for depth */
.nebula-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
}

/* TEAL blob — upper left */
.nebula-blob-1 {
    position: absolute;
    width: 1100px;
    height: 1100px;
    top: -350px;
    left: -250px;
    background: radial-gradient(ellipse at center, rgba(46,168,199,0.45) 0%, rgba(46,168,199,0.20) 40%, transparent 70%);
    animation: nebula-float-1 16s ease-in-out infinite alternate;
    border-radius: 50%;
    filter: blur(60px);
}

/* PURPLE blob — upper right */
.nebula-blob-2 {
    position: absolute;
    width: 1000px;
    height: 1000px;
    top: -150px;
    right: -300px;
    background: radial-gradient(ellipse at center, rgba(123,63,160,0.42) 0%, rgba(123,63,160,0.18) 40%, transparent 70%);
    animation: nebula-float-2 20s ease-in-out infinite alternate;
    border-radius: 50%;
    filter: blur(65px);
}

/* RED blob — lower center-left */
.nebula-blob-3 {
    position: absolute;
    width: 850px;
    height: 850px;
    bottom: -250px;
    left: 15%;
    background: radial-gradient(ellipse at center, rgba(184,74,74,0.35) 0%, rgba(184,74,74,0.14) 40%, transparent 70%);
    animation: nebula-float-3 18s ease-in-out infinite alternate;
    border-radius: 50%;
    filter: blur(55px);
}

/* GREEN blob — lower right */
.nebula-blob-4 {
    position: absolute;
    width: 900px;
    height: 900px;
    bottom: -200px;
    right: 8%;
    background: radial-gradient(ellipse at center, rgba(111,168,50,0.35) 0%, rgba(111,168,50,0.14) 40%, transparent 70%);
    animation: nebula-float-4 22s ease-in-out infinite alternate;
    border-radius: 50%;
    filter: blur(55px);
}

/* WHITE/SPOTLIGHT blob — top center */
.nebula-blob-5 {
    position: absolute;
    width: 1000px;
    height: 800px;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 40%, transparent 70%);
    animation: nebula-float-5 14s ease-in-out infinite alternate;
    border-radius: 50%;
    filter: blur(100px);
}

/* Keyframes — each blob moves in completely different direction & distance */
@keyframes nebula-float-1 {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
    100% { transform: translate(120px, 80px) scale(1.2); opacity: 1; }
}
@keyframes nebula-float-2 {
    0%   { transform: translate(0, 0) scale(1.1); opacity: 0.6; }
    100% { transform: translate(-100px, 60px) scale(0.9); opacity: 1; }
}
@keyframes nebula-float-3 {
    0%   { transform: translate(0, 0) scale(0.9); opacity: 0.8; }
    100% { transform: translate(80px, -70px) scale(1.15); opacity: 0.5; }
}
@keyframes nebula-float-4 {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.6; }
    100% { transform: translate(-90px, -50px) scale(1.1); opacity: 0.9; }
}
@keyframes nebula-float-5 {
    0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.5; }
    100% { transform: translateX(-50%) translateY(30px) scale(1.1); opacity: 0.8; }
}


.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: var(--space-6);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
    text-shadow: 0 2px 30px rgba(0,0,0,0.9);
}

.hero__subtitle {
    font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
    text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.85),
    0 0 26px rgba(0, 0, 0, 0.45);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-10);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__overline {
    font-size: var(--text-base);
    text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.85),
    0 0 26px rgba(0, 0, 0, 0.45);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-teal);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.hero__logo-bg {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 80vw;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}

.hero__logo-bg img {
    width: 100%;
    height: auto;
    filter: blur(3px);
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mt-4  { margin-top: var(--space-4); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }


/* ===== DECORATIVE ELEMENTS ===== */
/* Gradient accent line — usable as a divider */
.gradient-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-teal), var(--color-accent-purple), transparent);
    border: none;
    margin: var(--space-12) 0;
}

/* ===== PAGE / SECTION GLOW DIVIDER (nav-color separators) ===== */
.page-glow-divider {
  height: 2px;
  width: min(1200px, 92vw);
  margin: 0 auto;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--page-glow-color) 50%,
    transparent 100%
  );
  box-shadow:
    0 -15px 30px color-mix(in srgb, var(--page-glow-color) 30%, transparent),
    0 -30px 60px color-mix(in srgb, var(--page-glow-color) 15%, transparent),
    0  15px 30px color-mix(in srgb, var(--page-glow-color) 30%, transparent),
    0  30px 60px color-mix(in srgb, var(--page-glow-color) 15%, transparent);
  opacity: 0.95;
}

/* Color modifiers (match nav vibe) */
.page-glow-divider--teal   { --page-glow-color: var(--color-accent-teal); }
.page-glow-divider--purple { --page-glow-color: var(--color-accent-purple); }
.page-glow-divider--red    { --page-glow-color: var(--color-accent-red); }
.page-glow-divider--green  { --page-glow-color: var(--color-accent-green); }
.page-glow-divider--white  { --page-glow-color: var(--color-accent-white-mask); }

/* Subtle noise texture overlay — add to any section */
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ===== FORM ELEMENTS (Base) ===== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition:
        border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out);
    outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-accent-teal);
    box-shadow: 0 0 0 3px rgba(46, 168, 199, 0.15);
}
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a0a0a0'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: var(--space-10);
    cursor: pointer;
}

/* Honeypot field */
.form-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid {
        grid-template-columns: 1fr 1.5fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    /* Show mobile toggle, hide desktop nav */
    .nav-desktop {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }

    /* Typography scale down */
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-2xl); }

    .section {
        padding-top: var(--space-14);
        padding-bottom: var(--space-14);
    }

    .card-grid--2,
    .card-grid--3,
    .card-grid--4 {
        grid-template-columns: 1fr;
    }

    .team-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
    .team-card__photo {
        width: 140px;
        height: 140px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }
    
    .footer-brand {
        order: -1;
        align-items: center;
    }
    
    .footer-nav {
        align-items: center;
    }
    
    .footer-nav .footer-links {
        align-items: center;
    }
    
    .footer-social-col {
        align-items: center;
    }
    
    .footer-social-icons {
        display: grid;
        grid-template-columns: repeat(2, 44px);
        grid-auto-rows: 44px;
        gap: var(--space-4);
        justify-content: end;
    }

    .hero__title {
        font-size: clamp(var(--text-3xl), 8vw, var(--text-5xl));
    }

    .discord-cta__heading {
        font-size: var(--text-3xl);
    }
    
    .discord-cta__section-heading {
        font-size: var(--text-3xl);
    }

    .logo-img {
        height: 44px;
    }
}

@media (max-width: 768px) {
    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: rgba(10, 10, 10, 0.96);
        border-bottom-color: var(--color-border);
    }

    .nav-mobile {
        background-color: rgba(10, 10, 10, 0.98);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    .hero__actions {
        flex-direction: column;
        align-items: center;
    }
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    .team-row {
        gap: var(--space-4);
    }
    .team-card__photo {
        width: 120px;
        height: 120px;
    }
    .team-card__initials {
        font-size: var(--text-2xl);
    }
}


/* ===== BODY LOCK (when mobile menu open) ===== */
body.menu-open {
    overflow: hidden;
}

/* ============================================================
   MOBILE/TABLET UX PATCH v3
   Targets issues from screenshots:
   - Home hero horizontal overflow on mobile
   - Footer layout: logo on top, then 2-col (nav left, connect right)
   ============================================================ */

/* ---------- Home Hero: prevent horizontal overflow on mobile ---------- */
@media (max-width: 768px) {
  .hero {
    /* helps when iOS rounds viewport widths during URL bar collapse */
    width: 100%;
    max-width: 100%;
  }

  .hero__content {
    width: 100%;
    max-width: 100%;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  /* allow kicker row to wrap instead of forcing a wide line */
  .hero__pillrow,
  .hero__kicker {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  /* make separators behave nicely when wrapped */
  .hero__kicker > span + span::before {
    margin: 0 0.55em;
  }

  /* long headings should never create horizontal scroll */
  .hero__title {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* ---------- Footer: mobile layout tuning (logo top, then 2 columns) ---------- */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand brand"
      "nav social";
    gap: var(--space-8);
    text-align: left;
    align-items: start;
  }

  .footer-brand {
    grid-area: brand;
    text-align: center;
  }

  .footer-nav {
    grid-area: nav;
    align-items: flex-start;
  }

  .footer-nav .footer-links {
    align-items: flex-start;
  }

  .footer-social-col {
    grid-area: social;
    align-items: flex-end;
    text-align: right;
  }

  .footer-social-icons {
    justify-content: end;
  }
}

/* extra-small: if 2 columns get too tight, fall back to stacking */
@media (max-width: 380px) {
  .footer-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav"
      "social";
    text-align: center;
  }

  .footer-nav,
  .footer-nav .footer-links,
  .footer-social-col {
    align-items: center;
    text-align: center;
  }

  .footer-social-icons {
    justify-content: center;
  }
}
