/* ============================================================
   riron.xyz — Memphis Group × Horizontal Scroll × Watercolor
   ============================================================ */

:root {
    --coral: #e85d3a;
    --teal: #2a9d8f;
    --mustard: #e9b44c;
    --plum: #2d2a32;
    --cream: #fef5e7;
    --sage: #7bb58a;
    --sienna: #c4663a;
    --blush: #f4a5a0;
    --panel-width: 100vw;
    --panel-height: 100vh;
    --squiggle-height: 10vh;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Quicksand', sans-serif;
    background: var(--cream);
    color: var(--plum);
}

/* ============================================================
   Scroll Container — Horizontal Ribbon
   ============================================================ */

.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.ribbon {
    display: flex;
    flex-direction: row;
    width: fit-content;
    height: 100vh;
}

/* ============================================================
   Panel Base
   ============================================================ */

.panel {
    width: var(--panel-width);
    height: var(--panel-height);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-1,
.panel-3,
.panel-5 {
    background: var(--cream);
}

.panel-2,
.panel-4 {
    background: var(--plum);
}

/* ============================================================
   Watercolor Wash Backgrounds
   ============================================================ */

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

/* ============================================================
   Panel Numbers (Memphis style)
   ============================================================ */

.panel-number {
    position: absolute;
    top: 2.5vh;
    left: 3vw;
    z-index: 5;
}

.panel-number .label-text {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sienna);
}

.panel-number-light .label-text {
    color: var(--cream);
}

/* ============================================================
   Decorative Background Words
   ============================================================ */

.decorative-word {
    position: absolute;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 20vw;
    text-transform: uppercase;
    color: var(--plum);
    opacity: 0.04;
    transform: rotate(var(--rot, 0deg));
    z-index: 2;
    pointer-events: none;
    line-height: 0.85;
    white-space: nowrap;
}

.panel-2 .decorative-word,
.panel-4 .decorative-word {
    color: var(--cream);
    opacity: 0.06;
}

/* ============================================================
   Panel 1 — RIRON Title
   ============================================================ */

.title-block {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

.title-riron {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(5rem, 20vw, 18rem);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: flex;
    gap: 0.02em;
}

.title-riron .letter {
    display: inline-block;
    text-shadow: 4px 4px 0px var(--teal);
    animation: letterFloat 4s ease-in-out infinite;
}

.title-riron .letter:nth-child(1) { text-shadow: 4px 4px 0px var(--teal); animation-delay: 0s; }
.title-riron .letter:nth-child(2) { text-shadow: 4px 4px 0px var(--coral); animation-delay: 0.4s; }
.title-riron .letter:nth-child(3) { text-shadow: 4px 4px 0px var(--sage); animation-delay: 0.8s; }
.title-riron .letter:nth-child(4) { text-shadow: 4px 4px 0px var(--mustard); animation-delay: 1.2s; }
.title-riron .letter:nth-child(5) { text-shadow: 4px 4px 0px var(--sienna); animation-delay: 1.6s; }

@keyframes letterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Sine wave at bottom of panel 1 */
.sine-wave-bottom {
    position: absolute;
    bottom: 12vh;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 5;
}

/* ============================================================
   Terrazzo Dots
   ============================================================ */

.terrazzo-dot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 3;
    opacity: 0.18;
    animation: terrazzFloat var(--float-duration, 5s) ease-in-out infinite;
}

