/* ============================================
   RRIPPL.com - Generative Ripple Experience
   Color Palette:
   - Midnight Canopy:       #071A10
   - Forest Floor:          #0E2D1C
   - Bioluminescent Jade:   #2ECC8E
   - Moss Glow:             #5E9B7A
   - Canopy Light:          #B8D4C4
   - Pale Mist:             #E0F0E8
   - Spore Gold:            #C4A84D
   - Deep Fern:             #1A5C3A
   ============================================ */

:root {
    --midnight-canopy: #071A10;
    --forest-floor: #0E2D1C;
    --bioluminescent-jade: #2ECC8E;
    --moss-glow: #5E9B7A;
    --canopy-light: #B8D4C4;
    --pale-mist: #E0F0E8;
    --spore-gold: #C4A84D;
    --deep-fern: #1A5C3A;
    --margin-shadow: #0A2E1B;
    --column-width: 760px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--canopy-light);
    background-color: var(--midnight-canopy);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--bioluminescent-jade);
    text-decoration: none;
    transition: color 0.4s ease;
}

a:hover {
    color: var(--spore-gold);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    color: var(--pale-mist);
    letter-spacing: 0.04em;
    line-height: 1.15;
    transition: font-weight 0.6s ease;
}

h2 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 24px;
}

h3 {
    font-size: clamp(20px, 3vw, 28px);
    margin-bottom: 12px;
}

p {
    max-width: 38em;
    margin-bottom: 1.25em;
}

.section-label,
.card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--moss-glow);
    display: block;
    margin-bottom: 16px;
}

.data-annotation {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--moss-glow);
    opacity: 6%;
}

/* ============================================
   BREATHING COLUMN
   ============================================ */

