/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --abyssal-ink: #0A1628;
    --trench-slate: #1A2A3A;
    --sunset-coral: #E8976C;
    --molten-amber: #D4723C;
    --bleached-driftwood: #F0E4D4;
    --bioluminescent-teal: #2EC4B6;
    --horizon-gold: #F2A65A;
    --deep-aquamarine: #0D6E6E;
    --thermal-vent-red: #A63D2F;

    --gradient-sunset: linear-gradient(165deg, #F2A65A 0%, #E8976C 25%, #D4723C 45%, #0D6E6E 70%, #0A1628 100%);
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: 'Literata', serif;
    background-color: var(--abyssal-ink);
    color: var(--bleached-driftwood);
    overflow-x: hidden;
    position: relative;
}

/* SVG Filter for Noise Texture */
svg defs {
    display: none;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background-color: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(46, 196, 182, 0.1);
}

.nav-container {
    display: flex;
    gap: 40px;
}

.nav-item {
    font-family: 'Azeret Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sunset-coral);
    text-decoration: none;
    position: relative;
    padding-bottom: 8px;
    transition: color 300ms ease;
    background-image: linear-gradient(var(--sunset-coral), var(--sunset-coral));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 300ms ease;
}

.nav-item:hover {
    background-size: 100% 1px;
}

