/* ============================================================
   GGOGGL.com - Styles
   Color Palette:
     Void Black:          #0a0a12
     Lens Amber:          #d4a04a
     Bioluminescent Teal: #14c8b0
     Refraction Violet:   #7b2d8e
     Deep Indigo:         #1a1a3e
     Fog White:           #e8e4df
     Coral Signal:        #e85d4a
   Fonts:
     Display:  Playfair Display
     Body:     Source Sans 3
     Accent:   Space Mono
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: #0a0a12;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e8e4df;
    background: #0a0a12;
    overflow-x: hidden;
}

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

/* --- Vignette Overlay --- */
.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(10, 10, 18, 0.4) 70%, rgba(10, 10, 18, 0.85) 100%);
    transition: opacity 0.5s ease;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- Radial Navigation --- */
.radial-nav {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
}

.nav-dial {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(10, 10, 18, 0.7);
    border: 1px solid rgba(212, 160, 74, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.nav-dial:hover {
    border-color: rgba(20, 200, 176, 0.6);
    transform: scale(1.05);
}

.nav-dial svg {
    display: block;
}

.nav-ring {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 260px;
    height: 260px;
    transform-origin: calc(100% - 28px) calc(100% - 28px);
}

.nav-ring[hidden] {
    display: none;
}

.nav-ring.open {
    display: block;
}

.nav-marker {
    position: absolute;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    margin-bottom: -22px;
    margin-right: -22px;
    border-radius: 50%;
    background: rgba(26, 26, 62, 0.8);
    border: 1px solid rgba(212, 160, 74, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #e8e4df;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    transform: rotate(var(--angle)) translateY(-110px) rotate(calc(-1 * var(--angle)));
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    backdrop-filter: blur(4px);
}

.nav-ring.open .nav-marker {
    opacity: 1;
}

.nav-ring.open .nav-marker:nth-child(1) { transition-delay: 0.05s; }
.nav-ring.open .nav-marker:nth-child(2) { transition-delay: 0.1s; }
.nav-ring.open .nav-marker:nth-child(3) { transition-delay: 0.15s; }
.nav-ring.open .nav-marker:nth-child(4) { transition-delay: 0.2s; }
.nav-ring.open .nav-marker:nth-child(5) { transition-delay: 0.25s; }
.nav-ring.open .nav-marker:nth-child(6) { transition-delay: 0.3s; }

.nav-marker:hover {
    border-color: #14c8b0;
    background: rgba(20, 200, 176, 0.15);
}

.nav-label {
    white-space: nowrap;
    pointer-events: none;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Lens Zones (Sections) --- */
.lens-zone {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

/* --- Depth Layers --- */
.zone-depth-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-back {
    z-index: 1;
    opacity: 0.5;
}

.layer-mid {
    z-index: 2;
    opacity: 0.3;
}

.layer-front {
    z-index: 3;
    position: relative;
}

/* --- Aperture Mask --- */
.aperture-mask {
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lens-zone.in-view .aperture-mask {
    clip-path: circle(75% at 50% 50%);
}

/* --- Concentric Rings --- */
.concentric-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(212, 160, 74, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 { width: 200px; height: 200px; }
.ring-2 { width: 360px; height: 360px; }
.ring-3 { width: 520px; height: 520px; }
.ring-4 { width: 680px; height: 680px; }
.ring-5 { width: 840px; height: 840px; }
.ring-6 { width: 1000px; height: 1000px; }

.offset-rings {
    transform: translate(-40%, -45%);
}

.abyss-rings .ring {
    border-color: rgba(20, 200, 176, 0.08);
}

.resurface-rings .ring {
    border-color: rgba(212, 160, 74, 0.1);
    animation: ring-pulse 6s ease-in-out infinite;
}

.resurface-rings .ring-2 { animation-delay: 1.5s; }
.resurface-rings .ring-3 { animation-delay: 3s; }
.resurface-rings .ring-4 { animation-delay: 4.5s; }

@keyframes ring-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* --- Caustic Overlay --- */
.caustic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 30% 40%, rgba(20, 200, 176, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 400px 600px at 70% 60%, rgba(212, 160, 74, 0.04) 0%, transparent 70%);
    animation: caustic-drift 12s ease-in-out infinite alternate;
}

.caustic-variant-2 {
    background:
        radial-gradient(ellipse 500px 500px at 50% 50%, rgba(20, 200, 176, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 300px 500px at 25% 70%, rgba(123, 45, 142, 0.05) 0%, transparent 70%);
}

.caustic-variant-3 {
    background:
        radial-gradient(ellipse 700px 500px at 40% 45%, rgba(20, 200, 176, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 65% 55%, rgba(212, 160, 74, 0.06) 0%, transparent 60%);
}

.caustic-variant-4 {
    background:
        radial-gradient(ellipse 500px 500px at 50% 50%, rgba(123, 45, 142, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 400px 300px at 30% 30%, rgba(232, 93, 74, 0.05) 0%, transparent 70%);
}

.caustic-variant-5 {
    background:
        radial-gradient(ellipse 600px 600px at 50% 50%, rgba(212, 160, 74, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(20, 200, 176, 0.06) 0%, transparent 60%);
}

@keyframes caustic-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -15px) scale(1.05); }
}

/* --- Zone Backgrounds --- */
.zone-naked-eye {
    background: radial-gradient(ellipse at center, #0a0a12 0%, #0a0a12 100%);
}

.zone-first-lens {
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a12 70%);
}

.zone-deep-focus {
    background: radial-gradient(ellipse at center, rgba(20, 200, 176, 0.08) 0%, #1a1a3e 40%, #0a0a12 80%);
}

.zone-prismatic {
    background: radial-gradient(ellipse at center, rgba(123, 45, 142, 0.1) 0%, #1a1a3e 50%, #0a0a12 85%);
}

.zone-abyss {
    background: radial-gradient(ellipse at center, rgba(10, 10, 18, 0.95) 0%, #0a0a12 100%);
}

.zone-resurface {
    background: radial-gradient(ellipse at center, rgba(212, 160, 74, 0.06) 0%, #1a1a3e 50%, #0a0a12 85%);
}

/* --- Typography: Chromatic Aberration --- */
.zone-heading,
.wordmark {
    position: relative;
    display: inline-block;
}

.wordmark {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.zone-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.chromatic-layer {
    display: block;
}

.chromatic-red,
.chromatic-green,
.chromatic-blue {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chromatic-red {
    color: #e85d4a;
    opacity: 0.3;
    transform: translate(-2px, 0);
}

.chromatic-green {
    color: #14c8b0;
    opacity: 0.3;
    transform: translate(1px, 1px);
}

.chromatic-blue {
    color: #7b2d8e;
    opacity: 0.3;
    transform: translate(2px, -1px);
}

.chromatic-main {
    position: relative;
    color: #e8e4df;
    z-index: 1;
}

/* --- Body Text --- */
.zone-body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(232, 228, 223, 0.85);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* --- Mono Accent --- */
.mono-accent {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: rgba(212, 160, 74, 0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* --- Zone 1: Naked Eye --- */
.zone-naked-eye .aperture-mask {
    padding-top: 0;
}

.zone-subtitle {
    margin-top: 1.5rem;
    opacity: 0;
    transition: opacity 1.5s ease 0.8s;
}

.zone-naked-eye.in-view .zone-subtitle {
    opacity: 1;
}

/* --- Zone 2: First Lens --- */
.lens-frame {
    width: 500px;
    max-width: 85vw;
    height: 500px;
    max-height: 85vw;
    border-radius: 50%;
    border: 1px solid rgba(20, 200, 176, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.lens-frame::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(212, 160, 74, 0.15);
}

.lens-frame::after {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    border: 1px solid rgba(232, 228, 223, 0.06);
}

.lens-content {
    padding: 3rem 2.5rem;
    text-align: center;
}

/* --- Zone 3: Deep Focus --- */
.deep-focus-content {
    text-align: center;
}

.focus-orbs {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.orb {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(20, 200, 176, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.4s ease, transform 0.4s ease;
}

.orb::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(212, 160, 74, 0.1);
}

.orb:hover {
    border-color: rgba(20, 200, 176, 0.5);
    transform: scale(1.05);
}

.orb-inner {
    text-align: center;
}

.orb-icon {
    display: block;
    margin: 0 auto 0.5rem;
}

.orb-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(232, 228, 223, 0.7);
}

/* --- Zone 4: Prismatic Split --- */
.prism-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 60vh;
    transform-origin: top center;
    opacity: 0.15;
}

.ray-teal {
    background: linear-gradient(to bottom, transparent, #14c8b0);
    transform: translate(-50%, 0) rotate(-20deg);
}

.ray-amber {
    background: linear-gradient(to bottom, transparent, #d4a04a);
    transform: translate(-50%, 0) rotate(15deg);
}

.ray-violet {
    background: linear-gradient(to bottom, transparent, #7b2d8e);
    transform: translate(-50%, 0) rotate(-45deg);
}

.ray-coral {
    background: linear-gradient(to bottom, transparent, #e85d4a);
    transform: translate(-50%, 0) rotate(40deg);
}

.spectrum-fragments {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.fragment {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zone-prismatic.in-view .fragment {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.zone-prismatic.in-view .fragment-2 { transition-delay: 0.2s; }
.zone-prismatic.in-view .fragment-3 { transition-delay: 0.4s; }

.fragment-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(20, 200, 176, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    background: radial-gradient(circle at center, rgba(26, 26, 62, 0.5) 0%, rgba(10, 10, 18, 0.3) 100%);
    transition: border-color 0.3s ease;
}

.fragment-1 .fragment-circle {
    border-color: rgba(20, 200, 176, 0.3);
}

.fragment-2 .fragment-circle {
    border-color: rgba(212, 160, 74, 0.3);
}

.fragment-3 .fragment-circle {
    border-color: rgba(123, 45, 142, 0.3);
}

.fragment-circle:hover {
    border-color: rgba(232, 228, 223, 0.4);
}

.fragment-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(232, 228, 223, 0.8);
    text-align: center;
}

/* --- Zone 5: The Abyss --- */
.abyss-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(20, 200, 176, 0.12) 0%, transparent 70%);
    animation: abyss-pulse 5s ease-in-out infinite;
}

@keyframes abyss-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}

.abyss-atmosphere {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 2rem auto;
}

.deep-particle {
    position: absolute;
    border-radius: 50%;
    background: #14c8b0;
    animation: deep-float 8s ease-in-out infinite;
}

.deep-particle-1 {
    width: 4px; height: 4px; top: 20%; left: 25%; opacity: 0.4;
    animation-delay: 0s;
}
.deep-particle-2 {
    width: 2px; height: 2px; top: 60%; left: 70%; opacity: 0.6;
    animation-delay: 1.5s;
}
.deep-particle-3 {
    width: 3px; height: 3px; top: 40%; left: 50%; opacity: 0.3;
    animation-delay: 3s;
}
.deep-particle-4 {
    width: 2px; height: 2px; top: 75%; left: 35%; opacity: 0.5;
    animation-delay: 4.5s;
}
.deep-particle-5 {
    width: 3px; height: 3px; top: 15%; left: 80%; opacity: 0.35;
    animation-delay: 6s;
}

@keyframes deep-float {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    25% { transform: translate(10px, -15px); }
    50% { transform: translate(-5px, -25px); opacity: 0.6; }
    75% { transform: translate(15px, -10px); }
}

.abyss-heading {
    opacity: 0.7;
}

.abyss-text {
    color: rgba(232, 228, 223, 0.6);
}

.abyss-meta {
    color: rgba(20, 200, 176, 0.3);
}

/* --- Zone 6: Resurface --- */
.resurface-heading .chromatic-main {
    color: #d4a04a;
}

.resurface-text {
    color: rgba(232, 228, 223, 0.9);
}

.resurface-sigil {
    margin: 2.5rem auto;
    display: flex;
    justify-content: center;
    animation: sigil-breathe 4s ease-in-out infinite;
}

@keyframes sigil-breathe {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

.resurface-meta {
    color: rgba(212, 160, 74, 0.6);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
}

/* --- Section Transition Effects --- */
.lens-zone {
    perspective: 800px;
}

.lens-zone .zone-depth-layer.layer-front {
    transition: transform 0.8s ease;
}

.lens-zone.transitioning .zone-depth-layer.layer-front {
    transform: rotateX(2deg) scale(0.98);
}

/* --- Ripple Effect on Scroll --- */
.lens-zone.ripple-active {
    filter: url(#ripple-distort);
    transition: filter 0.6s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .wordmark {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .zone-heading {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }

    .lens-frame {
        width: 320px;
        height: 320px;
    }

    .lens-content {
        padding: 2rem 1.5rem;
    }

    .focus-orbs {
        gap: 1.5rem;
    }

    .orb {
        width: 110px;
        height: 110px;
    }

    .fragment-circle {
        width: 180px;
        height: 180px;
        padding: 1.5rem;
    }

    .fragment-text {
        font-size: 0.8rem;
    }

    .spectrum-fragments {
        gap: 1.5rem;
    }

    .radial-nav {
        bottom: 1rem;
        right: 1rem;
    }

    .nav-ring {
        width: 220px;
        height: 220px;
    }

    .nav-marker {
        transform: rotate(var(--angle)) translateY(-90px) rotate(calc(-1 * var(--angle)));
    }
}

@media (max-width: 480px) {
    .focus-orbs {
        flex-direction: column;
        align-items: center;
    }

    .spectrum-fragments {
        flex-direction: column;
        align-items: center;
    }

    .lens-frame {
        width: 260px;
        height: 260px;
    }

    .lens-content {
        padding: 1.5rem 1rem;
    }

    .zone-body {
        font-size: 1rem;
        padding: 0 1rem;
    }
}
