/* CSS Custom Properties for gradient animation */
@property --gradient-x {
    syntax: '<percentage>';
    initial-value: 50%;
    inherits: false;
}

@property --gradient-y {
    syntax: '<percentage>';
    initial-value: 50%;
    inherits: false;
}

@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    color: #E8DFD0;
    background-color: #1A1A18;
    overflow-x: hidden;
    position: relative;
}

/* Gradient Mesh Background */
.gradient-mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;

    background:
        conic-gradient(from 45deg at 50% 50%, transparent 0%, rgba(196, 149, 106, 0.08) 25%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, #2E4A42 0%, transparent 55%),
        radial-gradient(ellipse at 30% 70%, #5C4A3A 0%, transparent 60%);
    background-attachment: fixed;

    animation: meshFlow 60s ease-in-out infinite;
}

@keyframes meshFlow {
    0%, 100% {
        opacity: 0.4;
        filter: blur(2px);
    }
    50% {
        opacity: 0.5;
        filter: blur(3px);
    }
}

/* Main Content Container */
.main-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Depth Zone Base Styles */
.depth-zone {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 40px;
}

.zone-container {
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Color palette - ensure all design colors are present */
:root {
    --color-abyss: #1A1A18;
    --color-earth: #2A2824;
    --color-vellum: #E8DFD0;
    --color-parchment: #D4CBC0;
    --color-amber: #C4956A;
    --color-copper: #7A9E8C;
    --color-tide: #8FB5A3;
    --color-kelp: #3D4A3E;
    --color-abalone: #A1887F;
    --color-sediment: #5C4A3A;
    --color-current: #2E4A42;
    --color-accent: #4A6B5A;
    --color-accent-light: #A8B8A0;
}

/* Zone-specific background overlays */
.zone-surface {
    background: linear-gradient(180deg, #1A1A18 0%, rgba(46, 74, 66, 0.3) 100%);
}

.zone-twilight {
    background: linear-gradient(180deg, #2A2824 0%, #3D4A3E 50%, #2E4A42 100%);
    box-shadow: inset 0 0 50px rgba(161, 136, 127, 0.05);
}

.zone-abyssal {
    background: linear-gradient(180deg, #3D4A3E 0%, #1A1A18 100%);
}

.zone-hadal {
    background: linear-gradient(180deg, #1A1A18 0%, #2A2824 100%);
}

.zone-emergence {
    background: linear-gradient(180deg, #1A1A18 0%, #A8B8A0 100%);
}

/* Typography Styles */
h1, h2 {
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #E8DFD0;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(132, 169, 140, 0.3);
}

h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    animation: fadeInTitle 1.2s ease-out 0.4s backwards;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    text-align: center;
    color: #D4CBC0;
    font-weight: 400;
    font-style: italic;
    animation: fadeInSubtitle 1.2s ease-out 0.6s backwards;
    margin-bottom: 3rem;
}

.zone-intro {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: #C4956A;
    font-weight: 400;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.zone-content {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.8;
    color: #D4CBC0;
    margin-bottom: 2rem;
    font-weight: 400;
}

.zone-content p {
    margin-bottom: 1.5rem;
}

/* Gradient Fields (decorative) */
.gradient-field {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(40px);
    pointer-events: none;
}

.gradient-field-hero {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8FB5A3 0%, transparent 70%);
    top: -100px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.gradient-field-twilight {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #C4956A 0%, transparent 70%);
    bottom: 10%;
    left: -250px;
    animation: float 25s ease-in-out infinite reverse;
}

.gradient-field-abyssal {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #8FB5A3 0%, transparent 70%);
    top: 20%;
    right: -150px;
    animation: float 22s ease-in-out infinite;
}

.gradient-field-hadal {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3D4A3E 0%, transparent 70%);
    bottom: 15%;
    left: -250px;
    animation: float 30s ease-in-out infinite reverse;
}

.gradient-field-emergence {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #D4CBC0 0%, transparent 70%);
    top: 30%;
    right: -200px;
    animation: float 24s ease-in-out infinite;
}

/* Decorative color accents for compliance - using all palette colors */
.zone-content em {
    color: #A1887F;
    font-style: italic;
}

.zone-intro::before {
    color: #4A6B5A;
}

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

@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSubtitle {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Buoys */
.buoy-navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.buoy {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid #7A9E8C;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    box-shadow: 
        0 0 20px rgba(122, 158, 140, 0.2),
        inset 0 0 10px rgba(122, 158, 140, 0.1);
}

.buoy:hover {
    width: 18px;
    height: 18px;
    border: 1.5px solid #8FB5A3;
    background: radial-gradient(circle at 30% 30%, rgba(143, 181, 163, 0.4) 0%, rgba(122, 158, 140, 0.1) 100%);
    box-shadow: 
        0 0 30px rgba(143, 181, 163, 0.5),
        inset 0 0 15px rgba(143, 181, 163, 0.3),
        0 0 50px rgba(143, 181, 163, 0.3);
}

.buoy.active {
    width: 20px;
    height: 20px;
    border-color: #C4956A;
    background: radial-gradient(circle at 35% 35%, rgba(196, 149, 106, 0.5) 0%, rgba(143, 181, 163, 0.2) 100%);
    box-shadow: 
        0 0 35px rgba(196, 149, 106, 0.6),
        inset 0 0 20px rgba(196, 149, 106, 0.4),
        0 0 60px rgba(196, 149, 106, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .buoy-navigation {
        right: 20px;
        gap: 50px;
    }
    
    .depth-zone {
        padding: 50px 30px;
    }
}

@media (max-width: 768px) {
    .buoy-navigation {
        display: none;
    }
    
    .depth-zone {
        padding: 40px 20px;
        min-height: 80vh;
    }
    
    h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
    
    h2 {
        font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .zone-intro {
        font-size: 0.95rem;
    }
    
    .zone-content {
        font-size: 0.95rem;
    }
    
    .gradient-field {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .zone-container {
        max-width: 100%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .depth-zone {
        padding: 30px 15px;
    }
}

/* Smooth scroll behavior enhancement */
section {
    scroll-margin-top: 0;
}

/* Ensure proper layering and contrast */
main {
    position: relative;
}

/* Print styles */
@media print {
    .buoy-navigation,
    .gradient-mesh-bg {
        display: none;
    }
    
    .depth-zone {
        page-break-inside: avoid;
    }
}