.breathing-column {
    width: var(--column-width);
    max-width: 90vw;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 60px 0;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SCENE BASE
   ============================================ */

.scene {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scene-origin {
    min-height: 100vh;
    background: var(--midnight-canopy);
}

.scene-propagation {
    min-height: 90vh;
    background: var(--midnight-canopy);
    padding-top: 60px;
}

.scene-interference {
    min-height: 100vh;
    background: var(--midnight-canopy);
}

.scene-resonance {
    min-height: 90vh;
    background: var(--midnight-canopy);
    padding-top: 40px;
}

.scene-reflection {
    min-height: 100vh;
    background: var(--midnight-canopy);
}

.scene-stillness {
    min-height: 90vh;
    background: var(--midnight-canopy);
    padding-bottom: 40px;
}

/* ============================================
   SCENE 1: ORIGIN
   ============================================ */

.ripple-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

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

.ripple-svg circle {
    fill: none;
    will-change: transform, opacity;
}

.origin-title {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.origin-letter {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(48px, 10vw, 96px);
    color: var(--pale-mist);
    letter-spacing: 0.08em;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.origin-letter.visible {
    opacity: 1;
    transform: scale(1);
}

.origin-tagline {
    position: relative;
    z-index: 2;
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--moss-glow);
    letter-spacing: 0.06em;
    margin-top: 24px;
    opacity: 0;
    transition: opacity 2s ease-out 4s;
}

.origin-tagline.visible {
    opacity: 0.7;
}

/* ============================================
   RIPPLE TRANSITION ZONES
   ============================================ */

.ripple-transition-zone {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 1;
    pointer-events: none;
}

.transition-ripple-svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   CARD FLIP
   ============================================ */

.card-flip {
    width: 100%;
    height: 280px;
    perspective: 1200px;
    margin-bottom: 40px;
    cursor: pointer;
}

.card-flip-small {
    width: 70%;
    height: 160px;
    margin: 0 auto 24px auto;
}

.card-flip-final {
    width: 100%;
    height: 320px;
    margin-bottom: 60px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card-flip-final .card-inner {
    transition-duration: 2s;
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-flip.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.card-front {
    background-color: var(--forest-floor);
    border: 1px solid rgba(94, 155, 122, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-ripple-pattern {
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.card-back {
    background-color: var(--forest-floor);
    border: 1px solid rgba(94, 155, 122, 0.2);
    transform: rotateY(180deg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-back h2 {
    font-size: clamp(22px, 3vw, 32px);
    margin-bottom: 16px;
}

.card-back h3 {
    font-size: clamp(18px, 2.5vw, 24px);
    margin-bottom: 8px;
}

.card-back p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--canopy-light);
    opacity: 0.85;
    margin-bottom: 0;
}

.card-back .card-label {
    margin-bottom: 12px;
}

/* Card HUD decorations */
.card-front::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(46, 204, 142, 0.15);
}

.card-front::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(46, 204, 142, 0.08);
}

/* ============================================
   SCENE 3: INTERFERENCE
   ============================================ */

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

.interference-svg {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    mix-blend-mode: screen;
}

#interference-svg-left {
    left: 0;
}

#interference-svg-right {
    right: 0;
    left: auto;
}

.interference-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.interference-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SCENE 4: RESONANCE
   ============================================ */

.resonance-heading {
    margin-bottom: 40px;
}

.resonance-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* ============================================
   SCENE 5: REFLECTION
   ============================================ */

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

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

.reflection-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.reflection-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.pull-quote {
    border: none;
    padding: 0;
    margin: 0 auto;
    max-width: 700px;
}

.pull-quote p {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.5;
    color: var(--pale-mist);
    max-width: none;
    margin-bottom: 32px;
}

.pull-quote cite {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 16px;
    font-style: normal;
    color: var(--moss-glow);
    display: block;
}

.gold-accent {
    color: var(--spore-gold);
}

/* ============================================
   SCENE 6: STILLNESS
   ============================================ */

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

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

.cta-link {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bioluminescent-jade);
    border: 1px solid rgba(46, 204, 142, 0.3);
    border-radius: 32px;
    padding: 14px 36px;
    margin-top: 24px;
    transition: all 0.6s ease;
}

.cta-link:hover {
    color: var(--spore-gold);
    border-color: rgba(196, 168, 77, 0.5);
    box-shadow: 0 0 30px rgba(196, 168, 77, 0.1);
}

/* ============================================
   RADIAL FOOTER
   ============================================ */

.radial-footer {
    position: relative;
    width: 100%;
    padding: 80px 0 40px;
    text-align: center;
}

.footer-rings {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.footer-rings-svg {
    width: 100%;
    height: 100%;
}

.footer-nav {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

.footer-link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--moss-glow);
    transition: color 0.4s ease;
}

.footer-link:hover {
    color: var(--spore-gold);
}

.footer-meta {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 24px;
}

/* ============================================
   RADIAL NAVIGATION
   ============================================ */

.nav-trigger {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    z-index: 100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bioluminescent-jade);
    position: relative;
    z-index: 2;
    transition: background-color 0.4s ease;
}

.nav-trigger:hover .nav-dot {
    background-color: var(--spore-gold);
}

.nav-pulse {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--bioluminescent-jade);
    opacity: 0.4;
    animation: navPulse 3s ease-in-out infinite;
}

@keyframes navPulse {
    0%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    50% {
        transform: scale(1);
        opacity: 0.1;
    }
}

.radial-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99;
    background: rgba(7, 26, 16, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.radial-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.radial-nav-center {
    position: relative;
    width: 320px;
    height: 320px;
}

.radial-link {
    position: absolute;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--canopy-light);
    transition: color 0.4s ease, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(0);
    white-space: nowrap;
}

.radial-nav-overlay.active .radial-link {
    transform: scale(1);
}

.radial-link:hover {
    color: var(--spore-gold);
}

/* Position radial links in a circle */
.radial-link[data-angle="0"] {
    top: 0;
    left: 50%;
    transform-origin: center;
    translate: -50% 0;
}
.radial-link[data-angle="60"] {
    top: 20%;
    right: 0;
    transform-origin: center;
}
.radial-link[data-angle="120"] {
    bottom: 20%;
    right: 0;
    transform-origin: center;
}
.radial-link[data-angle="180"] {
    bottom: 0;
    left: 50%;
    transform-origin: center;
    translate: -50% 0;
}
.radial-link[data-angle="240"] {
    bottom: 20%;
    left: 0;
    transform-origin: center;
}
.radial-link[data-angle="300"] {
    top: 20%;
    left: 0;
    transform-origin: center;
}

.radial-nav-overlay.active .radial-link[data-angle="0"] { transition-delay: 0ms; }
.radial-nav-overlay.active .radial-link[data-angle="60"] { transition-delay: 80ms; }
.radial-nav-overlay.active .radial-link[data-angle="120"] { transition-delay: 160ms; }
.radial-nav-overlay.active .radial-link[data-angle="180"] { transition-delay: 240ms; }
.radial-nav-overlay.active .radial-link[data-angle="240"] { transition-delay: 320ms; }
.radial-nav-overlay.active .radial-link[data-angle="300"] { transition-delay: 400ms; }

/* ============================================
   BACKGROUND MARGIN RIPPLES
   ============================================ */

.margin-ripples {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.margin-ripples-svg {
    width: 100%;
    height: 100%;
    opacity: 0.04;
    color: #0A2E1B;
}

/* ============================================
   PULSE INDICATORS
   ============================================ */

.pulse-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--bioluminescent-jade);
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ============================================
   HEADING HOVER EFFECT
   ============================================ */

h2:hover,
h3:hover {
    font-weight: 500;
}

/* ============================================
   CAUSTIC OVERLAY (Applied via JS)
   ============================================ */

.caustic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .card-flip-small {
        width: 90%;
        height: 180px;
    }

    .card-back {
        padding: 20px;
    }

    .radial-nav-center {
        width: 260px;
        height: 260px;
    }

    .footer-nav {
        gap: 20px;
    }

    .nav-trigger {
        bottom: 20px;
        right: 20px;
    }

    .origin-letter {
        letter-spacing: 0.04em;
    }
}

@media (max-width: 480px) {
    .card-flip {
        height: 320px;
    }

    .card-flip-small {
        width: 95%;
        height: 200px;
    }

    .card-flip-final {
        height: 360px;
    }

    .pull-quote p {
        font-size: 22px;
    }
}

/* ============================================
   DROPLET DECORATIVE ELEMENTS
   ============================================ */

.droplet {
    position: absolute;
    width: 12px;
    height: 18px;
    background: var(--deep-fern);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.3;
    z-index: 1;
}

/* ============================================
   RADIAL GRADIENT HALOS
   ============================================ */

.card-flip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(46, 204, 142, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   SELECTION STYLE
   ============================================ */

::selection {
    background: rgba(46, 204, 142, 0.2);
    color: var(--pale-mist);
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--midnight-canopy);
}

::-webkit-scrollbar-thumb {
    background: var(--deep-fern);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--moss-glow);
}
