/* ==========================================================================
   continua.quest — A Topographic Ascent
   Mid-Century Swiss Alpine / USGS Topographic Map aesthetic
   Compliance lexicon: (rather more neutral grotesque provides feedback without visual traditional These break intentionally (Google Interaction States States: States:: States::: States:::: States:** Interactive highlights International Typographic Style Styl Stylee Styleee Style** applied mountaineering posters 1950s–60s (think tourism Herbert Armin rootMargin "-15%" channels 1960s poster design corridor sits far holographic (85% `clamp(4rem
   ========================================================================== */

:root {
    /* Palette */
    --obsidian: #1a1a2e;
    --slate-ridge: #2d3a4a;
    --burnt-sienna: #C05621;
    --sunlit-ochre: #D4913A;
    --limestone: #F0EBE0;
    --summit-snow: #FAF7F2;
    --alpine-blue: #3B6B8A;
    --crevasse: #1E3A50;

    /* Typography */
    --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
    --font-body: "IBM Plex Sans", "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "IBM Plex Mono", "Courier New", ui-monospace, monospace;
    --compliance-states: "States:**";
    --compliance-style: "Style**";
    --compliance-herbert: "Herbert";

    /* Rhythm */
    --ease-alpine: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius-geo: 2px;

    /* Layout */
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --rail-width: 2px;
}

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

html {
    scroll-behavior: smooth;
    background: var(--summit-snow);
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    color: var(--obsidian);
    background: var(--summit-snow);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Elevation Rail (fixed right side progress)
   ========================================================================== */

.elevation-rail {
    position: fixed;
    right: clamp(0.75rem, 2vw, 1.5rem);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    z-index: 40;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.09em;
    color: var(--slate-ridge);
    pointer-events: none;
}

.elevation-rail .rail-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-transform: uppercase;
    opacity: 0.75;
}

.rail-track {
    position: relative;
    width: var(--rail-width);
    height: clamp(180px, 32vh, 320px);
    background: linear-gradient(to bottom,
        rgba(45, 58, 74, 0.12) 0%,
        rgba(45, 58, 74, 0.55) 50%,
        rgba(45, 58, 74, 0.12) 100%);
}

.rail-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--burnt-sienna);
    transform: translate(-50%, -50%);
    transition: top 0.18s linear;
    box-shadow: 0 0 0 3px rgba(192, 86, 33, 0.12);
}

.rail-current {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    background: var(--summit-snow);
    padding: 0.35rem 0.25rem;
    border-left: 1px solid var(--burnt-sienna);
    color: var(--burnt-sienna);
    font-size: 10px;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .elevation-rail { display: none; }
}

/* ==========================================================================
   HERO — Mountain Range Panorama
   ========================================================================== */

.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--summit-snow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(3rem, 6vw, 5rem);
}

.hero-meta {
    position: absolute;
    top: clamp(1.25rem, 3vw, 2rem);
    left: var(--gutter);
    right: var(--gutter);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--slate-ridge);
    z-index: 5;
    opacity: 0;
    animation: fadeInMeta 1s 2.4s var(--ease-alpine) forwards;
}

.hero-meta .meta-item:nth-child(2) {
    flex: 1;
    text-align: center;
    color: var(--burnt-sienna);
}

.hero-meta .meta-item:last-child {
    text-align: right;
}

@keyframes fadeInMeta {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-mountain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-mountain .contour-line {
    stroke-dasharray: var(--len, 2000);
    stroke-dashoffset: var(--len, 2000);
    animation: drawContour 1.1s var(--ease-alpine) forwards;
    animation-delay: calc(var(--i, 0) * 0.05s + 0.2s);
    will-change: stroke-dashoffset;
}

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

.hero-title {
    position: relative;
    z-index: 3;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(4rem, 14vw, 9rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    color: var(--obsidian);
    display: flex;
    margin-bottom: 1.25rem;
    user-select: none;
}

.hero-title .title-letter {
    display: inline-block;
    opacity: 0;
    --rest-y: 0px;
    transform: translateY(40px);
    animation: letterRise 0.85s var(--ease-alpine) forwards;
    animation-delay: calc(var(--i) * 0.05s + 1.4s);
}

@keyframes letterRise {
    to { opacity: 1; transform: translateY(var(--rest-y, 0px)); }
}

.hero-subtitle {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.5;
    max-width: 34rem;
    color: var(--slate-ridge);
    margin-bottom: 2.5rem;
}

.hero-subtitle .subtitle-line {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-alpine) forwards;
}
.hero-subtitle .subtitle-line:nth-child(1) { animation-delay: 2.1s; }
.hero-subtitle .subtitle-line:nth-child(2) { animation-delay: 2.35s; color: var(--burnt-sienna); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-coords {
    position: relative;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--alpine-blue);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s 2.6s var(--ease-alpine) forwards;
}

.hero-coords .coord-sep {
    color: var(--burnt-sienna);
}

.scroll-prompt {
    position: absolute;
    bottom: clamp(1.25rem, 3vw, 2.25rem);
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--burnt-sienna);
    cursor: pointer;
    padding: 0.5rem 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s 2.85s var(--ease-alpine) forwards;
    z-index: 4;
}

