/* =====================================================================
 * Flanör v2 — Application styles (light, friendly)
 * ===================================================================== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: contain;          /* kill the bouncy white background on iOS chrome */
    text-rendering: optimizeLegibility;
}

/* ---- Custom scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ---- Text selection ---- */
::selection {
    background: rgba(var(--primary-rgb), 0.22);
    color: var(--ink-1);
}

/* When launched as an installed PWA, hide things that don't belong
   in standalone mode (and recover the lost iOS status-bar height). */
@media (display-mode: standalone) {
    body { padding-top: env(safe-area-inset-top, 0); }
    .nav-toggle { display: none !important; }
}

/* Disable hover-stick on touch devices — `:hover` lingers there */
@media (hover: none) {
    .btn:hover, .btn-ghost:hover, .nav-links a:hover,
    .cat-card:hover, .club-card:hover, .event-card:hover,
    .testimonial-card:hover, .step:hover, .why-card:hover {
        transform: none !important;
        box-shadow: var(--shadow-1) !important;
    }
}

/* Page-transition top bar — JS shows/hides via .is-loading on <html> */
.page-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out, opacity 0.3s ease-out;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}
html.is-loading .page-progress {
    opacity: 1;
    transform: scaleX(0.7);
    transition: transform 8s cubic-bezier(0.1, 0.7, 0.1, 1);
}
html.is-loading.is-finishing .page-progress {
    transform: scaleX(1);
    transition: transform 0.25s ease-out;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--primary-600); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink-1);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 16px;
}
h1 { font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 3.5vw, 38px); }
h3 { font-size: clamp(19px, 2.5vw, 24px); }
h4 { font-size: 18px; font-weight: 600; }

p { margin: 0 0 14px; color: var(--ink-2); }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-sm { max-width: 680px; }
.container-md { max-width: 880px; }

/* ------------------------------ Nav ------------------------------ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 247, 0.80);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    transition: box-shadow var(--dur-slow) var(--ease-smooth);
}
.nav--elevated {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .nav {
    background: rgba(10, 10, 11, 0.75);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .nav--elevated {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.nav-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 64px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}
.nav-brand {
    font-family: var(--display);
    font-weight: 800;
    font-size: 21px;
    color: var(--ink-1);
    letter-spacing: -0.03em;
    transition: opacity var(--dur-fast);
}
.nav-brand:hover { color: var(--ink-1); opacity: 0.8; }
.nav-brand .dot { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-links a:hover {
    color: var(--ink-1);
    background: var(--surface-2);
}
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-50);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-1);
    width: 38px;
    height: 38px;
    border-radius: var(--r-2);
    cursor: pointer;
    font-size: 18px;
}
@media (max-width: 768px) {
    .nav-inner { gap: 10px; padding: 0 14px; }
    .nav-toggle { display: none; }       /* Replaced by the bottom-dock Menu button */
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        padding: 14px 20px;
        gap: 4px;
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    .nav-links.is-open { display: flex; }
    .nav-actions .btn-ghost,
    .nav-actions .btn:not(.nav-avatar) { display: none; }
    .nav-actions { gap: 8px; }
    /* The mobile menu surfaces auth CTAs — see partial nav-links bottom */
    .nav-links__cta {
        display: flex;
        gap: 8px;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }
    .nav-links__cta .btn { flex: 1; text-align: center; }
}
@media (min-width: 769px) {
    .nav-links__cta { display: none; }
}

/* ================================================================
 * Mobile bottom dock — Instagram / Twitter style 5-icon nav.
 * Hidden above 768 px (desktop nav covers everything).
 * ================================================================ */
.mobile-dock { display: none; }

@media (max-width: 768px) {
    body { padding-bottom: 64px; }       /* room for the dock */

    .mobile-dock {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 99;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: 60px;
        background: rgba(250, 250, 247, 0.92);
        border-top: 1px solid var(--line);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    [data-theme="dark"] .mobile-dock {
        background: rgba(10, 10, 11, 0.85);
    }

    .mobile-dock__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--ink-3);
        background: transparent;
        border: 0;
        cursor: pointer;
        font-family: var(--sans);
        font-size: 10px;
        font-weight: 500;
        padding: 8px 4px 6px;
        transition: color 0.12s, transform 0.12s;
    }
    .mobile-dock__item svg { stroke: currentColor; }
    .mobile-dock__item:active { transform: scale(0.88); }
    .mobile-dock__item:hover { color: var(--primary); }
    .mobile-dock__item.is-active {
        color: var(--primary);
        background: var(--primary-50);
        border-radius: var(--r-2);
    }
    .mobile-dock__item.is-active span { font-weight: 700; }

    .mobile-dock__avatar {
        width: 22px; height: 22px;
        border-radius: 50%;
        background-size: cover;
        background-position: center;
        background-color: var(--surface-2);
        border: 1px solid var(--line);
    }
    .mobile-dock__avatar-fb {
        background: var(--primary-50);
        color: var(--primary);
        display: flex; align-items: center; justify-content: center;
        font-family: var(--display);
        font-weight: 700;
        font-size: 11px;
        border: 1px solid rgba(var(--primary-rgb), 0.25);
    }
}

/* ------------------------------ Buttons ------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary);
    color: var(--on-primary);
    border: 1px solid var(--primary);
    border-radius: var(--r-pill);
    padding: 11px 24px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition:
        background var(--dur-base) var(--ease-smooth),
        transform  var(--dur-fast) var(--ease-back),
        box-shadow var(--dur-base) var(--ease-smooth),
        border-color var(--dur-base);
    box-shadow: var(--shadow-1);
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}
/* Shimmer sweep on hover */
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s var(--ease-expo);
    pointer-events: none;
}
.btn:hover::after {
    transform: translateX(100%);
}
.btn:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: var(--on-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-2), var(--glow-primary);
}
.btn:active { transform: translateY(0) scale(0.97); }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:disabled::after { display: none; }

