/* ============================================
   NeuralCHAI — Neural Center for Human and Artificial Intelligence
   Editorial-Style Landing Page Styles
   SEO-Optimized, Performance-First CSS
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors: Warm, sophisticated dark palette */
    --bg-primary: #0c0c0e;
    --bg-secondary: #141418;
    --bg-tertiary: #1a1a20;
    --bg-card: #18181e;

    --text-primary: #f5f0e8;
    --text-secondary: #b8b0a4;
    --text-muted: #7a7268;
    --text-inverse: #0c0c0e;

    --accent-warm: #d4a853;
    --accent-warm-light: #e8c87a;
    --accent-cool: #6b9e8a;
    --accent-cool-light: #8fc4ae;
    --accent-rose: #c47a7a;

    --border-subtle: rgba(245, 240, 232, 0.06);
    --border-medium: rgba(245, 240, 232, 0.12);

    /* Typography Scale */
    --font-display: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.65vw, 1.375rem);
    --text-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --text-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --text-3xl: clamp(2.5rem, 2rem + 3vw, 5rem);
    --text-4xl: clamp(3.5rem, 3rem + 4vw, 7rem);

    /* Spacing */
    --space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
    --space-sm: clamp(1rem, 0.8rem + 1vw, 2rem);
    --space-md: clamp(2rem, 1.5rem + 2.5vw, 4rem);
    --space-lg: clamp(3rem, 2.5rem + 3vw, 6rem);
    --space-xl: clamp(4rem, 3rem + 5vw, 10rem);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --max-width: 1400px;
    --content-width: 1200px;
    --sidebar-width: 280px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    color: var(--text-secondary);
    max-width: 65ch;
}

.text-mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-warm) 0%, var(--accent-cool) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-warm);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-xs) 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-base), backdrop-filter var(--transition-base);
}

.site-nav.scrolled {
    background: rgba(12, 12, 14, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.nav-logo span {
    color: var(--accent-warm);
    font-weight: 400;
}

/* logo image inside nav */
.nav-logo img {
    display: inline-block;
    vertical-align: middle;
    height: 68px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-warm);
    transition: width var(--transition-base);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent-warm);
    color: var(--text-inverse) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all var(--transition-base);
}

.nav-cta:hover {
    background: var(--accent-warm-light);
    transform: translateY(-1px);
}

.nav-cta::after {
    display: none !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   HERO — Editorial Magazine Style
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(212, 168, 83, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(107, 158, 138, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--space-xl) + 60px) 5% var(--space-xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-kicker {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent-warm);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-kicker::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--accent-warm);
}

.hero h1 {
    font-size: var(--text-4xl);
    line-height: 0.95;
    margin-bottom: var(--space-sm);
    max-width: 12ch;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent-warm);
}

.hero-lead {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 50ch;
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--accent-warm);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--accent-warm-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-ghost:hover {
    border-color: var(--accent-warm);
    color: var(--accent-warm);
}

/* Hero Stats Bar */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.stat-item {
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: calc(-1 * var(--space-md) / 2);
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--border-subtle);
}

.stat-number {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-number span {
    font-size: 0.5em;
    color: var(--accent-warm);
    vertical-align: super;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

/* Hero Visual — Abstract geometric composition */
.hero-visual {
    position: relative;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hero-visual-inner {
    position: relative;
    width: 112%;
    max-width: 560px;
    aspect-ratio: 1;
    margin-left: auto;
    flex-shrink: 0;
}

.hero-video-frame {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.hero-logo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   EDITORIAL SECTION — Asymmetric Layout
   ============================================ */
.editorial-section {
    padding: var(--space-xl) 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.editorial-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: end;
    margin-bottom: var(--space-lg);
}

.editorial-header h2 {
    max-width: 15ch;
}

.editorial-header p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    max-width: 45ch;
    justify-self: end;
}

/* Feature Grid — Bento Box Style */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-warm), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.bento-item:hover::before {
    opacity: 0.5;
}

.bento-item:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.bento-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0.08;
    line-height: 1;
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
}

.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border-subtle);
}

.bento-item h3 {
    font-size: var(--text-lg);
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.bento-item p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

.bento-tag {
    display: inline-block;
    margin-top: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-warm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    background: rgba(212, 168, 83, 0.08);
    border-radius: 4px;
    margin-top: auto;
    align-self: flex-start;
}

/* ============================================
   EVENTS — Magazine Spread Layout
   ============================================ */
.events-section {
    background: var(--bg-secondary);
    padding: var(--space-xl) 0;
}

.events-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.events-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.events-header h2 {
    margin-bottom: var(--space-xs);
}

.events-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-warm);
}

/* Event Cards — Magazine style */
.events-magazine {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
}

