/* rational.group - Pop-Art Botanical Think Tank */
/* Jewel Tone Palette */
:root {
    --sapphire: #1a237e;
    --amethyst: #6a1b9a;
    --jade: #1b5e20;
    --ruby: #c62828;
    --topaz: #f9a825;
    --cream: #faf3e8;
    --obsidian: #1a1118;
    --garnet: #880e4f;
    --peridot: #558b2f;
    --emerald: #2e7d32;
    --rose: #c2185b;
    --coral: #ef5350;
}

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

html {
    scroll-behavior: auto;
}

body {
    font-family: 'Libre Baskerville', serif;
    color: var(--cream);
    background: var(--obsidian);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Scroll Container with Snap */
.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

/* Panel Base */
.panel {
    width: 100vw;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    counter-increment: panel-counter;
}

/* Panel Watermark Numbers */
.panel-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 20vw;
    color: currentColor;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
    line-height: 1;
    text-transform: uppercase;
}

/* Ben-Day Dot Overlay */
.ben-day-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.ben-day-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, currentColor 1.5px, transparent 1.5px);
    background-size: 8px 8px;
    opacity: 0.07;
}

/* Bokeh Circles */
.bokeh-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
}

.bokeh-1 {
    width: 250px;
    height: 250px;
    top: 10%;
    left: -5%;
    background: rgba(106, 27, 154, 0.2);
    box-shadow: 0 0 60px 30px rgba(106, 27, 154, 0.15);
}

.bokeh-2 {
    width: 180px;
    height: 180px;
    top: 60%;
    left: 20%;
    background: rgba(26, 35, 126, 0.2);
    box-shadow: 0 0 50px 25px rgba(26, 35, 126, 0.15);
}

.bokeh-3 {
    width: 300px;
    height: 300px;
    top: 30%;
    right: -8%;
    background: rgba(136, 14, 79, 0.15);
    box-shadow: 0 0 80px 40px rgba(136, 14, 79, 0.12);
}

.bokeh-4 {
    width: 120px;
    height: 120px;
    bottom: 15%;
    left: 40%;
    background: rgba(249, 168, 37, 0.15);
    box-shadow: 0 0 40px 20px rgba(249, 168, 37, 0.1);
}

.bokeh-5 {
    width: 200px;
    height: 200px;
    top: 5%;
    right: 25%;
    background: rgba(27, 94, 32, 0.18);
    box-shadow: 0 0 50px 25px rgba(27, 94, 32, 0.12);
}

.bokeh-6 {
    width: 160px;
    height: 160px;
    bottom: 5%;
    right: 10%;
    background: rgba(198, 40, 40, 0.15);
    box-shadow: 0 0 45px 22px rgba(198, 40, 40, 0.1);
}

/* ===================== */
/* Panel 1: The Claim    */
/* ===================== */
.panel-claim {
    background: var(--sapphire);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--cream);
}

.claim-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.claim-title {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--cream);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.claim-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--topaz);
    transform: rotate(-2deg);
    line-height: 1.4;
}

.hero-peony {
    position: absolute;
    bottom: 8%;
    right: 8%;
    z-index: 2;
}

.peony-svg {
    width: clamp(180px, 25vw, 300px);
    height: auto;
}

.peony-layer-1 {
    animation: counter-rotate-slow 8s ease-in-out infinite alternate;
}

.peony-layer-2 {
    animation: counter-rotate-fast 8s ease-in-out infinite alternate-reverse;
}

.peony-layer-3 {
    animation: counter-rotate-slow 12s ease-in-out infinite alternate;
}

.peony-layer-4 {
    animation: counter-rotate-fast 10s ease-in-out infinite alternate-reverse;
}

@keyframes counter-rotate-slow {
    from { transform: translate(150px, 150px) rotate(0deg); }
    to { transform: translate(150px, 150px) rotate(2deg); }
}

@keyframes counter-rotate-fast {
    from { transform: translate(150px, 150px) rotate(0deg); }
    to { transform: translate(150px, 150px) rotate(-2deg); }
}

/* Panel divider line */
.panel + .panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--garnet);
    z-index: 10;
}

/* ========================= */
/* Panel 2: The Evidence     */
/* ========================= */
.panel-evidence {
    background: var(--obsidian);
    padding: 0;
}

.comics-grid {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "cell1 cell2"
        "cell3 cell4";
    gap: 0;
    border: 6px solid var(--garnet);
}

.comics-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(1.5rem, 3vw, 3rem);
    overflow: hidden;
}

.cell-1 {
    grid-area: cell1;
    background: var(--sapphire);
    border-right: 6px solid var(--garnet);
    border-bottom: 6px solid var(--garnet);
    color: var(--cream);
}