.btn-ghost {
    background: var(--surface);
    color: var(--ink-1);
    border-color: var(--line);
    box-shadow: none;
}
.btn-ghost::after { display: none; }
.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--ink-1);
    border-color: var(--line-2);
    box-shadow: var(--shadow-1);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-primary);
}
.btn-accent:hover {
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: var(--on-primary);
    box-shadow: var(--shadow-2), var(--glow-accent);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
    box-shadow: none;
}
.btn-danger::after { display: none; }
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    transform: translateY(-1px);
}

.btn-block { display: flex; width: 100%; }

.btn-sm  { padding: 7px 16px;  font-size: 13px; }
.btn-xl  { padding: 14px 32px; font-size: 16px; letter-spacing: -0.01em; }

/* ------------------------------ Forms ------------------------------ */
label {
    display: block;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink-1);
    font-weight: 600;
    margin-bottom: 6px;
}
.field { margin-bottom: 16px; }
.field-help { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="tel"], input[type="number"],
input[type="datetime-local"], input[type="date"], input[type="search"],
select, textarea {
    width: 100%;
    background: var(--surface);
    color: var(--ink-1);
    border: 1px solid var(--line-2);
    border-radius: var(--r-2);
    padding: 11px 14px;
    font-family: var(--sans);
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-5); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
textarea { min-height: 120px; resize: vertical; }

/* ------------------------------ Cards / Surfaces ------------------------------ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: 28px;
    box-shadow: var(--shadow-1);
}
.card--sm { padding: 20px; }
.card--flush { padding: 0; overflow: hidden; }

/* ------------------------------ Hero ------------------------------ */
.hero {
    padding: 92px 0 68px;
    position: relative;
    overflow: hidden;
}
/* Layered ambient gradient orbs */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        var(--mesh-a),
        var(--mesh-b);
    pointer-events: none;
    z-index: 0;
}
/* Subtle dot-grid texture */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(var(--ink-3-rgb), 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.hero-copy { text-align: left; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-50);
    border: 1px solid rgba(var(--primary-rgb), 0.28);
    padding: 6px 14px;
    border-radius: var(--r-pill);
    margin: 0 0 22px;
    transition: transform var(--dur-base) var(--ease-back);
}
.hero-kicker:hover { transform: scale(1.02); }
.hero-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
    animation: hero-pulse 2.4s ease infinite;
}
.hero-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(38px, 6vw, 68px);
    color: var(--ink-1);
    letter-spacing: -0.04em;
    line-height: 1.04;
    margin: 0 0 22px;
}
.hero-title .accent  {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-title .accent2 { color: var(--accent); }
.hero-lead {
    color: var(--ink-2);
    font-size: clamp(16px, 1.5vw, 18px);
    margin: 0 0 32px;
    line-height: 1.6;
    max-width: 520px;
}
.hero-cta { display: inline-flex; gap: 10px; flex-wrap: wrap; }

/* Hero photo column */
.hero-photo {
    position: relative;
    border-radius: var(--r-4);
    overflow: hidden;
    box-shadow: var(--shadow-3);
    aspect-ratio: 4 / 5;
    background: var(--surface-2);
    background-size: cover;
    background-position: center;
}
@media (max-width: 900px) {
    .hero-photo { aspect-ratio: 16 / 11; }   /* Less tall when stacked */
}
.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.hero-photo__caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    color: #fff;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.hero-photo__caption .live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.55);
    animation: hero-pulse 2s ease infinite;
}
@keyframes hero-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

/* Floating glass card on top of the photo (next event preview) */
.hero-photo__chip {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.60);
    border-radius: var(--r-2);
    padding: 10px 14px;
    box-shadow: var(--shadow-3), 0 0 0 0.5px rgba(0,0,0,0.04);
    z-index: 1;
    color: var(--ink-1);
    transition: transform var(--dur-base) var(--ease-back), box-shadow var(--dur-base);
}
.hero-photo__chip:hover { transform: scale(1.02) translateY(-1px); }
[data-theme="dark"] .hero-photo__chip {
    background: rgba(18, 18, 20, 0.80);
    color: var(--ink-1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-photo__chip .chip-label {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.hero-photo__chip .chip-value {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
    color: var(--ink-1);
}

/* ------------------------------ Sections ------------------------------ */
.section { padding: 88px 0; }
.section--alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head .kicker { display: inline-block; margin-bottom: 14px; }
.section-head h2 { margin: 0 0 14px; }
.section-head p { color: var(--ink-2); font-size: 17px; line-height: 1.60; margin: 0; }

/* ------------------------------ Grid ------------------------------ */
.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ------------------------------ Step / How it works ------------------------------ */
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: 36px 28px;
    text-align: center;
    transition:
        transform var(--dur-base) var(--ease-back),
        box-shadow var(--dur-base) var(--ease-smooth),
        border-color var(--dur-base);
    box-shadow: var(--shadow-1);
    position: relative;
    overflow: hidden;
}
.step::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-slow) var(--ease-expo);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: rgba(var(--primary-rgb), 0.25); }
.step:hover::after { transform: scaleX(1); }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary);
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    margin: 0 auto 20px;
    border: 2px solid rgba(var(--primary-rgb), 0.20);
    transition: transform var(--dur-slow) var(--ease-back);
}
.step:hover .step-num { transform: scale(1.10) rotate(-5deg); }
.step--orange .step-num { background: var(--accent-50); color: var(--accent-600); border-color: rgba(var(--accent-rgb), 0.20); }
.step h3 { color: var(--ink-1); margin-bottom: 10px; }
.step p { color: var(--ink-2); margin: 0; font-size: 14px; line-height: 1.6; }

/* ============================== Stats section ============================
   Replaces the old `.stats` flat strip with a card-based layout that
   carries more visual weight: each stat sits in a translucent card with
   a subtle border, an outline icon, a mono-feature numeric, a label, and
   a small uppercase mono hint. The whole section sits over a soft radial
   gradient that hints at activity without competing with the hero. */

