/* ===================================================
   rational.group — Pop-Art Gold-Black Gallery
   =================================================== */

/* --- CSS Custom Properties --- */
:root {
    --luxury-gold: #C8A840;
    --warm-dark: #3A3828;
    --muted-gold: #8A7830;
    --black-canvas: #0A0A08;
    --gallery-white: #FFFDF8;
    --botanical-green: #508848;
    --cursor-glow: rgba(200, 168, 64, 0.05);
    --section-divider: #C8A840;

    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-data: 'JetBrains Mono', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: var(--warm-dark);
    background-color: var(--gallery-white);
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: rgba(200, 168, 64, 0.25);
    color: var(--black-canvas);
}

/* --- Cursor-Follow Gold Spotlight --- */
#cursor-spotlight {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle 180px, rgba(200, 168, 64, 0.05), transparent);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
    will-change: transform;
}

body:hover #cursor-spotlight {
    opacity: 1;
}

/* --- Minimal Navigation --- */
#minimal-nav {
    position: fixed;
    top: 28px;
    left: 28px;
    z-index: 1000;
}

#nav-icon {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 1001;
}

#nav-icon span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--luxury-gold);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                background-color 0.3s ease;
    transform-origin: center;
}

#nav-icon:hover span {
    background-color: var(--black-canvas);
}

/* Nav menu */
#nav-menu {
    position: absolute;
    top: 44px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    padding: 8px 0;
}

#nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-link {
    font-family: var(--font-data);
    font-weight: 500;
    font-size: 0.65rem;
    color: var(--muted-gold);
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 8px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--luxury-gold);
}

/* --- Data-Viz Background Layer --- */
.dataviz-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.dataviz-scatter {
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.dataviz-scatter circle,
.dataviz-scatter rect {
    fill: var(--luxury-gold);
}

.dataviz-scatter path,
.dataviz-scatter line {
    stroke: var(--luxury-gold);
}

/* --- Main Gallery --- */
#gallery {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Gallery Sections --- */
.gallery-section {
    border-top: 1px solid var(--section-divider);
    padding: 80px 0;
    position: relative;
}

.gallery-section:first-child {
    border-top: none;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.hero-eyebrow {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

/* --- Display Headings --- */
.display-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    color: var(--luxury-gold);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

#hero-title {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 800;
    transition: font-weight 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease 0.1s forwards;
}

.gold-dot {
    color: var(--luxury-gold);
    display: inline;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--warm-dark);
    max-width: 500px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.hero-data-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 0.8s ease 0.7s forwards;
}

/* --- Hero Scroll Indicator --- */
.hero-scroll-indicator {
    margin-top: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--luxury-gold), transparent);
    margin: 0 auto;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.3); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Data Labels --- */