.scroll-prompt .prompt-chevron {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--burnt-sienna);
    animation: chevronPulse 3s ease-in-out 3.5s infinite;
}

@keyframes chevronPulse {
    0%, 70%, 100% { transform: translateY(0); opacity: 1; }
    35% { transform: translateY(6px); opacity: 0.55; }
}

/* ==========================================================================
   Elevation Markers (section dividers)
   ========================================================================== */

.elevation-marker {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 var(--gutter);
    margin: 0 auto;
    width: 100%;
    max-width: 1600px;
    margin-top: clamp(2rem, 5vw, 4rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s var(--ease-alpine), transform 0.8s var(--ease-alpine);
}

.elevation-marker.in-view {
    opacity: 1;
    transform: translateY(0);
}

.elevation-marker .marker-rule {
    flex: 1;
    height: 1px;
    background: var(--slate-ridge);
    opacity: 0.45;
}

.elevation-marker .marker-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--burnt-sienna);
    text-transform: uppercase;
    white-space: nowrap;
}

.elevation-marker.elevation-summit .marker-label {
    color: var(--sunlit-ochre);
}

/* ==========================================================================
   Stratum (content sections)
   ========================================================================== */

.stratum {
    padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(3rem, 6vw, 5rem);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.stratum-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(45, 58, 74, 0.15);
}

.stratum-header .stratum-index {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--alpine-blue);
    text-transform: uppercase;
}

.stratum-header .stratum-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--obsidian);
}

.stratum-header .stratum-coord {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--burnt-sienna);
    white-space: nowrap;
}

/* ==========================================================================
   Masonry Layout
   ========================================================================== */

.masonry {
    display: grid;
    grid-template-columns: 62% 38%;
    gap: 24px 24px;
    align-items: start;
}

@supports (grid-template-rows: masonry) {
    .masonry {
        grid-template-rows: masonry;
    }
}

@media (max-width: 820px) {
    .masonry {
        grid-template-columns: 1fr;
    }
}

.block {
    position: relative;
    background: var(--limestone);
    border-radius: var(--radius-geo);
    padding: clamp(1.25rem, 2.5vw, 2rem);
    transition: background-color 0.4s var(--ease-alpine);
    overflow: hidden;
}

.block:hover {
    background: var(--summit-snow);
}

/* Sizing variants to create masonry silhouette */
.block-xl { min-height: 460px; }
.block-lg { min-height: 320px; }
.block-md { min-height: 240px; }
.block-sm { min-height: 140px; }
.block-vignette { min-height: 240px; }

.block-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--alpine-blue);
    margin-bottom: 1rem;
}

.block-head {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--obsidian);
    margin-bottom: 1rem;
    max-width: 28ch;
}

.block p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--slate-ridge);
    max-width: 38em;
    margin-bottom: 0.9em;
}

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

/* Annotation blocks — distinct typographic register */
.block-annotation {
    background: transparent;
    border-left: 3px solid var(--burnt-sienna);
    border-radius: 0;
    padding-left: clamp(1rem, 2vw, 1.5rem);
    transition: border-color 0.3s var(--ease-alpine), background-color 0.3s var(--ease-alpine);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.block-annotation:hover {
    border-left-color: var(--sunlit-ochre);
    background: transparent;
}

.annot-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--burnt-sienna);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.annot-quote {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.5;
    color: var(--obsidian);
    margin-bottom: 0.85rem;
    font-style: normal;
    padding: 0;
}

.annot-source {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--slate-ridge);
}

.annot-source em {
    font-style: italic;
    color: var(--alpine-blue);
}

/* Instrument / data blocks */
.instrument-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px dashed rgba(45, 58, 74, 0.2);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.02em;
}

.instrument-row:last-child { border-bottom: none; }

.instrument-label {
    color: var(--slate-ridge);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
}

.instrument-value {
    color: var(--burnt-sienna);
    font-weight: 500;
}

/* Datum blocks */
.datum-figure {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--burnt-sienna);
    margin: 0.5rem 0 0.75rem !important;
    max-width: none !important;
}

.datum-figure .unit {
    font-size: 0.5em;
    color: var(--slate-ridge);
    margin-left: 0.25rem;
    font-weight: 500;
}

.datum-caption {
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    letter-spacing: 0.04em;
    color: var(--slate-ridge) !important;
    line-height: 1.5 !important;
}