.stats-section {
    position: relative;
    padding: 64px 0;
    overflow: hidden;
}
.stats-section::before,
.stats-section::after {
    content: '';
    position: absolute;
    pointer-events: none;
    inset: 0;
    z-index: 0;
}
/* Soft radial accent — primary on the left, accent on the right */
.stats-section::before {
    background:
        radial-gradient(circle at 18% 0%,  rgba(var(--primary-rgb), 0.10), transparent 55%),
        radial-gradient(circle at 82% 100%, rgba(var(--accent-rgb, 249, 115, 22),  0.07), transparent 55%);
}
/* Hairline grid lines that fade out — gives the section a "data-board"
   feel without being a grid background. */
.stats-section::after {
    background-image:
        linear-gradient(to right,  rgba(var(--ink-3-rgb, 90,90,90), 0.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--ink-3-rgb, 90,90,90), 0.10) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
            mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    opacity: 0.45;
}
.stats-section > .container {
    position: relative;
    z-index: 1;
}
.stats-section__head {
    text-align: center;
    margin-bottom: 32px;
}
.stats-section__head .kicker {
    display: inline-block;
    margin-bottom: 8px;
}
.stats-section__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(22px, 2.4vw, 28px);
    letter-spacing: -0.02em;
    color: var(--ink-1);
    margin: 0;
}

/* ----- Strip layout ----- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ----- Card ----- */
.stat-card {
    position: relative;
    padding: 28px 24px 26px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    transition:
        border-color 0.25s ease,
        transform    0.25s ease,
        box-shadow   0.25s ease,
        background   0.25s ease;
    overflow: hidden;
}
/* Top gradient hairline appears on hover */
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.45);
    box-shadow: 0 14px 32px -18px rgba(var(--primary-rgb), 0.55);
}
.stat-card:hover::before { opacity: 1; }

/* Accent variant — every other card. Subtle hue shift via icon + hint */
.stat-card--accent .stat-card__icon {
    background: rgba(var(--accent-rgb, 249, 115, 22), 0.12);
    color: var(--accent);
}
.stat-card--accent:hover {
    border-color: rgba(var(--accent-rgb, 249, 115, 22), 0.45);
    box-shadow: 0 14px 32px -18px rgba(var(--accent-rgb, 249, 115, 22), 0.55);
}

/* Icon chip */
.stat-card__icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    margin-bottom: 18px;
}
.stat-card__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* The big number — mono, tabular, animated count-up via JS sets data-count */
.stat-card__num {
    font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
    font-feature-settings: 'tnum' 1, 'zero' 1;
    font-variant-numeric: tabular-nums;
    font-size: clamp(34px, 3.6vw, 44px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink-1);
    margin-bottom: 8px;
}

.stat-card__label {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink-2);
    margin-bottom: 4px;
}
.stat-card__hint {
    font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
    font-size: 11px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Reduced motion — no entrance lift, no hover transform */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .stat-card::before { transition: none; }
    .stat-card:hover  { transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
    .stats-section          { padding: 48px 0; }
    .stats-strip            { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 420px) {
    .stats-section          { padding: 40px 0; }
    .stats-strip            { grid-template-columns: 1fr; }
    .stat-card              { padding: 22px 20px 20px; }
    .stat-card__num         { font-size: 32px; }
}

/* ------------------------------ Event card ------------------------------ */
.event-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--dur-base) var(--ease-back),
        box-shadow var(--dur-base) var(--ease-smooth),
        border-color var(--dur-base);
    box-shadow: var(--shadow-1);
}
.event-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.40);
    box-shadow: var(--shadow-3);
    color: inherit;
}
/* Cover image — full-width header that replaces the date strip
   when an event has a cover_image. */
.event-card__cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    overflow: hidden;
}
.event-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.event-card__cover-date {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--surface);
    color: var(--ink-1);
    border-radius: var(--r-2);
    padding: 8px 12px;
    box-shadow: var(--shadow-2);
    font-family: var(--sans);
    line-height: 1;
    z-index: 1;
}
.event-card__cover-date .day {
    display: block;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
}
.event-card__cover-date .mo {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--primary);
    margin-top: 2px;
}

/* Pattern cover — used when no cover_image exists. Big emoji on a
   colored gradient. Themed against primary / accent. */
.event-card__pattern {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.18), transparent 60%),
        linear-gradient(135deg, var(--primary), var(--primary-600));
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-card--orange .event-card__pattern {
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.22), transparent 60%),
        linear-gradient(135deg, var(--accent), var(--accent-600));
}
.event-card__pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.10) 1.5px, transparent 1.5px),
        radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 36px 36px, 22px 22px;
    background-position: 0 0, 18px 11px;
    opacity: 0.7;
    pointer-events: none;
}
.event-card__pattern-emoji {
    position: relative;
    z-index: 1;
    font-size: clamp(64px, 10vw, 96px);
    line-height: 1;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.30));
}
.event-card__pattern-date {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--surface);
    color: var(--ink-1);
    border-radius: var(--r-2);
    padding: 8px 12px;
    box-shadow: var(--shadow-2);
    line-height: 1;
    z-index: 2;
}
.event-card__pattern-date .day {
    display: block;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
}
.event-card__pattern-date .mo {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--primary);
    margin-top: 2px;
}
.event-card--orange .event-card__pattern-date .mo { color: var(--accent); }

/* Legacy strip — kept as fallback if a view uses it. */
.event-card__strip {
    padding: 16px 20px;
    background: var(--primary);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    gap: 14px;
}
.event-card--orange .event-card__strip { background: var(--accent); color: var(--on-primary); }
.event-card__day {
    font-family: var(--display);
    font-weight: 800;
    font-size: 38px;
    line-height: 0.95;
    letter-spacing: -0.03em;
}
.event-card__when {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.95;
}
.event-card__when-time {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
    opacity: 0.95;
}
.event-card__body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.event-card__group {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin: 0;
}
.event-card__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink-1);
    margin: 0;
    line-height: 1.25;
}
.event-card__meta {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink-3);
    margin-top: auto;
    padding-top: 8px;
}

