:root {
    --surface: #c4742e;
    --thermocline: #2e6b6a;
    --deep: #7a3b2e;
    --abyss: #1e0f0a;
    --cream: #f5e6d0;
    --sandstone: #d4bfa6;
    --parchment: #e8c4a0;
    --coral: #e07850;
    --patina: #78b8a0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--abyss);
    overflow-x: hidden;
    font-family: 'DM Sans', sans-serif;
    color: var(--sandstone);
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
}

/* Sections */
.section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.section::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    filter: url(#grain);
    mix-blend-mode: overlay;
    opacity: 0.04;
}

.section-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(680px, 85vw);
    margin-left: 15%;
}

/* Section 1: Surface */
.section-surface {
    background: linear-gradient(180deg, #c4742e 0%, #a85a20 100%);
    align-items: flex-start;
    padding-top: 60vh;
}

.section-surface::after {
    opacity: 0.04;
}

.wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--cream);
}

.surface-wave {
    position: absolute;
    bottom: 10%;
    left: 0;
    width: 100%;
    height: 100px;
}

/* Section 2: Thermocline */
.section-thermocline {
    background: linear-gradient(180deg, #a85a20 0%, #2e6b6a 100%);
}

.section-thermocline::after {
    opacity: 0.05;
}

.philosophy-text {
    max-width: 38ch;
}

.philosophy-text p {
    margin-bottom: 2rem;
    color: var(--sandstone);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.philosophy-text p.visible {
    opacity: 1;
    transform: translateY(0);
}

.current-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Section 3: Mesopelagic */
.section-mesopelagic {
    background: linear-gradient(180deg, #2e6b6a 0%, #4a2a1e 100%);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 10vh 0;
}

.section-mesopelagic::after {
    opacity: 0.06;
}

.section-mesopelagic .section-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.project-band {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    padding-bottom: 0.5rem;
    cursor: default;
}

.project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    letter-spacing: -0.03em;
    color: var(--cream);
    white-space: nowrap;
}

.project-connector {
    width: 120px;
    height: 30px;
    flex-shrink: 0;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--sandstone);
    max-width: 30ch;
}

.project-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--coral);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.project-band:hover .project-underline {
    transform: scaleX(1);
}

/* Section 4: Bathypelagic */
.section-bathypelagic {
    background: var(--deep);
}

.section-bathypelagic::after {
    opacity: 0.07;
}

.deep-arc {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.about-content {
    margin-left: auto;
    margin-right: auto;
    max-width: 55ch;
    text-align: center;
}

.about-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    line-height: 1.65;
    color: var(--parchment);
}

/* Section 5: Abyssal */
.section-abyssal {
    background: var(--abyss);
    justify-content: center;
}

.section-abyssal::after {
    opacity: 0.08;
}

.section-abyssal .section-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
}

.abyssal-current {
    width: 200px;
    height: 120px;
}

.contact-email {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--cream);
    text-decoration: none;
    animation: bioluminescence 4s ease-in-out infinite;
    transition: color 0.3s ease-out;
}

.contact-email:hover {
    color: var(--coral);
    animation-play-state: paused;
}

@keyframes bioluminescence {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Bubbles */
.bubble {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cream);
    opacity: 0.12;
    animation: float 6s ease-in-out infinite;
}

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

/* Depth Indicator */
.depth-indicator {
    position: fixed;
    right: 20px;
    top: 10%;
    height: 80%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.depth-line {
    width: 2px;
    height: 0%;
    background: var(--coral);
    transition: height 0.1s linear;
}

.depth-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: var(--sandstone);
    opacity: 0.5;
    margin-top: 8px;
    white-space: nowrap;
}

/* Path draw animation */
.draw-path {
    transition: stroke-dashoffset 2.5s ease-out;
}

.draw-path.drawn {
    stroke-dashoffset: 0 !important;
}

/* Fade-in elements */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .draw-path {
        stroke-dashoffset: 0 !important;
        transition: none;
    }
    .bubble {
        animation: none;
    }
    .contact-email {
        animation: none;
        opacity: 1;
    }
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