.cell-2 {
    grid-area: cell2;
    background: var(--topaz);
    border-bottom: 6px solid var(--garnet);
    color: var(--obsidian);
}

.cell-3 {
    grid-area: cell3;
    background: var(--amethyst);
    border-right: 6px solid var(--garnet);
    color: var(--cream);
}

.cell-4 {
    grid-area: cell4;
    background: var(--ruby);
    color: var(--cream);
}

.cell-heading {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.cell-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    max-width: 40ch;
}

.cell-2 .cell-heading,
.cell-2 .cell-text {
    color: var(--obsidian);
}

.seed-pod {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.fern-border {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 2;
    opacity: 0.6;
}

.fern-svg {
    height: 100%;
    width: 40px;
}

.fern-path, .fern-leaf {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-fern 4s linear forwards;
}

.fern-leaf {
    animation-delay: 2s;
}

@keyframes draw-fern {
    to { stroke-dashoffset: 0; }
}

/* ========================== */
/* Panel 3: The Synthesis     */
/* ========================== */
.panel-synthesis {
    display: flex;
    flex-direction: row;
    background: var(--obsidian);
}

.split-left {
    width: 61.8%;
    height: 100vh;
    background: var(--amethyst);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 5rem);
    position: relative;
    overflow: hidden;
}

.split-right {
    width: 38.2%;
    height: 100vh;
    background: var(--topaz);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4rem);
    position: relative;
    overflow: hidden;
}

.split-divider {
    width: 6px;
    height: 100vh;
    background: var(--garnet);
    z-index: 5;
    transform-origin: center top;
    transform: scaleY(0);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.split-divider.active {
    transform: scaleY(1);
}

.split-quote {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(2rem, 4vw, 4.5rem);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--cream);
    line-height: 1.15;
    position: relative;
    z-index: 3;
}

.split-body {
    position: relative;
    z-index: 3;
}

.split-body p {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--obsidian);
    margin-bottom: 1.5rem;
}

.split-annotation {
    font-family: 'Caveat', cursive !important;
    font-size: clamp(1rem, 1.5vw, 1.4rem) !important;
    color: #2e7d32 !important;
    transform: rotate(-2deg);
    display: inline-block;
}

/* Bokeh for split panel */
.bokeh-s1 {
    width: 200px;
    height: 200px;
    top: 15%;
    left: 10%;
    background: rgba(26, 35, 126, 0.2);
    box-shadow: 0 0 60px 30px rgba(26, 35, 126, 0.15);
}

.bokeh-s2 {
    width: 140px;
    height: 140px;
    bottom: 20%;
    right: 10%;
    background: rgba(136, 14, 79, 0.2);
    box-shadow: 0 0 45px 22px rgba(136, 14, 79, 0.15);
}

.bokeh-s3 {
    width: 180px;
    height: 180px;
    top: 60%;
    left: -5%;
    background: rgba(249, 168, 37, 0.15);
    box-shadow: 0 0 50px 25px rgba(249, 168, 37, 0.1);
}

.bokeh-s4 {
    width: 100px;
    height: 100px;
    top: 5%;
    right: 20%;
    background: rgba(198, 40, 40, 0.18);
    box-shadow: 0 0 35px 18px rgba(198, 40, 40, 0.12);
}

.bokeh-s5 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 5%;
    background: rgba(106, 27, 154, 0.2);
    box-shadow: 0 0 50px 25px rgba(106, 27, 154, 0.12);
}

.bokeh-s6 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    left: 10%;
    background: rgba(27, 94, 32, 0.2);
    box-shadow: 0 0 40px 20px rgba(27, 94, 32, 0.12);
}

.bokeh-s7 {
    width: 120px;
    height: 120px;
    top: 70%;
    right: 15%;
    background: rgba(26, 35, 126, 0.18);
    box-shadow: 0 0 45px 22px rgba(26, 35, 126, 0.1);
}

/* ======================== */
/* Panel 4: The Garden      */
/* ======================== */
.panel-garden {
    background: var(--jade);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
}

.chrysanthemum-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.chrysanthemum-svg {
    width: clamp(250px, 40vw, 400px);
    height: auto;
}

.chrysanthemum-outer {
    animation: counter-rotate-slow-chrys 15s linear infinite;
    transform-origin: 200px 200px;
}

.chrysanthemum-mid {
    animation: counter-rotate-fast-chrys 12s linear infinite reverse;
    transform-origin: 200px 200px;
}

.chrysanthemum-inner {
    animation: counter-rotate-slow-chrys 20s linear infinite;
    transform-origin: 200px 200px;
}

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

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