/* ------------------------------ Alerts ------------------------------ */
.alert {
    border-radius: var(--r-2);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.alert-success { background: rgba(74, 222, 128, 0.10);  color: var(--success); border-color: rgba(74, 222, 128, 0.35); }
.alert-error   { background: rgba(248, 113, 113, 0.10); color: var(--danger);  border-color: rgba(248, 113, 113, 0.35); }
.alert-warning { background: rgba(251, 191, 36, 0.10);  color: var(--warning); border-color: rgba(251, 191, 36, 0.35); }
.alert-info    { background: rgba(56, 189, 248, 0.10);  color: var(--info);    border-color: rgba(56, 189, 248, 0.35); }

/* ------------------------------ Auth box ------------------------------ */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;            /* iOS Safari address-bar-aware */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px 60px;
    background: var(--bg);
    position: relative;
    /* Block horizontal only; vertical MUST scroll so long forms
       (apply, register) stay reachable on mobile. `clip` is iOS 16+;
       `hidden` is the universal fallback browsers all understand. */
    overflow-x: hidden;
}
/* `margin: auto` on a sole flex-column item centers it when the
   container is taller than the content, but auto-collapses to 0
   when content overflows — so submit buttons stay reachable. */
.auth-card {
    margin-top:    auto;
    margin-bottom: auto;
}
.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 50% at 50% 0%, var(--hero-glow-1), transparent 70%),
        radial-gradient(40% 50% at 100% 100%, var(--hero-glow-2), transparent 70%);
    pointer-events: none;
}

/* Decorative skyline illustration along the bottom of the auth shell.
   Pure SVG, theme-aware via currentColor. */
.auth-illustration {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 220px;
    color: var(--primary);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
[data-theme="dark"] .auth-illustration { opacity: 0.40; }
.auth-illustration svg {
    display: block;
    width: 100%;
    height: 100%;
}
.auth-card { position: relative; z-index: 1; }
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: 40px 32px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-3);
    position: relative;
}
@media (max-width: 480px) {
    .auth-card { padding: 28px 22px; margin-top: 16px; margin-bottom: 16px; }
    .auth-shell { padding: 24px 12px 80px; }
}
.auth-card h1 { font-size: 28px; margin: 0 0 6px; }
.auth-card .lead { color: var(--ink-2); font-size: 14px; margin: 0 0 24px; }
.auth-foot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--ink-3); }

/* --- Social Login (Phase 32) --- */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--r-2);
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-smooth),
                box-shadow var(--dur-fast) var(--ease-smooth),
                transform var(--dur-fast) var(--ease-smooth);
    cursor: pointer;
    border: 1px solid var(--line-2);
}
.btn-social--google {
    background: var(--surface);
    color: var(--ink-1);
}
.btn-social--github {
    background: var(--surface);
    color: var(--ink-1);
}
.btn-social:hover {
    background: var(--surface-2);
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}
.btn-social:active { transform: scale(0.98); }
[data-theme="dark"] .btn-social--github {
    background: var(--surface-2);
    border-color: var(--line-2);
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--ink-4);
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ------------------------------ Footer ------------------------------ */
.footer {
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 64px 0 36px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 400px)  { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-3);
    font-weight: 600;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.footer-brand-desc {
    color: var(--ink-3);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 240px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--ink-2);
    font-size: 14px;
    transition: color var(--dur-fast);
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--ink-4);
    font-size: 13px;
}

/* ------------------------------ Lang switcher ------------------------------ */
.lang-switch {
    display: inline-flex;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 3px;
}
.lang-switch a {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    color: var(--ink-3);
}
.lang-switch a.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-1); }
[data-theme="dark"] .lang-switch a.active { background: var(--surface-3); }

/* ------------------------------ Theme toggle ------------------------------ */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0;
}
.theme-toggle:hover {
    background: var(--surface-3);
    color: var(--primary);
    border-color: var(--line-2);
}
.theme-toggle__sun, .theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }
[data-theme="dark"]  .theme-toggle__sun  { display: block; }

/* ------------------------------ Account / Admin shell ------------------------------ */
.account-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
    gap: 0;
}
@media (max-width: 900px) {
    .account-shell { grid-template-columns: 1fr; }
    .account-side {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 14px 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .account-side ul {
        display: flex;
        gap: 4px;
        white-space: nowrap;
    }
    .account-side li { margin-bottom: 0; }
    .account-side a { padding: 8px 12px; font-size: 12px; }
    .account-side .side-section { display: none; }
    .account-main { padding: 24px 16px; }
}
.account-side {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 28px 16px;
}
.account-side ul { list-style: none; padding: 0; margin: 0; }
.account-side li { margin-bottom: 4px; }
.account-side a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--r-2);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.account-side a:hover { background: var(--surface-2); color: var(--ink-1); }
.account-side a.active { background: var(--primary-50); color: var(--primary); }
[data-theme="dark"] .account-side a.active { color: var(--primary); }
.account-side .side-section {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
    font-size: 11px; color: var(--ink-4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.10em;
    padding-left: 14px; padding-bottom: 8px;
}
.account-main { padding: 36px 40px; }
@media (max-width: 600px) { .account-main { padding: 24px 20px; } }

/* ------------------------------ Tables ------------------------------ */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--surface);
    border-radius: var(--r-3);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}
.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.table th {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-3);
    font-weight: 600;
    background: var(--surface-2);
    letter-spacing: 0.04em;
}
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
}
.badge--pending   { background: rgba(251, 191, 36, 0.12); color: var(--warning); border-color: rgba(251, 191, 36, 0.35); }
.badge--approved  { background: rgba( 74, 222, 128, 0.12); color: var(--success); border-color: rgba( 74, 222, 128, 0.35); }
.badge--rejected  { background: rgba(248, 113, 113, 0.12); color: var(--danger);  border-color: rgba(248, 113, 113, 0.35); }
.badge--suspended { background: var(--surface-2); color: var(--ink-3); border-color: var(--line-2); }
.badge--admin     { background: rgba( 56, 189, 248, 0.12); color: var(--info); border-color: rgba(56, 189, 248, 0.35); }
.badge--member    { background: var(--surface-2); color: var(--ink-2); border-color: var(--line-2); }
.badge--demo      { background: var(--accent-50); color: var(--accent); border-color: rgba(251, 146, 60, 0.35); }

