/* ========================================
   desca.dev - Coastal Geological Survey
   Flat Design / Stacked Sections
   ======================================== */

/* CSS Custom Properties */
:root {
    --color-slate: #1B3A4B;
    --color-teal: #2C5F5D;
    --color-sandstone: #D4956B;
    --color-linen: #F4EDE4;
    --color-seaglass: #B8C4C0;
    --color-kelp: #1E2D2F;
    --color-ember: #E07A52;
    --color-graphite: #3B3B3B;
    --color-bleached: #E8E0D4;

    --font-display: 'Bebas Neue', sans-serif;
    --font-label: 'Archivo', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --grid-columns: 6;
    --grid-gutter: 48px;
    --grid-margin: 80px;
}

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

html {
    scroll-behavior: auto;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--color-graphite);
    background-color: var(--color-linen);
    overflow-x: hidden;
}

/* Stipple texture for light sections */
.section--sky,
.section--cliff .cliff-upper {
    background-image: radial-gradient(circle, var(--color-graphite) 0.5px, transparent 0.5px);
    background-size: 6px 6px;
    background-blend-mode: multiply;
}

.section--sky {
    background-color: var(--color-linen);
}

/* ========================================
   Progress Bar
   ======================================== */
.progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 0%;
    background-color: var(--color-teal);
    z-index: 1000;
}

/* ========================================
   Typography
   ======================================== */
.headline {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 0.92;
    color: var(--color-slate);
    text-transform: uppercase;
}

.headline--hero {
    font-size: clamp(72px, 12vw, 120px);
}

.headline--section {
    font-size: clamp(56px, 8vw, 96px);
    margin-bottom: 32px;
}

.headline--light {
    color: var(--color-linen);
}

.label {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-teal);
    display: block;
    margin-bottom: 16px;
}

.label--light {
    color: var(--color-seaglass);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.65;
    color: var(--color-graphite);
    max-width: 540px;
}

.body-text--light {
    color: var(--color-bleached);
}

.mono-text {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--color-teal);
    margin-top: 24px;
}

/* ========================================
   Section Layout
   ======================================== */
.section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.section__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    gap: var(--grid-gutter);
    padding: 0 var(--grid-margin);
    height: 100%;
    align-items: center;
}

.section__content {
    grid-column: 1 / 5;
}

.section__content--centered {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========================================
   Section 1: Sky
   ======================================== */
.section--sky {
    background-color: var(--color-linen);
}

.section--sky .geo-shape--triangle {
    position: absolute;
    top: 10%;
    right: 12%;
    width: 180px;
    height: auto;
    z-index: 1;
}

/* ========================================
   Section 2: Cliff Face
   ======================================== */
.section--cliff {
    background: transparent;
}

.cliff-upper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background-color: var(--color-linen);
}

.cliff-lower {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background-color: var(--color-slate);
}

.cliff-mesh {
    position: absolute;
    top: 30%;
    left: 0;
    width: 100%;
    height: 25%;
    z-index: 1;
}

.mesh-sandstone {
    width: 100%;
    height: 100%;
}

.section__grid--cliff {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
}

.section__content--cliff {
    grid-column: 1 / 4;
    padding-top: 8vh;
}

.section__content--cliff .body-text {
    color: var(--color-graphite);
}

.hexagon-cluster {
    position: absolute;
    bottom: 12%;
    right: 10%;
    z-index: 2;
    width: 280px;
    height: 220px;
}

.hexagon-cluster .hex-1 {
    position: absolute;
    width: 140px;
    top: 0;
    left: 0;
}

.hexagon-cluster .hex-2 {
    position: absolute;
    width: 100px;
    top: 60px;
    left: 110px;
}

.hexagon-cluster .hex-3 {
    position: absolute;
    width: 80px;
    top: 120px;
    left: 40px;
}

/* ========================================
   Section 3: Descent
   ======================================== */
.section--descent {
    background-color: var(--color-kelp);
}

.section--descent .geo-shape--circle {
    position: absolute;
    top: 50%;
    left: -80px;
    width: 280px;
    height: 280px;
    transform: translateY(-50%);
    z-index: 1;
}

/* ========================================
   Section 4: Tidal Pool
   ======================================== */
.section--tidal {
    display: flex;
    background-color: var(--color-slate);
}

.tidal-text {
    width: 33.333%;
    height: 100%;
    background-color: var(--color-slate);
    display: flex;
    align-items: center;
    z-index: 2;
}

.tidal-text .section__grid {
    display: flex;
    padding: 0 48px;
}

.tidal-mesh {
    width: 66.667%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.mesh-tidal {
    width: 100%;
    height: 100%;
}

.tidal-triangle {
    position: absolute;
    bottom: 15%;
    left: 25%;
    width: 120px;
    z-index: 3;
}

/* ========================================
   Section 5: Seabed
   ======================================== */
.section--seabed {
    background-color: var(--color-kelp);
}

.seabed-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mesh-depth {
    width: 100%;
    height: 100%;
}

.seabed-content {
    z-index: 2;
}

.seabed-divider {
    width: 50%;
    max-width: 400px;
    height: 1px;
    background-color: var(--color-seaglass);
    margin: 24px auto;
}

/* ========================================
   Geometric Shapes (General)
   ======================================== */
.geo-shape {
    pointer-events: none;
}

.parallax-element {
    will-change: transform;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    :root {
        --grid-margin: 24px;
        --grid-gutter: 24px;
    }

    .section__content {
        grid-column: 1 / -1;
    }

    .section__content--cliff {
        grid-column: 1 / -1;
    }

    .headline--hero {
        font-size: 56px;
    }

    .headline--section {
        font-size: 48px;
    }

    .hexagon-cluster {
        right: 5%;
        bottom: 8%;
        width: 200px;
        height: 160px;
    }

    .hexagon-cluster .hex-1 {
        width: 100px;
    }

    .hexagon-cluster .hex-2 {
        width: 70px;
        top: 40px;
        left: 80px;
    }

    .hexagon-cluster .hex-3 {
        width: 60px;
        top: 90px;
        left: 30px;
    }

    .section--tidal {
        flex-direction: column;
    }

    .tidal-text {
        width: 100%;
        height: 40%;
    }

    .tidal-mesh {
        width: 100%;
        height: 60%;
    }

    .section--sky .geo-shape--triangle {
        width: 120px;
        top: 8%;
        right: 8%;
    }

    .section--descent .geo-shape--circle {
        width: 200px;
        height: 200px;
        left: -60px;
    }
}