.fibonacci-texts {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.fib-text {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    color: var(--cream);
    white-space: nowrap;
}

.fib-1 {
    top: 12%;
    left: 15%;
    animation: oscillate-3s 3s ease-in-out infinite alternate;
}

.fib-2 {
    top: 22%;
    right: 12%;
    animation: oscillate-5s 5s ease-in-out infinite alternate;
}

.fib-3 {
    top: 38%;
    left: 8%;
    animation: oscillate-7s 7s ease-in-out infinite alternate;
}

.fib-4 {
    top: 45%;
    right: 8%;
    animation: oscillate-3s 3s ease-in-out infinite alternate-reverse;
}

.fib-5 {
    bottom: 35%;
    left: 12%;
    animation: oscillate-5s 5s ease-in-out infinite alternate-reverse;
}

.fib-6 {
    bottom: 25%;
    right: 15%;
    animation: oscillate-7s 7s ease-in-out infinite alternate;
}

.fib-7 {
    bottom: 15%;
    left: 20%;
    animation: oscillate-3s 3s ease-in-out infinite alternate;
}

.fib-8 {
    bottom: 8%;
    right: 10%;
    animation: oscillate-5s 5s ease-in-out infinite alternate-reverse;
}

@keyframes oscillate-3s {
    from { transform: translateX(-4px); }
    to { transform: translateX(4px); }
}

@keyframes oscillate-5s {
    from { transform: translateX(4px); }
    to { transform: translateX(-4px); }
}

@keyframes oscillate-7s {
    from { transform: translateX(-3px) translateY(-2px); }
    to { transform: translateX(3px) translateY(2px); }
}

/* ============================= */
/* Panel 5: The Invitation       */
/* ============================= */
.panel-invitation {
    background: var(--ruby);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--cream);
    padding: clamp(2rem, 6vw, 6rem);
}

.invitation-content {
    position: relative;
    z-index: 2;
    max-width: 65ch;
    text-align: center;
}

.invitation-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--cream);
    margin-bottom: 1.5rem;
}

.closing-peony {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.25;
}

.peony-open-svg {
    width: clamp(200px, 30vw, 350px);
    height: auto;
}

.peony-open-1 {
    animation: counter-rotate-slow 10s ease-in-out infinite alternate;
    transform-origin: 175px 175px;
}

.peony-open-2 {
    animation: counter-rotate-fast 10s ease-in-out infinite alternate-reverse;
    transform-origin: 175px 175px;
}

.peony-open-3 {
    animation: counter-rotate-slow 14s ease-in-out infinite alternate;
    transform-origin: 175px 175px;
}

.invitation-ps {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: var(--topaz);
    transform: rotate(-2deg);
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    text-align: center;
}

/* ========================= */
/* Navigation                */
/* ========================= */
.nav-pill {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

.nav-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--garnet);
    background: rgba(26, 17, 24, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.nav-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(136, 14, 79, 0.5);
}

.nav-peony-icon {
    width: 36px;
    height: 36px;
}

.nav-links {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links.open {
    pointer-events: auto;
    opacity: 1;
}

.nav-link {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 36px;
    border-radius: 18px;
    background: rgba(26, 17, 24, 0.9);
    border: 2px solid var(--garnet);
    color: var(--cream);
    text-decoration: none;
    font-family: 'Caveat', cursive;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    transform: translate(0, 0) scale(0);
}

.nav-links.open .nav-link {
    transform: scale(1);
}

.nav-links.open .nav-link:nth-child(1) {
    transform: translate(-120px, -60px) scale(1);
}

.nav-links.open .nav-link:nth-child(2) {
    transform: translate(-140px, 10px) scale(1);
}

.nav-links.open .nav-link:nth-child(3) {
    transform: translate(-120px, 80px) scale(1);
}

.nav-links.open .nav-link:nth-child(4) {
    transform: translate(-60px, 130px) scale(1);
}

.nav-links.open .nav-link:nth-child(5) {
    transform: translate(10px, 150px) scale(1);
}

.nav-link:hover {
    background: var(--garnet);
    color: var(--cream);
}

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

    .split-left {
        width: 100%;
        height: 50vh;
    }

    .split-right {
        width: 100%;
        height: 50vh;
    }

    .split-divider {
        width: 100%;
        height: 6px;
        transform-origin: left center;
        transform: scaleX(0);
    }

    .split-divider.active {
        transform: scaleX(1);
    }

    .comics-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        grid-template-areas:
            "cell1"
            "cell2"
            "cell3"
            "cell4";
    }

    .cell-1 {
        border-right: none;
    }

    .cell-1, .cell-2, .cell-3 {
        border-bottom: 6px solid var(--garnet);
    }

    .cell-3 {
        border-right: none;
    }

    .fib-text {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }

    .hero-peony {
        bottom: 5%;
        right: 5%;
    }

    .nav-toggle {
        width: 50px;
        height: 50px;
    }
}