/* ------------------------------ Demo banner ------------------------------ */
.demo-banner {
    background: linear-gradient(135deg, var(--accent-50), var(--primary-50));
    border: 1px solid rgba(251, 146, 60, 0.45);
    border-radius: var(--r-3);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.demo-banner strong { color: var(--accent); font-weight: 700; }
.demo-banner p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ================================================================
 * Categories — image-first cards, chips, hero
 * ================================================================ */

/* Category card — used on homepage 4-grid */
.cat-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--dur-base) var(--ease-back),
        border-color var(--dur-base),
        box-shadow var(--dur-base) var(--ease-smooth);
    box-shadow: var(--shadow-1);
}
.cat-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(var(--primary-rgb), 0.40);
    box-shadow: var(--shadow-3);
    color: inherit;
}
.cat-card__img {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    position: relative;
}
.cat-card__img-fallback {
    aspect-ratio: 1;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.18), transparent 60%),
        linear-gradient(135deg, var(--primary), var(--primary-600));
    color: var(--on-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
}
.cat-card__body {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cat-card__name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 16px;
    color: var(--ink-1);
    margin: 0;
    flex: 1;
}
.cat-card__emoji { font-size: 18px; opacity: 0.85; }

/* Category chip — used on /clubs filter row */
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 4px 14px 4px 4px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.cat-chip:hover { border-color: var(--primary); color: var(--ink-1); }
.cat-chip__img {
    width: 28px; height: 28px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    flex-shrink: 0;
}
.cat-chip__fallback {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* ================================================================
 * Groups (clubs) — cover-first cards & hero
 * ================================================================ */

.club-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--dur-base) var(--ease-back),
        border-color var(--dur-base),
        box-shadow var(--dur-base) var(--ease-smooth);
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
}
.club-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.40);
    box-shadow: var(--shadow-3);
    color: inherit;
}
.club-card__cover {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    position: relative;
}
.club-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.50) 100%);
}
.club-card__cover-fallback {
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.18), transparent 60%),
        linear-gradient(135deg, var(--primary), var(--primary-600));
    display: flex; align-items: center; justify-content: center;
    color: var(--on-primary);
    font-size: 64px;
}
.club-card__cat-chip {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--r-pill);
    padding: 4px 10px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}
.club-card__body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.group-hero {
    position: relative;
    aspect-ratio: 42 / 9;       /* slim — half the height of the old 21:9 */
    border-radius: var(--r-3);
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-2);
}
@media (max-width: 600px) {
    .group-hero { aspect-ratio: 21 / 9; }   /* keep some height on tiny screens so the photo isn't a thin strip */
}
.group-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.65) 100%);
}
.group-hero__cat {
    position: absolute;
    top: 16px; left: 16px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--r-pill);
    padding: 5px 12px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

/* ================================================================
 * Admin row image thumb (categories list)
 * ================================================================ */

.thumb-32 {
    display: inline-block;
    width: 32px; height: 32px;
    border-radius: var(--r-2);
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    border: 1px solid var(--line);
    vertical-align: middle;
}
.thumb-48 {
    display: inline-block;
    width: 48px; height: 48px;
    border-radius: var(--r-2);
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    border: 1px solid var(--line);
}

/* Profile avatar editor */
.avatar-edit {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.avatar-edit__preview,
.avatar-edit__preview-fb {
    width: 88px; height: 88px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    border: 2px solid var(--line);
}
.avatar-edit__preview-fb {
    background: var(--primary-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 30px;
    border-color: rgba(var(--primary-rgb), 0.30);
}
.avatar-edit__controls { flex: 1; }
.avatar-edit__hint {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-3);
    margin: 6px 0 0;
}

/* Compact avatar pill in the nav (when logged in) */
.nav-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    border: 1px solid var(--line);
    display: inline-block;
    flex-shrink: 0;
    transition: border-color 0.15s, transform 0.15s;
}
.nav-avatar:hover { border-color: var(--primary); transform: translateY(-1px); }
.nav-avatar-fb {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    flex-shrink: 0;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}
.nav-avatar-fb:hover { border-color: var(--primary); transform: translateY(-1px); color: var(--primary); }

/* ================================================================
 * Chat — per-club thread bubbles
 * ================================================================ */

.chat-shell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Sticky-composer pattern: the shell gets a fixed working height
       so the list fills the space above the form, and the form pins
       to the bottom of the shell. New messages auto-scroll within
       .chat-list, the form never moves. */
    height: min(70vh, 720px);
    min-height: 420px;
}
.chat-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.chat-head h3 {
    font-family: var(--display);
    font-weight: 700;
    font-size: 16px;
    color: var(--ink-1);
    margin: 0;
}
.chat-head__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.chat-head__live::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.55);
    animation: hero-pulse 2s ease infinite;
}
.chat-list {
    padding: 18px 16px;
    /* Fill whatever vertical room the shell gives us above the
       composer. The composer pins to the shell's bottom via
       position:sticky below, so this stays in sync as the shell
       resizes (mobile keyboard, layout reflow). */
    flex: 1 1 auto;
    min-height: 0;          /* required for Firefox flex-shrink-with-overflow */
    overflow-y: auto;
    overscroll-behavior: contain;  /* don't bounce-scroll the page when at the top */
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chat-list__empty {
    text-align: center;
    color: var(--ink-3);
    padding: 48px 20px;
    font-size: 14px;
}
.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
}
.chat-msg__avatar,
.chat-msg__avatar-fallback {
    width: 36px; height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
}
.chat-msg__avatar-fallback {
    background: var(--primary-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 14px;
}
.chat-msg__bubble { flex: 1; min-width: 0; }
.chat-msg__head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.chat-msg__name {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-1);
}
.chat-msg__handle {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-4);
}
.chat-msg__time {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--ink-4);
    margin-left: auto;
}
.chat-msg__body {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-1);
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.chat-msg--deleted .chat-msg__body {
    color: var(--ink-4);
    font-style: italic;
}
.chat-msg__delete {
    background: none;
    border: 0;
    color: var(--ink-4);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    padding: 0;
    margin-left: 6px;
}
.chat-msg:hover .chat-msg__delete { opacity: 1; }
.chat-msg__delete:hover { color: var(--danger); }

