/* ============================================================
   op9.rs -- Cottagecore Warmth meets Neon-Electric Energy
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --linen-warm: #F4EDE4;
    --midnight-void: #08080F;
    --neon-coral: #FF6F61;
    --electric-violet: #7B61FF;
    --honeyed-gold: #D4A93C;
    --soft-blush: #E8C7C0;
    --chrome-silver: #C0C0C8;

    --split: 50%;
    --font-display: 'Bebas Neue', sans-serif;
    --font-warm: 'Lora', serif;
    --font-electric: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    background: var(--midnight-void);
}

/* --- Grain Overlay (shared across both worlds) --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Split Section Layout --- */
.split-section {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.split-warm {
    flex: 0 0 var(--split);
    width: var(--split);
    background: var(--linen-warm);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex-basis 0.6s ease, width 0.6s ease;
    overflow: hidden;
}

.split-electric {
    flex: 1;
    background: var(--midnight-void);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Center Divider --- */
.split-divider {
    position: relative;
    width: 2px;
    z-index: 10;
    flex-shrink: 0;
}

.divider-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--neon-coral);
    animation: pulse-divider 3s ease-in-out infinite;
}

@keyframes pulse-divider {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 8px rgba(255, 111, 97, 0.3); }
    50% { opacity: 1; box-shadow: 0 0 20px rgba(255, 111, 97, 0.6); }
}

/* --- Warm Side Overlays --- */
.warm-light-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 169, 60, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

/* --- Electric Side Scanlines --- */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(192, 192, 200, 0.02) 2px,
        rgba(192, 192, 200, 0.02) 4px
    );
}

/* --- Typography: Display --- */
.display-heading {
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 400;
    line-height: 1;
}

.warm-heading {
    color: var(--honeyed-gold);
}

.electric-heading {
    color: var(--electric-violet);
}

.section-heading {
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    margin-bottom: 1.5rem;
}

/* --- Typography: Body --- */
.body-warm {
    font-family: var(--font-warm);
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 400;
    color: var(--midnight-void);
    margin-bottom: 1rem;
}

.body-electric {
    font-family: var(--font-electric);
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 400;
    color: var(--chrome-silver);
    margin-bottom: 1rem;
}

.centered-text {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    height: 100vh;
}

.hero .split-warm,
.hero .split-electric {
    flex-basis: 50%;
    width: 50%;
}

.hero-text-warm,
.hero-text-electric {
    position: absolute;
    bottom: 33%;
    width: 100%;
    text-align: center;
}

.hero-text-warm .display-heading {
    font-size: clamp(3rem, 7vw, 7rem);
}

.hero-text-electric .display-heading {
    font-size: clamp(3rem, 7vw, 7rem);
}

/* ============================================================
   SECTION ONE (60/40 warm)
   ============================================================ */
.section-one .split-warm {
    flex-basis: 60%;
    width: 60%;
}

.warm-content {
    padding: 4rem 3rem;
    max-width: 560px;
}

.electric-content {
    padding: 4rem 2rem;
    max-width: 480px;
    width: 100%;
}

/* --- HUD Readout --- */
.hud-readout {
    width: 100%;
}

.hud-bracket-frame {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    border: 1px solid rgba(123, 97, 255, 0.15);
    padding: 1.5rem;
    position: relative;
}

.hud-bracket-frame .bracket {
    font-family: var(--font-electric);
    font-size: 2rem;
    color: var(--electric-violet);
    opacity: 0.5;
    display: flex;
    align-items: center;
}

.hud-data {
    flex: 1;
}

.hud-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(192, 192, 200, 0.08);
}

.hud-row:last-child {
    border-bottom: none;
}

.hud-label {
    font-family: var(--font-electric);
    font-size: 0.75rem;
    color: var(--chrome-silver);
    opacity: 0.6;
    letter-spacing: 0.1em;
}

.hud-value {
    font-family: var(--font-electric);
    font-size: 0.85rem;
    color: var(--electric-violet);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Pulse Dot --- */
.pulse-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-coral);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ============================================================
   SECTION TWO (40/60 electric)
   ============================================================ */
.section-two .split-warm {
    flex-basis: 40%;
    width: 40%;
}

.warm-sidebar {
    padding: 0;
}

