/* ============================================================
   SocialDebug.Org — Styles
   Gold-on-black luxury generative art aesthetic
   ============================================================ */

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

:root {
    /* Palette */
    --obsidian: #0A0A0A;
    --deep-onyx: #141414;
    --warm-black: #1A1510;
    --burnished-gold: #D4AF37;
    --antique-gold: #C9A84C;
    --champagne: #F5E6CC;
    --soft-ivory: #F0E6D3;
    --muted-gold: #B8956A;
    --deep-amber: #8B6914;
    --white-gold: #FFFDD0;

    /* Typography sizes */
    --hero-title: clamp(2rem, 5vw, 5rem);
    --section-heading: clamp(1.5rem, 3vw, 2.5rem);
    --body-size: clamp(1rem, 1.1vw, 1.2rem);
    --accent-size: clamp(0.85rem, 1vw, 1.1rem);
}

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    background-color: var(--obsidian);
    color: var(--soft-ivory);
    font-size: var(--body-size);
    line-height: 1.85;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography Classes --- */
.playfair-italic {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
}

.cormorant-italic {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: italic;
    color: var(--antique-gold);
    font-size: var(--accent-size);
}

/* --- Panels (Full-viewport) --- */
.panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Gold Glow --- */
.panel-glow {
    position: absolute;
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.panel-glow-left {
    left: -40vw;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, transparent 70%);
}

.panel-glow-right {
    right: -40vw;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, transparent 70%);
}

.panel.is-visible .panel-glow {
    opacity: 1;
}

/* --- Curve Canvas (SVG) --- */
.curve-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.curve-canvas path {
    will-change: stroke-dashoffset, transform;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- Navigation Dots --- */
#panel-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--burnished-gold);
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.nav-dot.active {
    background-color: var(--burnished-gold);
    transform: scale(1.35);
}

.nav-dot:hover {
    background-color: var(--deep-amber);
}

/* ============================================================
   Panel 1: The Overture
   ============================================================ */
.panel-overture {
    background-color: var(--obsidian);
    flex-direction: column;
    gap: 1.5rem;
}

.overture-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.logotype {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 6rem);
    letter-spacing: 0.12em;
    color: var(--burnished-gold);
    opacity: 0;
}

.logotype .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.tagline {
    color: var(--champagne);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease 1.8s, transform 1.2s ease 1.8s;
    max-width: 600px;
    margin: 0 auto;
}

.panel-overture.is-visible .tagline {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Panel 2: The Thesis
   ============================================================ */
.panel-thesis {
    background-color: var(--obsidian);
}

.curve-field {
    opacity: 0.06;
}

.thesis-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 850px;
    padding: 0 3rem;
}

.thesis-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    color: var(--burnished-gold);
    letter-spacing: 0.04em;
    line-height: 1.35;
    margin-bottom: 2rem;
}

.thesis-headline .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.thesis-headline .char.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.progressive-block {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.8s ease-in-out, opacity 0.6s ease;
    position: relative;
}

.progressive-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--obsidian));
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.progressive-block.is-expanded {
    max-height: 300px;
    opacity: 1;
}

.progressive-block.is-expanded::after {
    opacity: 0;
}

.body-text {
    color: var(--soft-ivory);
    font-weight: 300;
    line-height: 1.85;
}

/* ============================================================
   Panel 3: The Evidence
   ============================================================ */
.panel-evidence {
    background-color: var(--deep-onyx);
}

.evidence-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    padding: 5vh 8vw;
}

.river-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#river-line {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 2.5s ease-in-out;
}

.panel-evidence.is-visible #river-line {
    stroke-dashoffset: 0;
}

.evidence-item {
    position: absolute;
    z-index: 5;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel-evidence.is-visible .evidence-item {
    opacity: 1;
    transform: translateY(0);
}

.evidence-item-1 {
    top: 10%;
    left: 12%;
    transition-delay: 0.3s;
}

.evidence-item-2 {
    top: 28%;
    right: 10%;
    max-width: 380px;
    transition-delay: 0.6s;
}

.evidence-item-3 {
    top: 50%;
    left: 18%;
    transition-delay: 0.9s;
}

.evidence-item-4 {
    top: 65%;
    right: 14%;
    max-width: 350px;
    transition-delay: 1.2s;
}

.evidence-item-5 {
    top: 82%;
    left: 25%;
    transition-delay: 1.5s;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--burnished-gold);
    letter-spacing: 0.02em;
    line-height: 1;
}

.stat-unit {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--antique-gold);
}

.stat-label {
    color: var(--muted-gold);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    margin-top: 0.3rem;
}

.pull-quote {
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    line-height: 1.6;
    letter-spacing: 0.04em;
    border: none;
    padding: 0;
    margin: 0;
}

.quote-attribution {
    color: var(--muted-gold);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

/* ============================================================
   Panel 4: The Vision
   ============================================================ */
.panel-vision {
    background-color: var(--warm-black);
}

.vision-layout {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

.vision-canvas-container {
    flex: 0 0 60%;
    position: relative;
    overflow: hidden;
}

.vision-curves {
    width: 100%;
    height: 100%;
}

.vision-text-stack {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 4rem 4rem 2rem;
    gap: 2.5rem;
}

.vision-block {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.vision-block:nth-child(1) { transition-delay: 0.2s; }
.vision-block:nth-child(2) { transition-delay: 0.5s; }
.vision-block:nth-child(3) { transition-delay: 0.8s; }

.panel-vision.is-visible .vision-block {
    opacity: 1;
    transform: translateY(0);
}

.vision-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: var(--section-heading);
    color: var(--burnished-gold);
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

/* ============================================================
   Panel 5: The Invitation
   ============================================================ */
.panel-invitation {
    background-color: var(--burnished-gold);
    flex-direction: column;
    gap: 2rem;
}

.invitation-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    padding: 0 2rem;
}

.invitation-logotype {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.12em;
    color: var(--obsidian);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel-invitation.is-visible .invitation-logotype {
    opacity: 1;
    transform: translateY(0);
}

.invitation-text {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.panel-invitation.is-visible .invitation-text {
    opacity: 1;
    transform: translateY(0);
}

.body-text-dark {
    color: var(--obsidian);
    font-weight: 300;
    font-size: clamp(1.05rem, 1.2vw, 1.25rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
}

.invitation-link {
    color: var(--obsidian);
    text-decoration: none;
    position: relative;
}

.invitation-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--obsidian);
    transition: width 0.5s ease;
}

.invitation-link:hover::after {
    width: 100%;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .vision-layout {
        flex-direction: column;
    }

    .vision-canvas-container {
        flex: 0 0 40%;
    }

    .vision-text-stack {
        flex: 0 0 60%;
        padding: 2rem;
    }

    .evidence-item {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin-bottom: 2rem;
    }

    .evidence-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 3rem 2rem;
    }

    #panel-nav {
        right: 12px;
        gap: 12px;
    }
}
