/* ========================================
   goomimi.com - Wabi-Sabi Luxury / Ocean Descent
   ======================================== */

:root {
    --abyssal-ink: #0B1D2C;
    --hadal-blue: #132F42;
    --bathyal-teal: #1B4B5A;
    --kintsugi-gold: #C9A96E;
    --bioluminescent: #3AAFB9;
    --foam-white: #E8EDE9;
    --driftwood: #A8B5A0;
    --coral-fissure: #D4726A;
    --ease-wabi: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--abyssal-ink);
    background-image: radial-gradient(ellipse at 50% 30%, rgba(19, 47, 66, 0.4) 0%, transparent 70%);
    color: var(--foam-white);
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    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)' opacity='1'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1, h2 {
    font-family: 'Nunito', sans-serif;
    letter-spacing: 0.02em;
}

h1 {
    font-weight: 300;
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    line-height: 1.15;
}

h2 {
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

p {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.75;
    max-width: 38em;
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.pool-label {
    font-family: 'Shippori Mincho', serif;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: var(--driftwood);
    opacity: 0.7;
    margin-top: 1rem;
}

/* --- Kintsugi Lines --- */
.kintsugi-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.kintsugi-path {
    fill: none;
    stroke: var(--kintsugi-gold);
    stroke-width: 0.15;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(201, 169, 110, 0.3));
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 4s ease;
}

.kintsugi-path.drawn {
    stroke-dashoffset: 0;
}

.kintsugi-branch-1,
.kintsugi-branch-2,
.kintsugi-branch-3 {
    stroke-width: 0.1;
    opacity: 0.6;
}

/* --- Radial Charts --- */
.radial-chart svg {
    width: 100%;
    height: 100%;
}

.chart-arc {
    transform-origin: center;
    animation: chartSpin 720s linear infinite;
}

.chart-arc-2 { animation-direction: reverse; animation-duration: 600s; }
.chart-arc-3 { animation-duration: 540s; }

@keyframes chartSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radial-chart-surface {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 40vmin;
    height: 40vmin;
    opacity: 0.6;
}

.radial-chart-abyssal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 0;
}

/* --- Zones --- */
.zone {
    position: relative;
    overflow: hidden;
}

/* Zone 1: Surface */
.zone-surface {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at 50% 20%, rgba(19, 47, 66, 0.5) 0%, var(--abyssal-ink) 70%);
}

.surface-content {
    position: relative;
    z-index: 2;
    padding: 0 8vw;
    transform: translateX(-5vw);
}

.site-title {
    color: var(--foam-white);
    margin-bottom: 2rem;
}

.surface-quote {
    font-family: 'Shippori Mincho', serif;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    line-height: 1.6;
    color: var(--driftwood);
    max-width: 28em;
    font-style: italic;
}

/* Stream Dividers */
.stream-divider {
    position: relative;
    height: 120px;
    margin: -1px 0;
}

.stream-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.stream-layer {
    fill-opacity: 0.15;
}

.stream-layer-1 { fill: var(--bathyal-teal); animation: streamWave 10s ease-in-out infinite; }
.stream-layer-2 { fill: var(--hadal-blue); animation: streamWave 8s ease-in-out infinite 1.5s; }
.stream-layer-3 { fill: var(--abyssal-ink); animation: streamWave 12s ease-in-out infinite 3s; }
.stream-layer-4 { fill: var(--bioluminescent); fill-opacity: 0.1; animation: streamWave 9s ease-in-out infinite; }
.stream-layer-5 { fill: var(--bathyal-teal); fill-opacity: 0.12; animation: streamWave 11s ease-in-out infinite 2s; }
.stream-layer-6 { fill: var(--hadal-blue); fill-opacity: 0.18; animation: streamWave 7s ease-in-out infinite 1s; }

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

/* Zone 2: Twilight */
.zone-twilight {
    padding: 8rem 4vw;
    min-height: 120vh;
}

/* Zone 3: Midnight */
.zone-midnight {
    padding: 8rem 4vw;
    min-height: 150vh;
}

/* Zone 4: Abyssal */
.zone-abyssal {
    padding: 10rem 4vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zone 5: Hadal */
.zone-hadal {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 4rem 2rem;
    position: relative;
}

/* --- Content Pools --- */
.content-pool {
    background: var(--hadal-blue);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    z-index: 2;
    margin-bottom: 4rem;
    border: 1px solid rgba(27, 75, 90, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-wabi), transform 0.6s var(--ease-wabi);
    overflow: hidden;
}

.content-pool.revealed {
    opacity: 1;
    transform: translateY(0);
}

.pool-left {
    max-width: 560px;
    margin-left: 8vw;
}

.pool-right {
    max-width: 560px;
    margin-left: auto;
    margin-right: 8vw;
}

.pool-left-tight {
    max-width: 480px;
    margin-left: 10vw;
}

.pool-center-tight {
    max-width: 480px;
    margin: 0 auto 4rem;
}

.pool-right-tight {
    max-width: 480px;
    margin-left: auto;
    margin-right: 10vw;
    margin-bottom: 0;
}

.pool-abyssal-center {
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid var(--kintsugi-gold);
    box-shadow: 0 0 20px rgba(201, 169, 110, 0.1);
}

/* Retro Pattern Textures */
.pool-stipple::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, var(--foam-white) 0.5px, transparent 0.5px);
    background-size: 8px 8px;
    opacity: 0.04;
    pointer-events: none;
    border-radius: 20px;
}

