/* luminous.quest — Zen Aquarium Meditation */
/* Fonts: Fraunces (variable serif), IBM Plex Mono */
/* Palette: Earth tones with luminous accents */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    color: #f2ece4;
    overflow-x: hidden;
    background: linear-gradient(
        to bottom,
        #c4956a 0%,
        #b8a088 12%,
        #5e8c7a 22%,
        #2d5f4f 40%,
        #1a2e1f 65%,
        #0f1a12 82%,
        #0f1a12 100%
    );
    background-attachment: fixed;
}

/* ===== SVG FILTERS (Hidden) ===== */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===== GRAIN OVERLAY ===== */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ===== ANIMATIONS ===== */
@keyframes breathe {
    0%, 100% { font-variation-settings: 'wght' 300, 'WONK' 0; }
    50% { font-variation-settings: 'wght' 900, 'WONK' 1; }
}

@keyframes bounceEnter {
    0% { opacity: 0; transform: translateY(60px) scale(0.9); }
    60% { opacity: 1; transform: translateY(-12px) scale(1.03); }
    80% { transform: translateY(4px) scale(0.99); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes swimKoi {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

@keyframes swimDiscus {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

@keyframes swimBetta {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

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

@keyframes washPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.5; }
}

@keyframes ripple {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 40px 15px rgba(196, 149, 106, 0.15); }
    50% { box-shadow: 0 0 80px 30px rgba(212, 165, 74, 0.25); }
}

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

@keyframes angelGlow {
    0%, 100% { box-shadow: 0 0 60px 30px rgba(212, 165, 74, 0.15); transform: scale(1); }
    50% { box-shadow: 0 0 120px 60px rgba(212, 165, 74, 0.25); transform: scale(1.05); }
}

/* ===== ZONE BASE ===== */
.zone {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ===== ZONE 1: SURFACE ===== */
.zone-surface {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.water-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: repeating-linear-gradient(
        90deg,
        rgba(196, 149, 106, 0.3) 0px,
        rgba(212, 165, 74, 0.15) 30px,
        rgba(196, 149, 106, 0.3) 60px,
        rgba(212, 165, 74, 0.1) 90px,
        rgba(196, 149, 106, 0.3) 120px
    );
    background-size: 200% 100%;
    animation: ripple 8s linear infinite;
    opacity: 0.6;
    z-index: 1;
}

.site-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(4rem, 12vw, 9rem);
    font-variation-settings: 'wght' 300, 'WONK' 1;
    animation: breathe 6s ease-in-out infinite;
    color: #f2ece4;
    letter-spacing: -0.02em;
    z-index: 2;
    text-align: center;
    text-shadow: 0 0 40px rgba(212, 165, 74, 0.3);
}

.fish-koi {
    position: absolute;
    width: clamp(120px, 20vw, 250px);
    height: auto;
    offset-path: path('M -100,300 C 200,100 500,500 800,250 C 1100,50 600,400 -100,300');
    offset-rotate: auto;
    animation: swimKoi 22s linear infinite, fishPulse 6s ease-in-out infinite;
    z-index: 3;
}

/* ===== ZONE 2: SHALLOW ===== */
.zone-shallow {
    min-height: 150vh;
    padding: 10vh 0;
    display: flex;
    flex-direction: column;
    gap: 12vh;
    position: relative;
}

.panel {
    background: rgba(242, 236, 228, 0.85);
    color: #1a2e1f;
    padding: clamp(2rem, 4vw, 3.5rem);
    max-width: 55%;
    position: relative;
    filter: url(#watercolor-edge);
    opacity: 0;
    transform: translateY(60px);
}

.panel p {
    font-family: 'Fraunces', serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-variation-settings: 'wght' 300, 'opsz' 12;
    line-height: 1.7;
    color: #1a2e1f;
}

.panel-left {
    align-self: flex-start;
    margin-left: -2%;
    border-right: 3px solid rgba(94, 140, 122, 0.3);
}

.panel-right {
    align-self: flex-end;
    margin-right: -2%;
    border-left: 3px solid rgba(94, 140, 122, 0.3);
}

.panel.is-visible {
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.fish-discus {
    width: clamp(80px, 12vw, 150px);
    height: auto;
    position: absolute;
    offset-path: path('M 100,200 C 300,50 700,350 900,150 C 1100,0 500,300 100,200');
    offset-rotate: auto;
    animation: swimDiscus 18s linear infinite, fishPulse 5s ease-in-out infinite;
    z-index: 2;
    right: 10%;
}

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

.fish-tetra {
    position: absolute;
    width: clamp(30px, 4vw, 50px);
    height: auto;
    animation: fishPulse 4s ease-in-out infinite;
}

.tetra-1 {
    offset-path: path('M 200,400 C 400,300 600,500 800,350 C 1000,200 400,450 200,400');
    offset-rotate: auto;
    animation: swimKoi 15s linear infinite, fishPulse 4s ease-in-out infinite;
}

.tetra-2 {
    offset-path: path('M 220,420 C 420,320 620,520 820,370 C 1020,220 420,470 220,420');
    offset-rotate: auto;
    animation: swimKoi 15s linear infinite 0.5s, fishPulse 4s ease-in-out infinite 0.3s;
}

.tetra-3 {
    offset-path: path('M 180,380 C 380,280 580,480 780,330 C 980,180 380,430 180,380');
    offset-rotate: auto;
    animation: swimKoi 15s linear infinite 1s, fishPulse 4s ease-in-out infinite 0.6s;
}

.tetra-4 {
    offset-path: path('M 240,440 C 440,340 640,540 840,390 C 1040,240 440,490 240,440');
    offset-rotate: auto;
    animation: swimKoi 15s linear infinite 1.5s, fishPulse 4s ease-in-out infinite 0.9s;
}

/* ===== ZONE 3: MID-WATER ===== */
.zone-midwater {
    min-height: 150vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.word-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.giant-word {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(60px);
}

.giant-word.is-visible {
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.giant-word .breathing-text {
    font-family: 'Fraunces', serif;
    font-size: clamp(5rem, 18vw, 12rem);
    font-variation-settings: 'wght' 300, 'WONK' 1;
    animation: breathe 4s ease-in-out infinite;
    color: #f2ece4;
    text-shadow: 0 0 60px rgba(212, 165, 74, 0.2);
    position: relative;
    z-index: 2;
}

.wash-circle {
    position: absolute;
    width: clamp(200px, 40vw, 500px);
    height: clamp(200px, 40vw, 500px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 149, 106, 0.25) 0%, rgba(196, 149, 106, 0) 60%);
    animation: washPulse 8s ease-in-out infinite;
    z-index: 1;
}

.fish-betta {
    position: absolute;
    width: clamp(150px, 22vw, 300px);
    height: auto;
    offset-path: path('M 50,400 C 250,200 650,600 850,300 C 1050,100 450,500 50,400');
    offset-rotate: auto;
    animation: swimBetta 25s linear infinite, fishPulse 6s ease-in-out infinite;
    z-index: 3;
    bottom: 20%;
}

/* ===== ZONE 4: DEEP ===== */
.zone-deep {
    min-height: 150vh;
    position: relative;
}

.depth-container {
    width: 100%;
    height: 100%;
    min-height: 150vh;
    position: relative;
    perspective: 800px;
}

.zen-circles {
    position: absolute;
    pointer-events: none;
}

.zen-1 {
    width: clamp(200px, 30vw, 400px);
    top: 10%;
    right: 10%;
}

.zen-2 {
    width: clamp(150px, 25vw, 350px);
    top: 50%;
    left: 8%;
}

.zen-3 {
    width: clamp(120px, 20vw, 280px);
    bottom: 15%;
    right: 20%;
}

.bio-glow {
    position: absolute;
    opacity: 0;
    transform: translateY(60px);
    animation: bioFloat 6s ease-in-out infinite;
}

.bio-glow.is-visible {
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, bioFloat 6s ease-in-out infinite 0.8s;
}

.bio-glow svg {
    filter: drop-shadow(0 0 15px rgba(212, 165, 74, 0.25));
}

.bio-1 {
    width: 80px;
    top: 15%;
    left: 25%;
    animation-delay: 0s;
}

.bio-2 {
    width: 110px;
    top: 30%;
    right: 15%;
    animation-delay: 1.5s;
}

.bio-3 {
    width: 60px;
    top: 50%;
    left: 40%;
    animation-delay: 3s;
}

.bio-4 {
    width: 95px;
    top: 65%;
    right: 30%;
    animation-delay: 2s;
}

.bio-5 {
    width: 75px;
    top: 80%;
    left: 15%;
    animation-delay: 4s;
}

/* ===== ZONE 5: BED ===== */
.zone-bed {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 4rem;
}

.angelfish-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(60px);
}

.angelfish-container.is-visible {
    animation: bounceEnter 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.angelfish-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 165, 74, 0.2) 0%, rgba(212, 165, 74, 0) 70%);
    animation: angelGlow 8s ease-in-out infinite;
    z-index: 0;
}

.fish-angel {
    width: clamp(150px, 25vw, 280px);
    height: auto;
    position: relative;
    z-index: 1;
}

.domain-inscription {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(242, 236, 228, 0.15);
    z-index: 2;
}

/* ===== BOUNCE-IN UTILITY ===== */
.bounce-in {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
}

.bounce-in.is-visible {
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .panel {
        max-width: 85%;
    }

    .panel-left {
        margin-left: 0;
    }

    .panel-right {
        margin-right: 0;
    }

    .fish-koi {
        offset-path: path('M -50,200 C 100,100 250,300 400,150 C 500,50 200,250 -50,200');
    }

    .fish-discus {
        offset-path: path('M 50,150 C 150,50 300,250 400,100 C 500,0 200,200 50,150');
    }

    .fish-betta {
        offset-path: path('M 30,300 C 130,150 300,400 400,200 C 500,50 200,350 30,300');
    }

    .tetra-1 { offset-path: path('M 50,200 C 150,150 250,250 350,180 C 400,130 200,230 50,200'); }
    .tetra-2 { offset-path: path('M 60,210 C 160,160 260,260 360,190 C 410,140 210,240 60,210'); }
    .tetra-3 { offset-path: path('M 40,190 C 140,140 240,240 340,170 C 390,120 190,220 40,190'); }
    .tetra-4 { offset-path: path('M 70,220 C 170,170 270,270 370,200 C 420,150 220,250 70,220'); }
}

/* ===== ADDITIONAL COLOR TOKENS ===== */
/* Bright Moss - Hover/Interactive Glow */
.panel:hover {
    border-color: #3a7c6b;
}

/* Burnt Sienna - Watercolor stroke accents */
.panel-left {
    border-right-color: rgba(139, 78, 42, 0.3);
}

.panel-right {
    border-left-color: rgba(139, 78, 42, 0.3);
}

/* Luminous Gold Glow - Primary accent */
.site-title {
    text-shadow: 0 0 40px rgba(212, 165, 74, 0.3);
}

/* Color reference tokens */
.zone-surface { --surface-sand: #c4956a; --glow-amber: #d4a54a; }
.zone-shallow { --shallow-moss: #5e8c7a; --bright-moss: #3a7c6b; --burnt-sienna: #8b4e2a; }
.zone-midwater { --deep-teal: #2d5f4f; --glow-amber: #d4a54a; }
.zone-deep { --earth-dark: #1a2e1f; --glow-amber: #d4a54a; --burnt-sienna: #8b4e2a; }
.zone-bed { --bed-black: #0f1a12; --rice-paper: #f2ece4; --glow-amber: #d4a54a; }

/* Breathing text glow uses luminous gold */
.breathing-text {
    text-shadow: 0 0 40px #d4a54a40;
}

/* Bio-glow elements ambient shadow */
.bio-glow svg {
    filter: drop-shadow(0 0 15px #d4a54a40);
}

/* Accent decorative strokes */
.panel::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b4e2a, transparent);
    opacity: 0.2;
}

/* Interactive hover glow halo */
.angelfish-container .angelfish-glow {
    background: radial-gradient(circle, #d4a54a33 0%, transparent 70%);
}

/* Deep zone accent colors */
.zen-circles {
    opacity: 0.8;
}

/* Fish swimming highlight stripe */
.fish-tetra line {
    stroke: #d4a54a;
}

/* Hover glow accent */
.giant-word:hover .breathing-text {
    text-shadow: 0 0 80px #3a7c6b60;
}