/* ---------- Chat hub (sidebar / main / events rail) ---------- */
.chat-hub {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: stretch;
    min-height: calc(100vh - 220px);
}
.chat-hub__side, .chat-hub__events {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.chat-hub__main {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.chat-hub__main .chat-shell {
    border: 0;
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.chat-hub__main .chat-list {
    max-height: none;
    flex: 1;
}
.chat-hub__side-head {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
}
.chat-hub__side-head h2 {
    margin: 0;
    font-size: 14px;
    font-family: var(--mono, monospace);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--ink-3);
    font-weight: 600;
}
.chat-hub__clubs {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}
.chat-hub__club {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--ink-1);
    text-decoration: none;
    transition: background 0.1s;
    margin-bottom: 2px;
}
.chat-hub__club:hover { background: var(--surface-2); }
.chat-hub__club.is-active {
    background: rgba(var(--primary-rgb), 0.10);
    color: var(--primary-600, var(--primary));
}
.chat-hub__club-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.chat-hub__club-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.chat-hub__club-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-hub__club-sub {
    font-size: 11px;
    font-family: var(--mono, monospace);
    color: var(--ink-3);
}
.chat-hub__club.is-active .chat-hub__club-sub { color: rgba(var(--primary-rgb), 0.8); }

.chat-hub__events-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    overflow-y: auto;
    flex: 1;
}
.chat-hub__event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-1);
    text-decoration: none;
    transition: background 0.1s;
}
.chat-hub__event:hover { background: var(--surface-2); }
.chat-hub__event-date {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
}
.chat-hub__event-day {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-1);
    padding: 4px 0 0;
    line-height: 1;
    font-family: var(--mono, monospace);
}
.chat-hub__event-mo {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    background: var(--surface-3);
    padding: 2px 0;
    font-family: var(--mono, monospace);
}
.chat-hub__event-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.chat-hub__event-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.chat-hub__event-sub {
    font-size: 11px;
    color: var(--ink-3);
}
.chat-hub__empty {
    padding: 60px 30px;
    text-align: center;
    color: var(--ink-3);
}
.chat-hub__empty h3 { color: var(--ink-2); margin-bottom: 8px; }
.chat-hub__empty-hint { padding: 24px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* Tablet — collapse events rail to bottom */
@media (max-width: 1100px) {
    .chat-hub {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-rows: 1fr auto;
    }
    .chat-hub__events {
        grid-column: span 2;
        max-height: 200px;
    }
    .chat-hub__events-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
    }
    .chat-hub__events-list li { flex-shrink: 0; min-width: 220px; }
}

/* Mobile — stack everything */
@media (max-width: 720px) {
    .chat-hub {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .chat-hub__side {
        max-height: 56px;
        overflow: hidden;
    }
    .chat-hub__side:hover, .chat-hub__side:focus-within {
        max-height: 320px;
    }
    .chat-hub__clubs {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }
    .chat-hub__clubs li { flex-shrink: 0; }
    .chat-hub__club { min-width: 200px; }
    .chat-hub__events { max-height: 240px; }
}

/* ---------- Language menu (dropdown) ---------- */
.lang-menu {
    position: relative;
}
.lang-menu__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    font-family: var(--mono, monospace);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
}
.lang-menu__btn::-webkit-details-marker { display: none; }
.lang-menu__btn:hover { border-color: var(--primary); background: var(--surface-2); }
.lang-menu[open] .lang-menu__btn {
    border-color: var(--primary);
    background: var(--surface-2);
}
.lang-menu__caret { font-size: 10px; transition: transform 0.15s; }
.lang-menu[open] .lang-menu__caret { transform: rotate(180deg); }
.lang-menu__list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-3);
    min-width: 160px;
    z-index: 30;
    animation: lang-menu-pop 0.12s ease-out;
}
.lang-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink-1);
    font-family: var(--sans);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.1s;
}
.lang-menu__item:hover { background: var(--surface-2); }
.lang-menu__item.is-active { background: rgba(var(--primary-rgb), 0.10); color: var(--primary-600, var(--primary)); font-weight: 600; }
.lang-menu__flag {
    font-family: var(--mono, monospace);
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-3);
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
}
.lang-menu__item.is-active .lang-menu__flag {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-600, var(--primary));
}
.lang-menu__check { margin-left: auto; color: var(--primary); font-weight: 700; }
@keyframes lang-menu-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ---------- @mention rendering ---------- */
.chat-mention {
    display: inline;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(var(--primary-rgb), 0.10);
    color: var(--primary-600, var(--primary));
    font-weight: 500;
    text-decoration: none;
}

/* ---------- @mention autocomplete dropdown ---------- */
.chat-mention-box {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-3);
    z-index: 30;
    overflow: hidden;
    animation: chat-mention-pop 0.12s ease-out;
}
.chat-mention-box__row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink-1);
    transition: background 0.1s;
}
.chat-mention-box__row:last-child { border-bottom: 0; }
.chat-mention-box__row.is-active,
.chat-mention-box__row:hover {
    background: rgba(var(--primary-rgb), 0.08);
}
.chat-mention-box__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--surface-2);
    background-size: cover;
    background-position: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chat-mention-box__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-1);
}
.chat-mention-box__handle {
    margin-left: auto;
    font-family: var(--mono, monospace);
    font-size: 12px;
    color: var(--ink-3);
}
@keyframes chat-mention-pop {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-form { position: relative; } /* anchor for the autocomplete box */

/* ---------- Event comments (chat-style under each event) ---------- */
.event-comments {
    transition: opacity 0.2s, filter 0.2s;
}
.event-comments--archived {
    opacity: 0.55;
    filter: grayscale(0.6);
    /* Pushed to bottom via order:last on flex parents — but here we're
       in a simple section, so visual fade is enough. */
}
.event-comments--archived .event-comment__avatar {
    filter: grayscale(0.8);
}
.event-comment__avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--surface-2);
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    border: 1px solid var(--line);
}
.event-comment__avatar--fb {
    background-color: var(--primary-50);
    color: var(--primary-600, var(--primary));
}
.event-comment--deleted {
    opacity: 0.7;
}
.event-comment-form textarea:focus {
    outline: 2px solid rgba(var(--primary-rgb), 0.25);
    border-radius: 8px;
}

