:root {
    --parchment-mist: #f2ece3;
    --charcoal-loam: #3b3228;
    --clay-path: #7a6b5d;
    --terracotta-ember: #b05a3a;
    --oxidized-brass: #8a7e52;
    --morning-haze: #e8e0d4;
    --sandstone-trace: #b8a58c;
    --basalt-shadow: #2a241e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--parchment-mist);
    color: var(--charcoal-loam);
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
    background-image: radial-gradient(circle, var(--sandstone-trace) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0;
    /* Dot grid at very low opacity via a pseudo on body won't work; use overlay approach */
}

/* Dot grid underlay - very faint */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, var(--sandstone-trace) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* Section base */
.section {
    position: relative;
    display: grid;
    grid-template-columns: 58fr 42fr;
    min-height: 100vh;
    padding: 0;
}

/* Content zone - left 58% */
.content-zone {
    position: relative;
    z-index: 2;
    padding: clamp(2rem, 5vw, 6rem);
    padding-right: clamp(1rem, 3vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Atmospheric zone - right 42% */
.atmos-zone {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Fog overlay on atmospheric zone */
.atmos-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 0%, var(--morning-haze) 70%, var(--morning-haze) 100%);
    opacity: 0.6;
    z-index: 2;
    pointer-events: none;
}

/* ===== FOG GATE ===== */
#fog-gate {
    min-height: 100vh;
}

#fog-gate .content-zone {
    justify-content: center;
    padding-top: 20vh;
    padding-bottom: 10vh;
}

.fog-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, var(--morning-haze) 0%, transparent 60%);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    animation: fogSweep 2s 0.4s ease-out forwards;
}

@keyframes fogSweep {
    from { opacity: 0; }
    to { opacity: 0.5; }
}

.site-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 900;
    font-variation-settings: 'WONK' 1, 'opsz' 144;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--charcoal-loam);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.site-tagline {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--clay-path);
    text-transform: uppercase;
}

/* ===== CONTOUR LINES ===== */
.contour-cluster {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.contour-line {
    fill: none;
    stroke: var(--sandstone-trace);
    stroke-opacity: 0.25;
    stroke-width: 1;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease-out;
}

.contour-line.drawn {
    stroke-dashoffset: 0;
}

/* Topo map contours at higher opacity */
.topo-map .contour-line {
    stroke-opacity: 0.5;
}

/* ===== GEOMETRIC MARKERS ===== */
.geo-marker {
    fill: none;
    stroke: var(--terracotta-ember);
    stroke-opacity: 0.8;
    stroke-width: 2;
    transform-origin: center;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 500ms ease-out;
}

.geo-marker.visible {
    transform: scale(1);
    opacity: 1;
}

/* ===== SECTION HEADINGS ===== */
.section-heading {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-variation-settings: 'WONK' 0, 'opsz' 36;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--charcoal-loam);
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    line-height: 1.2;
}

/* ===== BODY TEXT ===== */
.body-text p {
    max-width: 38em;
    margin-bottom: 1.5em;
    color: var(--charcoal-loam);
}

.body-text p:last-child {
    margin-bottom: 0;
}

/* ===== TOPOGRAPHIC BAND ===== */
#topo-band {
    min-height: 100vh;
}

/* ===== SPECIMEN GRID ===== */
#specimen-grid {
    min-height: auto;
    padding-bottom: 4rem;
}

#specimen-grid .content-zone {
    justify-content: flex-start;
    padding-top: clamp(4rem, 8vw, 8rem);
}

.game-cards {
    width: 100%;
    max-width: 42em;
}

.game-card {
    display: grid;
    grid-template-columns: 48px 1fr 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
    position: relative;
}

.game-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.game-card:hover {
    background-image: radial-gradient(circle, var(--sandstone-trace) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0;
}

.game-card:hover .card-shape {
    fill: var(--terracotta-ember);
    fill-opacity: 0.15;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-shape {
    fill: none;
    stroke: var(--terracotta-ember);
    stroke-width: 2;
    transition: fill-opacity 200ms ease;
    fill-opacity: 0;
}

.card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-variation-settings: 'WONK' 0, 'opsz' 24;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--charcoal-loam);
    letter-spacing: -0.02em;
}

.card-desc {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    color: var(--clay-path);
    font-size: 0.95rem;
}

.card-rule {
    border: none;
    height: 1px;
    background-color: var(--sandstone-trace);
    opacity: 0.4;
}

/* ===== SEDIMENT / FOOTER ===== */
#sediment {
    min-height: auto;
    display: block;
    padding: clamp(3rem, 6vw, 6rem);
    border-top: 1px solid rgba(184, 165, 140, 0.3);
}

#sediment .content-zone {
    padding: 0;
    justify-content: flex-start;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-label,
.footer-year {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--clay-path);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.footer-email {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--terracotta-ember);
    text-decoration: none;
    position: relative;
}

.footer-email::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--terracotta-ember);
    transition: width 300ms ease-out;
}

.footer-email:hover::after {
    width: 100%;
}

.footer-markers {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-shape {
    fill: none;
    stroke: var(--terracotta-ember);
    stroke-width: 2;
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section {
        grid-template-columns: 1fr;
    }

    .atmos-zone {
        position: absolute;
        inset: 0;
        opacity: 0.3;
    }

    .content-zone {
        padding: clamp(2rem, 5vw, 4rem);
    }

    .game-card {
        grid-template-columns: 40px 1fr;
    }

    .card-desc {
        grid-column: 2;
    }

    #sediment {
        padding: 2rem;
    }
}