.dot-triangle {
    width: 22px;
    height: 22px;
    background: var(--color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.dot-half-circle {
    width: 26px;
    height: 13px;
    background: var(--color);
    border-radius: 26px 26px 0 0;
}

.dot-parallelogram {
    width: 28px;
    height: 16px;
    background: var(--color);
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
}

@keyframes terrazzFloat {
    0%, 100% { transform: translateY(-5px); }
    50% { transform: translateY(5px); }
}

/* ============================================================
   Panel Dividers (Memphis Columns)
   ============================================================ */

.panel-divider {
    width: 80px;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--cream);
    z-index: 20;
    position: relative;
}

.divider-shape {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.shape-triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-circle {
    border-radius: 50%;
}

.shape-rect {
    border-radius: 3px;
}

.divider-line {
    width: 2px;
    height: 80px;
    background: var(--plum);
    opacity: 0.15;
    flex-shrink: 0;
}

/* ============================================================
   Panel 2 — AXIOM (Foundation)
   ============================================================ */

.panel-2-layout {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: calc(100% - var(--squiggle-height));
    padding: 8vh 5vw;
}

.memphis-composition {
    width: 55%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memphis-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.memphis-rect {
    width: 160px;
    height: 100px;
    border-radius: 6px;
    box-shadow: 6px 6px 0px var(--shadow-color, var(--mustard));
}

.memphis-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 6px 6px 0px var(--shadow-color, var(--blush));
}

.memphis-triangle-shape {
    width: 0;
    height: 0;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    border-bottom: 120px solid var(--mustard);
    filter: drop-shadow(6px 6px 0px var(--coral));
}

.manifesto-text {
    width: 40%;
    margin-left: 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.manifesto-text p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--cream);
}

/* ============================================================
   Section Headlines
   ============================================================ */

.section-headline {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(3.2rem, 8vw, 7rem);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--coral);
    text-shadow: 4px 4px 0px var(--teal);
    margin-bottom: 1rem;
}

.headline-dark {
    color: var(--mustard);
    text-shadow: 4px 4px 0px var(--coral);
}

/* ============================================================
   Zigzag Band
   ============================================================ */

.zigzag-band {
    position: absolute;
    bottom: calc(var(--squiggle-height) + 2vh);
    left: 0;
    width: 100%;
    height: 30px;
    z-index: 8;
}

.zigzag-bottom::before {
    content: '';
    display: block;
    width: 100%;
    height: 30px;
    background: var(--coral);
    clip-path: polygon(
        0% 50%,  4% 0%,  8% 50%,  12% 0%,  16% 50%,  20% 0%,
        24% 50%, 28% 0%, 32% 50%, 36% 0%, 40% 50%, 44% 0%,
        48% 50%, 52% 0%, 56% 50%, 60% 0%, 64% 50%, 68% 0%,
        72% 50%, 76% 0%, 80% 50%, 84% 0%, 88% 50%, 92% 0%,
        96% 50%, 100% 0%, 100% 100%, 0% 100%
    );
    opacity: 0.3;
}

/* ============================================================
   Panel 3 — FLUX (Process)
   ============================================================ */

.panel-3-content {
    position: relative;
    z-index: 10;
    padding: 10vh 8vw;
    display: flex;
    flex-direction: column;
    height: calc(100% - var(--squiggle-height));
}

.zigzag-timeline {
    margin: 3vh 0;
    position: relative;
}

.zigzag-svg {
    width: 100%;
    height: 120px;
}

.timeline-labels {
    position: relative;
    width: 100%;
    height: 30px;
    margin-top: 0.5rem;
}

.timeline-label {
    position: absolute;
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.65rem, 0.9vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sienna);
    transform: translateX(-50%);
}

.flux-body {
    margin-top: 3vh;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flux-body p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--plum);
}

.sine-wave-mid {
    position: absolute;
    bottom: calc(var(--squiggle-height) + 5vh);
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 5;
    opacity: 0.6;
}

/* ============================================================
   Panel 4 — THEOREM (Work Cards)
   ============================================================ */

.panel-4-content {
    position: relative;
    z-index: 10;
    padding: 10vh 6vw;
    display: flex;
    flex-direction: column;
    height: calc(100% - var(--squiggle-height));
}

.theorem-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3vw;
    margin-top: 4vh;
    flex: 1;
    align-items: start;
}

.theorem-card {
    background: var(--cream);
    border: 4px solid var(--border-color, var(--coral));
    box-shadow: 8px 8px 0px var(--shadow-color, var(--teal));
    padding: 2.5rem 2rem;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theorem-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 11px 11px 0px var(--shadow-color, var(--teal));
}

.card-label {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sienna);
    display: block;
    margin-bottom: 0.75rem;
}