/* ---------- Read receipts ---------- */
.chat-msg__seen {
    margin-top: 6px;
    font-family: var(--mono, monospace);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    text-align: right;
}

/* ---------- Edit affordance ---------- */
.chat-msg__edit {
    background: transparent;
    border: 0;
    color: var(--ink-3);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    padding: 0;
    margin-left: 4px;
}
.chat-msg:hover .chat-msg__edit { opacity: 1; }
.chat-msg__edit:hover { color: var(--primary); }
@media (hover: none) { .chat-msg__edit { opacity: 1; } }

.chat-msg__edited {
    margin-left: 4px;
    font-size: 11px;
    font-style: italic;
    color: var(--ink-3);
    font-weight: 400;
}

.chat-msg__editor {
    width: 100%;
    min-height: 36px;
    resize: vertical;
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-1);
    background: var(--surface);
    margin: 4px 0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* ---------- Message reactions ---------- */
.chat-react {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
    position: relative;
}
.chat-react__bubble {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-2);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    user-select: none;
}
.chat-react__bubble:hover {
    background: var(--surface-3);
    border-color: var(--line-2);
}
.chat-react__bubble:active { transform: scale(0.95); }
.chat-react__bubble.is-mine {
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.35);
    color: var(--primary-600, var(--primary));
}
.chat-react__emoji { font-size: 14px; line-height: 1; }
.chat-react__count {
    font-family: var(--mono, monospace);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.chat-react__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: transparent;
    border: 1px dashed var(--line-2);
    color: var(--ink-3);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
    padding: 0;
}
.chat-msg:hover .chat-react__add,
.chat-react__add:focus-visible { opacity: 1; }
.chat-react__add:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}
.chat-react__picker {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-2);
    z-index: 20;
    animation: chat-react-pop 0.12s ease-out;
}
.chat-react__picker button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.1s, transform 0.1s;
}
.chat-react__picker button:hover {
    background: var(--surface-2);
    transform: scale(1.15);
}
@keyframes chat-react-pop {
    from { opacity: 0; transform: translateY(4px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* On mobile, always show the "+" button — no hover state */
@media (hover: none) {
    .chat-react__add { opacity: 1; }
}

.chat-form {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    /* Sticky to the shell's bottom — combined with .chat-shell's
       fixed height and .chat-list's flex:1, this is the classic
       "pin composer / let history scroll up" pattern. Opaque
       background prevents messages bleeding through translucent
       browser sticky regions on iOS Safari. */
    position: sticky;
    bottom: 0;
    background: var(--surface);
    z-index: 2;
    flex-shrink: 0;
}
.chat-form textarea {
    flex: 1 1 100%;
    min-width: 0;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    padding: 11px 14px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: var(--r-2);
}
.chat-form button { white-space: nowrap; flex-shrink: 0; margin-left: auto; }
.chat-form__count {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--ink-4);
    align-self: center;
    min-width: 60px;
    text-align: right;
}
.chat-form__count.is-near { color: var(--warning); }
.chat-form__count.is-over { color: var(--danger); }

.chat-gate {
    padding: 56px 24px;
    text-align: center;
    color: var(--ink-3);
    font-size: 14px;
}
.chat-gate p { margin: 0 0 14px; }

/* ================================================================
 * Homepage richer sections
 * ================================================================ */

/* Why-Flanor — Bento grid layout with asymmetric sizing */
.why-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}
/* Bento: card 1 spans full first row left col, card 4 spans bottom right */
.why-card:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.why-card:nth-child(2) { grid-column: 2; grid-row: 1; }
.why-card:nth-child(3) { grid-column: 3; grid-row: 1; }
.why-card:nth-child(4) { grid-column: 2 / 4; grid-row: 2; }

@media (max-width: 900px) {
    .why-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .why-card:nth-child(1) { grid-column: 1 / 3; grid-row: auto; }
    .why-card:nth-child(2) { grid-column: 1; grid-row: auto; }
    .why-card:nth-child(3) { grid-column: 2; grid-row: auto; }
    .why-card:nth-child(4) { grid-column: 1 / 3; grid-row: auto; }
}
@media (max-width: 540px) {
    .why-grid { grid-template-columns: 1fr; }
    .why-card:nth-child(n) { grid-column: 1; grid-row: auto; }
}

.why-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: 32px 28px;
    transition:
        transform var(--dur-base) var(--ease-back),
        border-color var(--dur-base),
        box-shadow var(--dur-base) var(--ease-smooth);
    box-shadow: var(--shadow-1);
    position: relative;
    overflow: hidden;
}
/* Ambient gradient corner glow — appears on hover */
.why-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 100%, rgba(var(--primary-rgb), 0.08), transparent 55%);
    opacity: 0;
    transition: opacity var(--dur-slow);
    pointer-events: none;
}
.why-card--accent::before {
    background: radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 55%);
}
.why-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: var(--shadow-3);
}
.why-card:hover::before { opacity: 1; }
.why-card--accent:hover { border-color: rgba(var(--accent-rgb), 0.35); }

.why-card__icon {
    width: 52px; height: 52px;
    border-radius: var(--r-2);
    background: var(--primary-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
    transition: transform var(--dur-slow) var(--ease-back);
}
.why-card:hover .why-card__icon { transform: scale(1.08) rotate(-3deg); }
.why-card--accent .why-card__icon {
    background: var(--accent-50);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.15);
}
/* First card (tall bento) gets special large icon treatment */
.why-card:nth-child(1) { display: flex; flex-direction: column; justify-content: flex-end; }
.why-card:nth-child(1) .why-card__icon { width: 64px; height: 64px; font-size: 30px; margin-bottom: 24px; }
.why-card:nth-child(1) h3 { font-size: 22px; }