.events-current-label {
    width: fit-content;
    margin: 0 auto var(--space-md);
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--accent-warm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-featured {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.event-featured-image {
    height: 300px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, #1e1e28 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, var(--bg-card) 100%);
    z-index: 1;
}

.event-orbit {
    position: relative;
    width: 274px;
    aspect-ratio: 1;
    z-index: 2;
    transform: translateY(12px);
}

.event-orbit-ring {
    position: absolute;
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    animation: event-orbit-rotate 20s linear infinite;
}

.event-orbit-ring::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-warm);
    box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.12), 0 0 16px rgba(212, 168, 83, 0.85);
}

.event-orbit-ring:nth-child(1) {
    inset: 0;
}

.event-orbit-ring:nth-child(2) {
    inset: 12%;
    border-color: var(--accent-warm);
    opacity: 0.65;
    animation-direction: reverse;
    animation-duration: 15s;
}

.event-orbit-ring:nth-child(2)::after {
    top: auto;
    bottom: -4px;
    background: var(--accent-cool);
    box-shadow: 0 0 0 4px rgba(107, 158, 138, 0.12), 0 0 16px rgba(107, 158, 138, 0.85);
}

.event-orbit-ring:nth-child(3) {
    inset: 25%;
    border-color: var(--accent-cool);
    opacity: 0.55;
    animation-duration: 10s;
}

.event-orbit-ring:nth-child(3)::after {
    top: 50%;
    left: auto;
    right: -4px;
    background: var(--accent-rose);
    box-shadow: 0 0 0 4px rgba(201, 111, 111, 0.12), 0 0 16px rgba(201, 111, 111, 0.85);
}

.event-featured-image .event-icon {
    position: absolute;
    inset: 31%;
    display: grid;
    place-items: center;
    z-index: 2;
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    background: rgba(12, 12, 14, 0.86);
    box-shadow: 0 0 34px rgba(212, 168, 83, 0.18);
    font-size: 3rem;
    color: var(--accent-warm);
    animation: event-core-pulse 2.6s ease-in-out infinite;
}

@keyframes event-orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes event-core-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.event-featured-content {
    padding: var(--space-md);
    flex: 1;
}

.event-meta-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.event-category {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-warm);
    padding: 0.4rem 0.9rem;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 4px;
}

.event-date {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-cool);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-featured h3 {
    font-size: var(--text-xl);
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.event-featured p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: 1.5rem;
}

.event-speakers {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.speaker-stack {
    display: flex;
}

.speaker-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-rose));
    border: 2px solid var(--bg-card);
    margin-left: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-inverse);
}

.speaker-avatar:first-child {
    margin-left: 0;
}

.speaker-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Event List (Sidebar) */
.event-details {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.event-details > .text-mono {
    color: var(--accent-warm);
}

.event-details dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.event-details dl div {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.event-details dt {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
}

.event-details dd {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-primary);
}

.event-details-note {
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.event-details .btn {
    align-self: flex-start;
}

.event-gallery {
    margin-top: var(--space-xl);
}

.event-gallery-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-lg);
}

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto var(--space-lg);
    max-width: 900px;
}

.gallery-tab {
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gallery-tab:hover,
.gallery-tab.active {
    color: var(--text-inverse);
    background: var(--accent-warm);
    border-color: var(--accent-warm);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.gallery-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    overflow: hidden;
    transition: opacity 0.35s ease, transform 0.35s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card[data-category="workshop"] { grid-column: span 6; }
.gallery-card[data-category="live-session"],
.gallery-card[data-category="tech-talk"] { grid-column: span 3; }
.gallery-card[data-category="networking"],
.gallery-card[data-category="panel"],
.gallery-card[data-category="group"] { grid-column: span 4; }

.gallery-grid.is-filtered .gallery-card:not(.is-hidden) {
    grid-column: 2 / -2;
}

.gallery-card.is-hidden {
    display: none;
}

.gallery-photos {
    display: grid;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
}

.gallery-photos-1 {
    grid-template-columns: 1fr;
}

.gallery-photos-2 {
    grid-template-columns: 1fr 1fr;
}

.gallery-photos-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.gallery-photos-3 img:first-child {
    grid-column: 1 / -1;
}

.gallery-photos img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    cursor: zoom-in;
    transition: transform 240ms ease;
}

.gallery-photos-1 img {
    height: 304px;
}

.gallery-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.gallery-card[data-category="workshop"] .gallery-photos img {
    height: 164px;
}

.gallery-grid.is-filtered .gallery-photos-1 img,
.gallery-grid.is-filtered .gallery-card[data-category="workshop"] .gallery-photos img,
.gallery-grid.is-filtered .gallery-photos img {
    height: 240px;
}

/* indicate zoomable images */
.gallery-card img { cursor: zoom-in; transition: transform 240ms ease; }
.gallery-card img:active { transform: scale(0.995); }

/* ===== Lightbox / Modal for image zoom ===== */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6,6,8,0.65);
    z-index: 2000;
    padding: 2vh 2vw;
}
.lightbox.open { display: flex; }
.lightbox-backdrop {
    position: absolute;
    inset: 0;
}
.lightbox-content {
    position: relative;
    max-width: 96vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2010;
}
.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 28px 80px rgba(4,4,8,0.6);
    transform: scale(0.96);
    opacity: 0.98;
    transition: transform 320ms cubic-bezier(.2,.9,.2,1), opacity 320ms ease;
}
.lightbox.open .lightbox-img { transform: scale(1); opacity: 1; }