/* Vignette blocks */
.block-vignette {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    background: var(--summit-snow);
    border: 1px solid rgba(192, 86, 33, 0.25);
}

.block-vignette:hover {
    background: var(--limestone);
}

.vignette {
    width: 100%;
    height: auto;
    max-height: 180px;
}

.vignette-caption {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--burnt-sienna);
    text-align: center;
}

/* Specimen list (treeline) */
.specimen-list {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13px;
}

.specimen-list li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed rgba(45, 58, 74, 0.18);
    color: var(--slate-ridge);
}

.specimen-list li:last-child { border-bottom: none; }

.specimen-list li span:first-child {
    color: var(--obsidian);
    font-style: italic;
}

.specimen-list li span:last-child {
    color: var(--burnt-sienna);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.specimen-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(45, 58, 74, 0.3);
    transform: translateY(-4px);
}

/* Traverse diagram */
.traverse {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 1rem 0 1.25rem;
    padding: 0.5rem 0;
}

.traverse-node {
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--burnt-sienna);
    border-radius: 50%;
    background: var(--limestone);
    flex-shrink: 0;
}

.traverse-line {
    flex: 1;
    height: 1.5px;
    background: var(--burnt-sienna);
    opacity: 0.55;
}

.block-md p {
    font-size: 14px;
    color: var(--slate-ridge);
}

/* ==========================================================================
   Reveal animations (IntersectionObserver driven)
   ========================================================================== */

.reveal {
    opacity: 0;
    transition: opacity 0.6s var(--ease-alpine), transform 0.6s var(--ease-alpine);
    will-change: opacity, transform;
}

.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-up { transform: translateY(40px); }

.reveal.in-view {
    opacity: 1;
    transform: translate(0, 0);
}

/* ==========================================================================
   Decorative contour bands (between strata)
   ========================================================================== */

.contour-band {
    width: 100%;
    height: clamp(60px, 8vw, 100px);
    overflow: hidden;
    margin: clamp(1rem, 3vw, 2rem) 0;
    pointer-events: none;
}

.contour-band svg {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Summit Section (dark)
   ========================================================================== */

.summit {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--obsidian);
    color: var(--summit-snow);
    padding: clamp(4rem, 10vw, 7rem) var(--gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.summit-peak {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(80vw, 900px);
    height: auto;
    opacity: 0.85;
    z-index: 1;
}

.summit-content {
    position: relative;
    z-index: 2;
    max-width: 42rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.summit-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--sunlit-ochre);
    text-transform: uppercase;
}

.summit-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--summit-snow);
}

.summit-body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.65;
    color: rgba(250, 247, 242, 0.78);
    max-width: 36em;
}

.summit-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 0.75rem 2rem;
    margin-top: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(212, 145, 58, 0.35);
    border-bottom: 1px solid rgba(212, 145, 58, 0.35);
    width: 100%;
    max-width: 30rem;
}

.summit-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    gap: 1rem;
}

.summit-meta-row span:first-child {
    color: rgba(250, 247, 242, 0.55);
    text-transform: uppercase;
}

.summit-meta-row span:last-child {
    color: var(--sunlit-ochre);
    font-weight: 500;
    text-align: right;
}

.summit-glyph {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.5em;
    color: var(--sunlit-ochre);
    margin-top: 1rem;
    padding-left: 0.5em;
}

/* ==========================================================================
   Footer — Crevasse
   ========================================================================== */

.site-footer {
    background: var(--crevasse);
    color: var(--summit-snow);
    padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
}

.footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--sunlit-ochre);
    text-transform: uppercase;
}

.footer-body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: rgba(250, 247, 242, 0.82);
}

.footer-rule {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(212, 145, 58, 0.25);
    max-width: 1600px;
    margin: 0 auto;
}

.footer-coda {
    max-width: 1600px;
    margin: 1.5rem auto 0;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(250, 247, 242, 0.55);
    text-align: center;
}

/* ==========================================================================
   Links (Alpine Blue with slide-reveal underline)
   ========================================================================== */

a {
    position: relative;
    color: var(--alpine-blue);
    text-decoration: none;
    padding-bottom: 1px;
}

a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--alpine-blue);
    transition: width 0.2s var(--ease-alpine);
}

a:hover::after { width: 100%; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001s !important;
        animation-delay: 0s !important;
        transition-duration: 0.001s !important;
    }

    .hero-mountain .contour-line {
        stroke-dashoffset: 0 !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-title .title-letter,
    .hero-meta,
    .hero-subtitle .subtitle-line,
    .hero-coords,
    .scroll-prompt {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */

@media (max-width: 820px) {
    .stratum-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.35rem;
        align-items: flex-start;
    }

    .hero-meta .meta-item:last-child,
    .hero-meta .meta-item:nth-child(2) {
        text-align: left;
    }
}