.why-card h3 {
    font-size: 18px;
    margin: 0 0 10px;
    color: var(--ink-1);
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.why-card p { color: var(--ink-2); margin: 0; font-size: 14px; line-height: 1.6; }

/* Testimonials — premium quote cards with glass effect */
.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: 32px 28px 28px;
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition:
        transform var(--dur-base) var(--ease-back),
        box-shadow var(--dur-base) var(--ease-smooth),
        border-color var(--dur-base);
}
/* Gradient accent in corner */
.testimonial-card::before {
    content: “”;
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle at 100% 0%, rgba(var(--primary-rgb), 0.08), transparent 70%);
    pointer-events: none;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-3);
    border-color: rgba(var(--primary-rgb), 0.25);
}

[data-theme=”dark”] .testimonial-card {
    background: var(--surface);
    border-color: var(--line-2);
}

.testimonial-card__quote {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-1);
    margin: 0 0 24px;
    flex: 1;
    position: relative;
    padding-top: 4px;
}
.testimonial-card__quote::before {
    content: “\201C”;
    font-family: var(--display);
    font-size: 72px;
    line-height: 0.75;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 50%, var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 10px;
}
.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.testimonial-card__avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    flex-shrink: 0;
    border: 2px solid var(--surface-3);
}
.testimonial-card__avatar-fallback {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-50), rgba(var(--primary-rgb), 0.15));
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px solid rgba(var(--primary-rgb), 0.20);
}
.testimonial-card__name {
    font-family: var(--sans);
    font-weight: 600;
    color: var(--ink-1);
    font-size: 14px;
}
.testimonial-card__meta {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 2px;
}

/* Community moments — bento photo grid */
.moments-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 160px;
    gap: 10px;
}
@media (max-width: 900px) { .moments-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 140px; } }
@media (max-width: 540px) { .moments-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; } }
.moments-grid > div {
    background-size: cover;
    background-position: center;
    border-radius: var(--r-3);
    background-color: var(--surface-2);
    transition:
        transform var(--dur-base) var(--ease-back),
        filter var(--dur-slow);
    overflow: hidden;
    position: relative;
}
.moments-grid > div::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.20) 100%);
    opacity: 0;
    transition: opacity var(--dur-slow);
    pointer-events: none;
}
.moments-grid > div:hover { transform: scale(1.03); }
.moments-grid > div:hover::after { opacity: 1; }
.moments-grid > div:nth-child(1),
.moments-grid > div:nth-child(4) { grid-column: span 2; grid-row: span 2; }
@media (max-width: 900px) {
    .moments-grid > div:nth-child(1),
    .moments-grid > div:nth-child(4) { grid-column: span 1; grid-row: span 1; }
}

/* FAQ — premium disclosure list */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.faq-item[open] {
    border-color: rgba(var(--primary-rgb), 0.30);
    box-shadow: var(--shadow-2);
}
.faq-item summary {
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    font-family: var(--sans);
    font-weight: 600;
    color: var(--ink-1);
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color var(--dur-fast), background var(--dur-fast);
    border-radius: var(--r-3);
    user-select: none;
}
.faq-item summary:hover { color: var(--primary); background: var(--surface-2); }
.faq-item[open] summary { color: var(--primary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-50);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%230EA5A4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--dur-base) var(--ease-back);
}
[data-theme="dark"] .faq-item summary::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%237CE85B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p {
    padding: 4px 24px 22px;
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.65;
}

/* Big CTA banner — full-width image background with mesh overlay */
.big-cta {
    position: relative;
    border-radius: var(--r-3);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    padding: 96px 32px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-3);
}
.big-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.70) 100%),
        radial-gradient(ellipse 70% 80% at 50% 120%, rgba(var(--primary-rgb), 0.50), transparent 65%),
        radial-gradient(ellipse 50% 50% at 20% -10%, rgba(var(--accent-rgb), 0.25), transparent 60%);
}
/* Dot texture overlay */
.big-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.big-cta > * { position: relative; z-index: 1; }
.big-cta h2 {
    color: #fff;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(30px, 5vw, 58px);
    letter-spacing: -0.03em;
    margin: 0 0 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.big-cta p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.big-cta .btn {
    background: rgba(255, 255, 255, 0.96);
    color: #0F172A;
    border-color: transparent;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.big-cta .btn:hover {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-3), var(--glow-primary);
}

/* ---------- Demo-mode banner ----------
   Sticks above the entire UI (z-index 60 > nav 50). Amber palette
   to read as a soft warning, not an error. The blinking dot is a
   subtle "live" cue so the strip reads as an active mode indicator
   rather than dismissable chrome. */
.demo-banner {
    position: relative;
    z-index: 60;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.10));
    border-bottom: 1px solid rgba(245, 158, 11, 0.45);
    color: var(--ink-1);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.55;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    flex-wrap: wrap;
}
.demo-banner__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(245, 158, 11);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    animation: demo-banner-pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes demo-banner-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(245, 158, 11, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0   rgba(245, 158, 11, 0); }
}
.demo-banner__msg strong { font-weight: 700; }
.demo-banner__msg em     { font-style: normal; padding: 1px 6px; border-radius: 4px;
                           background: rgba(245, 158, 11, 0.25); font-size: 11px;
                           text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 540px) {
    .demo-banner { font-size: 12px; padding: 8px 12px; }
}

/* ---------- License nag banner ----------
   Shown to admins only when the install is not currently in "valid"
   or "not_required" state. Sober palette (slate, no pulse) — this
   is a fix-this-thing notice, not a live mode like the demo strip. */
.license-banner {
    position: relative;
    z-index: 60;
    background: rgba(99, 102, 241, 0.10);
    border-bottom: 1px solid rgba(99, 102, 241, 0.40);
    color: var(--ink-1);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    flex-wrap: wrap;
}
.license-banner__msg { color: var(--ink-1); }
.license-banner__cta {
    color: rgb(129, 140, 248);
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
}
.license-banner__cta:hover { text-decoration: underline; }
@media (max-width: 540px) {
    .license-banner { font-size: 12px; padding: 8px 12px; }
}

/* =====================================================================
   Utility helpers
   ===================================================================== */
/* .hidden is used on <tr> rows for accordion-style expand/collapse.
   !important overrides the browser's default display:table-row so the
   row actually disappears when the class is present. */
.hidden { display: none !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex  { display: flex  !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