/* close button */
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2020;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}


.gallery-card figcaption {
    padding: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
}

/* ============================================
   ECOSYSTEM — Partner Showcase
   ============================================ */
.ecosystem-section {
    padding: var(--space-xl) 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ====== UI Motion & Smoothness Enhancements ====== */
html {
    scroll-behavior: smooth;
}

/* sensible defaults for reduce-motion users */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* scroll reveal base state */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms cubic-bezier(.2,.9,.2,1), transform 520ms cubic-bezier(.2,.9,.2,1);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* hero visual subtle rotation */
.hero-visual-inner.rotate {
    animation: ring-rotate 30s linear infinite;
}

@keyframes ring-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* visual-dot orbit / pulse fallback */
@keyframes dot-orbit {
    0% { transform: translate(0,0) scale(1); opacity: 0.95 }
    50% { transform: translate(6px,-4px) scale(1.05); opacity: 1 }
    100% { transform: translate(0,0) scale(1); opacity: 0.95 }
}

.visual-dot {
    transition: transform 320ms ease, opacity 320ms ease;
}

/* hero center pulse */
.visual-center {
    animation: center-pulse 3s ease-in-out infinite;
}

@keyframes center-pulse {
    0% { transform: scale(1); opacity: 1 }
    50% { transform: scale(1.06); opacity: 0.92 }
    100% { transform: scale(1); opacity: 1 }
}

/* gallery card hover / float */
.gallery-card {
    transition: transform 360ms cubic-bezier(.2,.9,.2,1), box-shadow 360ms ease;
}
.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 18px 40px rgba(6,6,10,0.45);
}

/* buttons and CTA smoothing */
.btn {
    transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.btn:active { transform: translateY(1px) scale(0.997); }

/* polished nav transition */
.site-nav {
    transition: background-color 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}
.site-nav.scrolled { box-shadow: 0 6px 18px rgba(2,2,6,0.45); }


.ecosystem-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.ecosystem-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-md);
    transition: all var(--transition-base);
    position: relative;
}

.ecosystem-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ecosystem-card .card-index {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0.05;
    line-height: 1;
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
}

.ecosystem-card h3 {
    font-size: var(--text-lg);
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-top: var(--space-sm);
}

.ecosystem-card p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.ecosystem-card ul {
    list-style: none;
}

.ecosystem-card ul li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ecosystem-card ul li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cool);
    flex-shrink: 0;
}

/* ============================================
   TESTIMONIALS — Quote Cards
   ============================================ */
.testimonials-section {
    background: var(--bg-secondary);
    padding: var(--space-xl) 5%;
}

.testimonials-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.testimonials-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-md);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-family: var(--font-display);
    font-size: 6rem;
    color: var(--accent-warm);
    opacity: 0.15;
    line-height: 1;
    position: absolute;
    top: -0.5rem;
    left: var(--space-sm);
}

.testimonial-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-rose));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-inverse);
}

.author-info h5 {
    font-size: var(--text-sm);
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.author-info span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ============================================
   CTA — Final Conversion Section
   ============================================ */
.cta-section {
    padding: var(--space-xl) 5%;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: var(--space-xl);
}

.cta-box h2 {
    margin-bottom: var(--space-sm);
}

.cta-box p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    margin: 0 auto var(--space-md);
    max-width: 50ch;
}

.cta-checklist {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.cta-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.cta-check::before {
    content: '✓';
    color: var(--accent-cool);
    font-weight: 700;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-lg) 5% var(--space-md);
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand .nav-logo {
    margin-bottom: var(--space-sm);
    display: inline-block;
}

.footer-brand .nav-logo img {
    height: 78px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.footer-brand p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 30ch;
    line-height: 1.7;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--accent-warm);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-sm);
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.social-link:hover {
    background: var(--accent-warm);
    color: var(--text-inverse);
    border-color: var(--accent-warm);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .hero-visual {
        display: none;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-card[data-category] {
        grid-column: span 6;
    }

    .gallery-grid.is-filtered .gallery-card:not(.is-hidden) {
        grid-column: 1 / -1;
    }

    .events-magazine {
        grid-template-columns: 1fr;
    }

    .ecosystem-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--space-md);
        gap: 1rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .editorial-header {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .editorial-header p {
        justify-self: start;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item {
        min-height: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-card[data-category],
    .gallery-grid.is-filtered .gallery-card:not(.is-hidden) {
        grid-column: 1;
    }

    .gallery-photos img,
    .gallery-card[data-category="workshop"] .gallery-photos img,
    .gallery-grid.is-filtered .gallery-photos img {
        height: 130px;
    }

    .gallery-photos-1 img,
    .gallery-grid.is-filtered .gallery-photos-1 img {
        height: 260px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .ecosystem-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .cta-checklist {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-warm);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-nav,
    .hero-visual,
    .btn,
    .mobile-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