.card-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    color: var(--plum);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.theorem-card p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.6;
    color: var(--plum);
    opacity: 0.85;
}

/* Concentric circles decoration */
.concentric-circles {
    position: absolute;
    right: -60px;
    top: 15%;
    width: 300px;
    height: 300px;
    z-index: 3;
    opacity: 0.15;
}

.conc-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid var(--teal);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: concentricSpin 20s linear infinite;
}

.ring-1 { width: 80px; height: 80px; border-color: var(--coral); }
.ring-2 { width: 140px; height: 140px; border-color: var(--mustard); border-style: dashed; animation-direction: reverse; }
.ring-3 { width: 210px; height: 210px; border-color: var(--teal); }
.ring-4 { width: 280px; height: 280px; border-color: var(--blush); border-style: dashed; animation-direction: reverse; }

@keyframes concentricSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   Panel 5 — WAVE (Contact/Signal)
   ============================================================ */

.panel-5-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - var(--squiggle-height));
    padding: 5vh 5vw;
}

.big-wave {
    width: 80%;
    height: auto;
    max-height: 35vh;
    margin-bottom: 5vh;
}

.contact-block {
    text-align: center;
}

.contact-headline {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 0.92;
    color: var(--coral);
    text-shadow: 4px 4px 0px var(--teal);
    margin-bottom: 3vh;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
}

.contact-item {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.3vw, 1.15rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--plum);
    cursor: default;
}

/* ============================================================
   Underline-Draw Interaction
   ============================================================ */

.underline-draw {
    background-image: linear-gradient(var(--coral), var(--coral));
    background-position: bottom left;
    background-repeat: no-repeat;
    background-size: 0% 3px;
    transition: background-size 0.4s ease;
    padding-bottom: 3px;
}

.underline-draw:hover {
    background-size: 100% 3px;
}

/* ============================================================
   Wave Drawing Animations
   ============================================================ */

.wave-draw {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawWave 3s ease-in-out forwards;
}

.wave-draw-large {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: drawWaveLarge 3s ease-in-out forwards;
}

.wave-draw-large-2 {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: drawWaveLarge 4s ease-in-out 0.5s forwards;
}

@keyframes drawWave {
    to { stroke-dashoffset: 0; }
}

@keyframes drawWaveLarge {
    to { stroke-dashoffset: 0; }
}

/* ============================================================
   Navigation Squiggle (Bottom Progress Bar)
   ============================================================ */

.squiggle-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: var(--squiggle-height);
    z-index: 100;
    pointer-events: none;
    background: linear-gradient(to top, rgba(254, 245, 231, 0.95) 0%, rgba(254, 245, 231, 0) 100%);
}

.squiggle-svg {
    width: 100%;
    height: 100%;
}

.squiggle-line {
    transition: none;
}

.squiggle-node {
    animation: nodePulse 2s ease-in-out infinite;
}

.squiggle-node:nth-child(1) { animation-delay: 0s; }
.squiggle-node:nth-child(2) { animation-delay: 0.5s; }
.squiggle-node:nth-child(3) { animation-delay: 1s; }
.squiggle-node:nth-child(4) { animation-delay: 1.5s; }

@keyframes nodePulse {
    0%, 100% { r: 8; opacity: 1; }
    50% { r: 11; opacity: 0.7; }
}

/* ============================================================
   Responsive Adjustments
   ============================================================ */

@media (max-width: 768px) {
    .panel-2-layout {
        flex-direction: column;
        padding: 6vh 4vw;
    }

    .memphis-composition {
        width: 100%;
        height: 35%;
    }

    .manifesto-text {
        width: 100%;
        margin-left: 0;
    }

    .theorem-cards {
        grid-template-columns: 1fr;
        gap: 2vh;
    }

    .panel-divider {
        width: 40px;
    }

    .divider-shape {
        width: 22px;
        height: 22px;
    }

    .divider-line {
        height: 40px;
    }

    .title-riron {
        font-size: clamp(3rem, 15vw, 8rem);
    }

    .contact-info {
        gap: 0.8rem;
    }
}