.pool-crosshatch::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(27, 75, 90, 0.05) 5px, rgba(27, 75, 90, 0.05) 5.5px),
        repeating-linear-gradient(135deg, transparent, transparent 5px, rgba(27, 75, 90, 0.05) 5px, rgba(27, 75, 90, 0.05) 5.5px);
    opacity: 1;
    pointer-events: none;
    border-radius: 20px;
}

.pool-waveline::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 11px,
        rgba(168, 181, 160, 0.03) 11px,
        rgba(168, 181, 160, 0.03) 12px
    );
    pointer-events: none;
    border-radius: 20px;
}

/* --- Skeleton Shimmer --- */
.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, var(--bathyal-teal) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out forwards;
    opacity: 0.3;
    border-radius: 20px;
    pointer-events: none;
    z-index: 10;
}

.content-pool.revealed .skeleton-shimmer {
    animation: shimmerFade 0.6s var(--ease-wabi) forwards;
    animation-delay: 0.3s;
}

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

@keyframes shimmerFade {
    to { opacity: 0; }
}

.ghost-skeleton {
    width: 70%;
    height: 50px;
    margin: 2rem auto;
    background: var(--bathyal-teal);
    opacity: 0.03;
    border-radius: 12px;
    animation: ghostPulse 3s ease-in-out infinite;
}

@keyframes ghostPulse {
    0%, 100% { opacity: 0.02; }
    50% { opacity: 0.04; }
}

/* --- Scatter Constellations --- */
.scatter-constellation {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 2rem 0;
}

.scatter-constellation svg {
    width: 100%;
    height: 100%;
}

/* --- Manifesto --- */
.manifesto-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    position: relative;
    z-index: 1;
}

/* --- Pulse Dots --- */
.pulse-dots {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bioluminescent);
    animation: pulseDot 3s ease-in-out infinite;
}

.pulse-dot:nth-child(2) { animation-delay: 0.5s; }
.pulse-dot:nth-child(3) { animation-delay: 1s; }

@keyframes pulseDot {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }
}

/* --- Hadal Zone --- */
.hadal-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hadal-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bioluminescent);
}

.hadal-dot:nth-child(1) { top: 15%; left: 20%; opacity: 0.2; animation: hadalDrift 20s ease-in-out infinite; }
.hadal-dot:nth-child(2) { top: 35%; left: 65%; opacity: 0.15; animation: hadalDrift 25s ease-in-out infinite 3s; }
.hadal-dot:nth-child(3) { top: 50%; left: 40%; opacity: 0.25; animation: hadalDrift 18s ease-in-out infinite 6s; }
.hadal-dot:nth-child(4) { top: 25%; left: 80%; opacity: 0.18; animation: hadalDrift 22s ease-in-out infinite 2s; }
.hadal-dot:nth-child(5) { top: 60%; left: 15%; opacity: 0.12; animation: hadalDrift 24s ease-in-out infinite 8s; }
.hadal-dot:nth-child(6) { top: 40%; left: 55%; opacity: 0.2; animation: hadalDrift 19s ease-in-out infinite 5s; }
.hadal-dot:nth-child(7) { top: 70%; left: 75%; opacity: 0.16; animation: hadalDrift 21s ease-in-out infinite 4s; }

@keyframes hadalDrift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(25px, -15px); }
    50% { transform: translate(-10px, 30px); }
    75% { transform: translate(20px, 10px); }
}

.hadal-line {
    width: 60%;
    height: 1px;
    background: var(--kintsugi-gold);
    opacity: 0.4;
    position: relative;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 4px rgba(201, 169, 110, 0.3));
}

.hadal-terminus {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kintsugi-gold);
    top: -2.5px;
}

.hadal-terminus:nth-child(1) { right: -3px; }
.hadal-terminus:nth-child(2) { right: 12px; }
.hadal-terminus:nth-child(3) { right: 24px; }

.hadal-domain {
    font-family: 'Shippori Mincho', serif;
    font-size: 0.9rem;
    color: var(--driftwood);
    opacity: 0.6;
    letter-spacing: 0.1em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .pool-left,
    .pool-right,
    .pool-left-tight,
    .pool-right-tight {
        margin-left: 4vw;
        margin-right: 4vw;
        max-width: none;
    }

    .surface-content {
        transform: none;
        padding: 0 6vw;
    }

    .radial-chart-surface {
        width: 50vmin;
        height: 50vmin;
        opacity: 0.3;
    }

    .zone-twilight,
    .zone-midnight {
        padding: 4rem 2vw;
    }
}