.data-label {
    font-family: var(--font-data);
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--muted-gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.data-label-divider {
    font-family: var(--font-data);
    color: var(--luxury-gold);
    opacity: 0.4;
}

.data-label-separator {
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: var(--luxury-gold);
    opacity: 0.3;
    vertical-align: middle;
    margin: 0 12px;
}

/* --- Body Text --- */
.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: var(--warm-dark);
    margin-bottom: 20px;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* --- Section Content --- */
.section-content {
    max-width: 100%;
}

.section-heading {
    margin-bottom: 32px;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
}

/* --- Data Callout --- */
.data-callout {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid rgba(200, 168, 64, 0.2);
    border-bottom: 1px solid rgba(200, 168, 64, 0.2);
}

/* --- Floral Motifs --- */
.floral-motif {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    opacity: 0.05;
    transition: opacity 0.6s ease;
}

.floral-svg {
    width: 200px;
    height: auto;
}

.floral-svg .leaf {
    fill: var(--botanical-green);
}

.floral-svg .flower-center {
    fill: var(--luxury-gold);
}

.floral-svg .petal {
    fill: var(--luxury-gold);
    opacity: 0.7;
}

/* --- Analytics Grid --- */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.analytics-card {
    background: rgba(200, 168, 64, 0.03);
    border: 1px solid rgba(200, 168, 64, 0.15);
    padding: 24px 16px 20px;
    text-align: center;
    transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.analytics-card:hover {
    border-color: var(--luxury-gold);
    background: rgba(200, 168, 64, 0.06);
    box-shadow: 0 0 30px rgba(200, 168, 64, 0.1);
    transform: translateY(-2px);
}

.card-chart {
    margin-bottom: 16px;
}

.chart-svg {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.chart-svg .bar {
    fill: var(--luxury-gold);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.analytics-card:hover .chart-svg .bar {
    opacity: 1;
}

.chart-svg .bar-1 { opacity: 0.5; }
.chart-svg .bar-2 { opacity: 0.8; }
.chart-svg .bar-3 { opacity: 0.6; }
.chart-svg .bar-4 { opacity: 0.9; }
.chart-svg .bar-5 { opacity: 0.7; }

.chart-svg .scatter-dot {
    fill: var(--luxury-gold);
    opacity: 0.65;
    transition: opacity 0.3s ease, r 0.3s ease;
}

.analytics-card:hover .chart-svg .scatter-dot {
    opacity: 1;
}

.chart-svg .trend-line {
    stroke: var(--luxury-gold);
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
    opacity: 0.5;
}

.chart-svg .arc-segment {
    stroke-width: 6;
    transition: stroke-width 0.3s ease;
}

.arc-segment.arc-1 { stroke: var(--luxury-gold); }
.arc-segment.arc-2 { stroke: var(--muted-gold); }
.arc-segment.arc-3 { stroke: var(--luxury-gold); opacity: 0.5; }
.arc-segment.arc-4 { stroke: var(--muted-gold); opacity: 0.5; }

.chart-svg .arc-center {
    fill: rgba(200, 168, 64, 0.1);
    stroke: var(--luxury-gold);
    stroke-width: 1;
}

.chart-svg .arc-label {
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 500;
    fill: var(--luxury-gold);
}

/* --- Warhol-Style Repeated Motif Strip --- */
.warhol-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    margin-top: 48px;
    border: 1px solid rgba(200, 168, 64, 0.12);
    overflow: hidden;
}

.warhol-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 168, 64, 0.02);
    border-right: 1px solid rgba(200, 168, 64, 0.08);
    padding: 12px;
    transition: background 0.4s ease;
}

.warhol-cell:last-child {
    border-right: none;
}

.warhol-cell:hover {
    background: rgba(200, 168, 64, 0.06);
}

.warhol-svg {
    width: 100%;
    height: 100%;
    max-width: 60px;
    max-height: 60px;
}

.warhol-ring {
    stroke: var(--luxury-gold);
    fill: none;
    opacity: 0.6;
}

.warhol-dot {
    fill: var(--luxury-gold);
    opacity: 0.4;
}

.warhol-bar {
    fill: var(--luxury-gold);
    opacity: 0.5;
}

.warhol-scatter {
    fill: var(--luxury-gold);
    opacity: 0.6;
}

.warhol-line {
    stroke: var(--luxury-gold);
    opacity: 0.4;
}

.warhol-arc {
    opacity: 0.5;
}

.warhol-arc-1 { stroke: var(--luxury-gold); }
.warhol-arc-2 { stroke: var(--muted-gold); }
.warhol-arc-3 { stroke: var(--luxury-gold); opacity: 0.3; }

/* --- Methodology Steps --- */
.method-steps {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.method-step {
    padding-left: 48px;
    position: relative;
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.method-step.step-visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    position: absolute;
    left: 0;
    top: 4px;
    font-size: 0.85rem;
    color: var(--luxury-gold);
    letter-spacing: 0.05em;
}

.step-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--luxury-gold);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.method-step .body-text {
    font-weight: 300;
    opacity: 0.9;
}

/* Step mini-visualizations */
.step-viz {
    margin-top: 12px;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.method-step:hover .step-viz {
    opacity: 0.7;
}

.step-chart {
    width: 120px;
    height: auto;
}

.step-dot {
    fill: var(--luxury-gold);
    opacity: 0.7;
}

.step-connect {
    stroke: var(--luxury-gold);
    stroke-dasharray: 2 2;
    opacity: 0.5;
}

.step-bar {
    fill: var(--luxury-gold);
    opacity: 0.5;
}

.step-bar-peak {
    opacity: 0.8;
}

/* --- Community Stats --- */
.community-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
    padding: 32px 0;
    border-top: 1px solid rgba(200, 168, 64, 0.2);
    border-bottom: 1px solid rgba(200, 168, 64, 0.2);
}

.stat-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
}

.community-invite {
    font-weight: 300;
    font-style: italic;
    text-align: center;
    margin-top: 24px;
    opacity: 0.8;
}

/* --- Footer --- */
#gallery-footer {
    padding: 48px 0;
    text-align: center;
    border-top: 1px solid var(--section-divider);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-separator {
    display: inline-block;
    width: 20px;
    height: 1px;
    background-color: var(--luxury-gold);
    opacity: 0.4;
}

/* --- Scroll Reveal Animation --- */
.gallery-section .section-content,
.gallery-section .hero-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-section.revealed .section-content,
.gallery-section.revealed .hero-content {
    opacity: 1;
    transform: translateY(0);
}

/* --- Variable-Fluid Typography Animation --- */
.weight-shift {
    transition: font-weight 0.6s ease;
}

/* --- Gold decorative line between sections --- */
.gallery-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--luxury-gold);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.gallery-section:first-child::before {
    display: none;
}

.gallery-section.revealed::before {
    width: 100%;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #gallery {
        padding: 0 20px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .warhol-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .warhol-cell:nth-child(4),
    .warhol-cell:nth-child(5) {
        display: none;
    }

    .community-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .hero-data-label {
        flex-direction: column;
        gap: 8px;
    }

    .data-label-divider {
        display: none;
    }

    .data-callout {
        flex-direction: column;
        gap: 12px;
    }

    .data-label-separator {
        display: none;
    }

    #minimal-nav {
        top: 16px;
        left: 16px;
    }

    .gallery-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .community-stats {
        grid-template-columns: 1fr 1fr;
    }

    .method-step {
        padding-left: 36px;
    }

    .warhol-strip {
        grid-template-columns: repeat(3, 1fr);
    }
}