/* --- Code Block --- */
.code-block {
    background: rgba(123, 97, 255, 0.06);
    border: 1px solid rgba(123, 97, 255, 0.15);
    border-radius: 2px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-line {
    color: var(--chrome-silver);
}

.code-keyword {
    color: var(--electric-violet);
}

.code-fn {
    color: var(--neon-coral);
}

.indent-1 {
    padding-left: 1.5rem;
}

.indent-2 {
    padding-left: 3rem;
}

.small-frame {
    padding: 0.8rem 1rem;
    margin-top: 1rem;
}

.small-frame .hud-row {
    padding: 0.2rem 0;
    border-bottom: none;
}

/* ============================================================
   SECTION THREE (Full Bleed Warm)
   ============================================================ */
.full-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.full-warm {
    background: var(--linen-warm);
}

.full-warm .full-content {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 700px;
}

.full-warm .display-heading {
    margin-bottom: 2rem;
}

.full-warm .body-warm {
    color: var(--midnight-void);
    opacity: 0.85;
}

/* --- Pressed Flower Ornament --- */
.pressed-flower-ornament {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.bottom-ornament {
    margin-top: 2rem;
    margin-bottom: 0;
}

.flower-svg {
    width: 120px;
    height: 120px;
}

.stem-svg {
    width: 160px;
    height: 40px;
}

/* ============================================================
   SECTION FOUR (Full Bleed Electric)
   ============================================================ */
.full-electric {
    background: var(--midnight-void);
}

.full-electric .full-content {
    width: 100%;
    max-width: 800px;
    padding: 4rem 2rem;
}

.large-frame {
    padding: 3rem 2rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.large-frame .bracket {
    font-size: 3rem;
}

.hud-content-center {
    width: 100%;
}

.hud-content-center .display-heading {
    margin-bottom: 1.5rem;
}

.hud-content-center .body-electric {
    margin-bottom: 2rem;
}

.hud-stats-row {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
}

.hud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hud-stat-value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--electric-violet);
    letter-spacing: 0.04em;
}

.hud-stat-label {
    font-family: var(--font-electric);
    font-size: 0.7rem;
    color: var(--chrome-silver);
    letter-spacing: 0.15em;
    opacity: 0.6;
}

.pulse-dot-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: clamp(2rem, 4vw, 3.5rem);
}

.pulse-dot-inline .pulse-dot {
    width: 12px;
    height: 12px;
}

/* ============================================================
   SECTION FIVE (Reunion)
   ============================================================ */
.reunion {
    background: var(--midnight-void);
}

.reunion-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--linen-warm), var(--midnight-void));
    opacity: 0.85;
    pointer-events: none;
}

.reunion .full-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 700px;
}

.reunion-heading {
    font-size: clamp(2rem, 5vw, 4.5rem);
    color: var(--neon-coral);
    margin-bottom: 2rem;
}

.body-reunion {
    font-family: var(--font-warm);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--midnight-void);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-section {
    min-height: auto;
    height: auto;
    padding: 2rem 0;
}

.footer-section .split-warm,
.footer-section .split-electric {
    flex-basis: 50%;
    width: 50%;
    min-height: auto;
    padding: 2rem;
}

.footer-warm {
    align-items: center;
    justify-content: center;
}

.footer-warm-text {
    font-family: var(--font-warm);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--midnight-void);
    opacity: 0.7;
}

.footer-electric {
    align-items: center;
    justify-content: center;
}

.footer-electric-text {
    font-family: var(--font-electric);
    font-size: 0.75rem;
    color: var(--chrome-silver);
    opacity: 0.5;
    letter-spacing: 0.12em;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Warm side: gentle fade-in with translateY */
.fade-in-warm {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-warm.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Electric side: sharp snap-in with translateX and overshoot */
.snap-in-electric {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.snap-in-electric.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .split-section {
        flex-direction: column;
    }

    .split-warm,
    .split-electric {
        flex-basis: auto !important;
        width: 100% !important;
        min-height: 50vh;
    }

    .hero .split-warm,
    .hero .split-electric {
        min-height: 50vh;
    }

    .split-divider {
        width: 100%;
        height: 2px;
    }

    .divider-line {
        width: 100%;
        height: 2px;
    }

    .warm-content,
    .electric-content {
        padding: 3rem 1.5rem;
        max-width: 100%;
    }

    .hero-text-warm,
    .hero-text-electric {
        bottom: 25%;
    }

    .hud-stats-row {
        gap: 2rem;
    }

    .footer-section {
        flex-direction: column;
    }

    .footer-section .split-warm,
    .footer-section .split-electric {
        width: 100% !important;
        text-align: center;
        padding: 1.5rem;
    }
}
