/* ============================================================
   slave.quest — Survey Cartography Design System
   Colors: #1A2018, #EEE9DF, #3D5C3A, #2D4A2D, #1C2B1A, #8A9A7E, #F5F0E8, #4A6741
   Fonts: Jost (display), IBM Plex Mono (body)
   ============================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    line-height: 1.65;
    color: #2D4A2D;
    background-color: #EEE9DF;
    position: relative;
    overflow-x: hidden;
}

/* --- Grain Overlay ----------------------------------------- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.10;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 300px 300px;
}

/* Dark section grain modifier — use screen blend */
.section-dark ~ .grain-overlay,
.section-dark .grain-overlay {
    mix-blend-mode: screen;
    opacity: 0.06;
}

/* --- Survey Grid ------------------------------------------- */
.survey-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(rgba(26, 32, 24, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 32, 24, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
}

/* --- Container --------------------------------------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
    position: relative;
    z-index: 2;
}

/* --- Section Utilities ------------------------------------- */
.section-light {
    background-color: #EEE9DF;
    color: #2D4A2D;
}

.section-dark {
    background-color: #1C2B1A;
    color: #EEE9DF;
}

.section-dark .grain-overlay {
    mix-blend-mode: screen;
    opacity: 0.06;
}

/* --- Section Labels ---------------------------------------- */
.section-label {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #8A9A7E;
    margin-bottom: 32px;
}

.section-label.light {
    color: #8A9A7E;
}

/* --- Section Headings -------------------------------------- */
.section-heading {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1A2018;
    line-height: 1.05;
    margin-bottom: 40px;
}

.section-dark .section-heading {
    color: #EEE9DF;
}

.section-heading-large {
    font-family: 'Jost', sans-serif;
    font-size: clamp(5rem, 10vw + 1rem, 10rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #EEE9DF;
    line-height: 0.95;
    margin-bottom: 48px;
}

/* --- Typography -------------------------------------------- */
p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    line-height: 1.65;
    color: #2D4A2D;
    margin-bottom: 24px;
}

.section-dark p {
    color: #EEE9DF;
}

/* ============================================================
   SECTION 1: HERO / SURVEY HEADER
   ============================================================ */
.section-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #EEE9DF;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
}

.hero-text {
    max-width: 55%;
}

/* Field code / coordinate header */
.hero-field-code {
    display: flex;
    gap: 24px;
    align-items: baseline;
    margin-bottom: 24px;
}

.coord-string {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #8A9A7E;
    letter-spacing: 0.08em;
}

.elev-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #8A9A7E;
    letter-spacing: 0.08em;
}

/* Main domain title */
.hero-domain {
    font-family: 'Jost', sans-serif;
    font-size: clamp(3rem, 5vw + 2rem, 8rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1A2018;
    line-height: 1.0;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: #4A6741;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-metadata {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #8A9A7E;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.meta-sep {
    color: #8A9A7E;
    font-size: 10px;
}

/* Mountain SVG container */
.hero-mountain {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60%;
    height: 100%;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.mountain-svg {
    width: 100%;
    height: auto;
    display: block;
}

.ridge {
    will-change: transform;
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 48px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.scroll-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #8A9A7E;
    text-transform: uppercase;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background-color: #8A9A7E;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4A6741;
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ============================================================
   SECTION 2: FIELD NOTES BAND
   ============================================================ */
.section-field-notes {
    padding: 96px 0 96px;
    position: relative;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 58% 4% 38%;
    gap: 0;
    margin-top: 16px;
}

.primary-col {
    padding-right: 0;
}

.secondary-col {
    grid-column: 3;
}

.notation-col {
    padding-left: 24px;
    border-left: 1px solid rgba(26, 32, 24, 0.15);
}

.field-body {
    margin-bottom: 16px;
}

.field-body p {
    font-size: 14px;
    color: #2D4A2D;
}

.field-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(26, 32, 24, 0.20);
    margin: 32px 0;
}

/* Notation blocks (right column) */
.notation-block {
    margin-bottom: 32px;
}

.notation-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #8A9A7E;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.notation-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #2D4A2D;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.notation-coord {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #4A6741;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

/* ============================================================
   SECTION 3: TOPOGRAPHIC (DARK)
   ============================================================ */
.section-topographic {
    position: relative;
    padding: 96px 0;
    overflow: hidden;
}

.contour-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.30;
    pointer-events: none;
}

.contour-svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topo-content {
    position: relative;
    z-index: 2;
}

.section-heading-large {
    color: #EEE9DF;
}

.topo-subtext {
    max-width: 55%;
    margin-bottom: 64px;
}

.topo-subtext p {
    color: rgba(238, 233, 223, 0.75);
    font-size: 13px;
}

.topo-stats {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.topo-stat {
    padding: 0 48px 0 0;
}

.topo-stat:first-child {
    padding-left: 0;
}

.topo-stat-value {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    font-weight: 400;
    color: #EEE9DF;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 8px;
}

.topo-stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #8A9A7E;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.topo-stat-divider {
    width: 1px;
    height: 64px;
    background-color: rgba(138, 154, 126, 0.35);
    margin-right: 48px;
    flex-shrink: 0;
}

/* Contour band texture on section background */
.section-topographic {
    background: #1C2B1A repeating-linear-gradient(
        0deg,
        transparent,
        transparent 7px,
        rgba(74, 103, 65, 0.08) 8px
    );
}

/* ============================================================
   SECTION 4: DETAIL REGISTRY
   ============================================================ */
.section-registry {
    padding: 96px 0;
}

.registry-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 40px 0;
}

.registry-item {}

.registry-label {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #4A6741;
    margin-bottom: 8px;
}

.registry-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #1A2018;
    line-height: 1.4;
    margin-bottom: 8px;
}

.registry-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #8A9A7E;
    line-height: 1.5;
}

.registry-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(26, 32, 24, 0.20);
}

/* ============================================================
   SECTION 5: EXPEDITION FOOTER
   ============================================================ */
.footer-section {
    padding: 64px 0;
    position: relative;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-left {}

.footer-domain {
    font-family: 'Jost', sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #EEE9DF;
    margin-bottom: 4px;
}

.footer-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #8A9A7E;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.compass-rose {
    width: 48px;
    height: 48px;
    display: block;
    transform: rotate(15deg);
}

.footer-coord {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #8A9A7E;
    letter-spacing: 0.1em;
}

.footer-right {
    text-align: right;
}

.footer-year {
    font-family: 'Jost', sans-serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: #EEE9DF;
    margin-bottom: 4px;
}

.footer-datum {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #8A9A7E;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .hero-text {
        max-width: 90%;
    }

    .hero-mountain {
        width: 100%;
        height: 55%;
        bottom: 0;
        opacity: 0.4;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .secondary-col {
        grid-column: 1;
    }

    .notation-col {
        border-left: none;
        border-top: 1px solid rgba(26, 32, 24, 0.15);
        padding-left: 0;
        padding-top: 24px;
        margin-top: 24px;
    }

    .registry-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .topo-subtext {
        max-width: 100%;
    }

    .topo-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
    }

    .topo-stat-divider {
        width: 64px;
        height: 1px;
        margin-right: 0;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right {
        text-align: left;
    }

    .section-field-notes,
    .section-topographic,
    .section-registry {
        padding: 64px 0;
    }
}