.nav-item.active {
    border-bottom: 2px solid var(--bioluminescent-teal);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 48px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(46, 196, 182, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(230, 157, 108, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.8;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: var(--gradient-sunset);
    clip-path: polygon(0 0, 100% 0, 100% 65%, 0 100%);
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-sunset);
    opacity: 0.9;
}

.mountain-range {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    z-index: 0;
}

.mountain-far {
    stroke: var(--deep-aquamarine);
    stroke-width: 1.5px;
    fill: none;
    opacity: 0.3;
    animation: mountainDraw 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0ms;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.mountain-mid {
    stroke: var(--trench-slate);
    stroke-width: 1.5px;
    fill: none;
    opacity: 0.5;
    animation: mountainDraw 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 200ms;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.mountain-near {
    stroke: var(--abyssal-ink);
    stroke-width: 1.5px;
    fill: none;
    opacity: 0.8;
    animation: mountainDraw 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 400ms;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

@keyframes mountainDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.hero-title {
    font-family: 'Anybody', sans-serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    font-variation-settings: 'wght' 800, 'wdth' 115;
    letter-spacing: -0.02em;
    line-height: 0.92;
    transform: rotate(-1.5deg);
    color: var(--abyssal-ink);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    animation: titleReveal 0.6s ease-out 0.4s both;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: rotate(-1.5deg) translateY(20px);
    }
    to {
        opacity: 1;
        transform: rotate(-1.5deg) translateY(0);
    }
}

.hero-cursor {
    width: 3px;
    height: 2.5em;
    background-color: var(--sunset-coral);
    animation: cursorBlink 1.06s step-end infinite;
    opacity: 0;
    animation-delay: 2.3s;
}

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

.fault-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 2;
}

/* Content Sections */
.content-section {
    position: relative;
    padding: 120px 40px;
    background-color: var(--trench-slate);
    scroll-snap-align: start;
    scroll-margin-top: 60px;
    margin-top: -80px;
    z-index: 2;
}

.content-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.8;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.content-section-alt {
    background-color: var(--deep-aquamarine);
}

.section-divider {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1;
}

.ridgeline {
    stroke: var(--bioluminescent-teal);
    stroke-width: 1.5px;
    fill: none;
    opacity: 0.25;
    animation: ridgelineReveal 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

@keyframes ridgelineReveal {
    to {
        stroke-dashoffset: 0;
    }
}

.ridgeline-inverted {
    stroke: var(--thermal-vent-red);
    stroke-width: 1.5px;
    fill: none;
    opacity: 0.15;
    filter: drop-shadow(0 0 8px rgba(166, 61, 47, 0.3));
}

.section-wrapper {
    position: relative;
    z-index: 2;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
}

.content-section:nth-of-type(2) .section-wrapper {
    grid-column: 2 / 10;
    margin-left: 0;
    animation: sectionEnter 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.content-section:nth-of-type(3) .section-wrapper {
    grid-column: 4 / 12;
    margin-right: 0;
    animation: sectionEnterRight 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.content-section:nth-of-type(4) .section-wrapper {
    grid-column: 1 / 9;
    margin-left: 0;
    animation: sectionEnter 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

@keyframes sectionEnter {
    from {
        opacity: 0;
        transform: translateX(-30px) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

@keyframes sectionEnterRight {
    from {
        opacity: 0;
        transform: translateX(30px) rotate(1deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

.section-heading {
    grid-column: 1 / -1;
    font-family: 'Anybody', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    font-variation-settings: 'wght' 700, 'wdth' 100;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--bleached-driftwood);
    clip-path: inset(0 100% 0 0);
    animation: headingReveal 800ms ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes headingReveal {
    to {
        clip-path: inset(0 0% 0 0);
    }
}

.section-body {
    grid-column: 1 / -1;
    font-family: 'Literata', serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.72;
    color: var(--bleached-driftwood);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-body p {
    position: relative;
    z-index: 3;
}

.wave-decoration {
    grid-column: 1 / -1;
    height: 60px;
    margin: 40px 0;
    opacity: 0.12;
    animation: waveShift 12s linear infinite;
}

@keyframes waveShift {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(100px);
    }
}

/* Coral Lattice Corners */
.coral-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.6;
    z-index: 2;
}

.coral-tl {
    top: 40px;
    left: 40px;
}

.coral-tr {
    top: 40px;
    right: 40px;
    transform: scaleX(-1);
}

.coral-bl {
    bottom: 40px;
    left: 40px;
    transform: scaleY(-1);
}

.coral-br {
    bottom: 40px;
    right: 40px;
    transform: scale(-1);
}

/* Footer */
.footer {
    position: relative;
    background-color: var(--abyssal-ink);
    padding: 120px 40px 60px;
    text-align: center;
    margin-top: -80px;
    z-index: 3;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.12'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.8;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.footer::after {
    content: '';
    position: absolute;
    inset: 0;
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    background: linear-gradient(to bottom, transparent, rgba(10, 22, 40, 0.5));
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.footer-divider {
    margin-bottom: 60px;
    height: 80px;
    position: relative;
}

.footer-text {
    font-family: 'Azeret Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sunset-coral);
    margin-bottom: 40px;
    opacity: 0.8;
}

/* Ambient Orbs */
.orb-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: conic-gradient(from 180deg, #2EC4B6, #E8976C, #F2A65A, #0D6E6E, #2EC4B6);
    filter: blur(60px);
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: orbPulse 8s ease-in-out infinite alternate;
}

.orb-ambient-1 {
    width: 200px;
    height: 200px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.orb-ambient-2 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 15%;
    animation-delay: 2s;
}

.orb-ambient-3 {
    width: 180px;
    height: 180px;
    bottom: 15%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes orbPulse {
    0% {
        opacity: 0.15;
        transform: scale(1);
    }
    100% {
        opacity: 0.25;
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navigation {
        height: 56px;
        padding: 0 20px;
    }

    .nav-container {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        font-size: 0.65rem;
    }

    .hero {
        margin-top: 56px;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 4rem);
    }

    .content-section {
        padding: 80px 20px;
    }

    .section-wrapper {
        max-width: 100%;
    }

    .content-section:nth-of-type(2) .section-wrapper,
    .content-section:nth-of-type(3) .section-wrapper,
    .content-section:nth-of-type(4) .section-wrapper {
        grid-column: 1 / -1;
        margin-left: 0;
        margin-right: 0;
    }

    .coral-corner {
        width: 40px;
        height: 40px;
    }

    .coral-tl {
        top: 20px;
        left: 20px;
    }

    .coral-tr {
        top: 20px;
        right: 20px;
    }

    .coral-bl {
        bottom: 20px;
        left: 20px;
    }

    .coral-br {
        bottom: 20px;
        right: 20px;
    }

    .footer {
        padding: 80px 20px 40px;
    }

    .orb {
        filter: blur(40px);
    }

    .orb-ambient-1 {
        width: 120px;
        height: 120px;
    }

    .orb-ambient-2 {
        width: 100px;
        height: 100px;
    }

    .orb-ambient-3 {
        width: 110px;
        height: 110px;
    }
}

/* Print Styles */
@media print {
    .navigation,
    .hero-cursor,
    .orb-container,
    .wave-decoration {
        display: none;
    }
}
