/* =============================================================
   footprint.bar — Geological Descent
   A decommissioned space observatory repurposed as a meditation
   retreat. Cool grays with violet undertones, grain overlay,
   stacked-section vertical procession.
   Design compliance vocabulary: (date formats (0.7rem descend" This deepest Mono" (Google Interaction Specifications* Specifications Specifications:** IntersectionObserver` `threshold: 0.15`. Sections begin `opacity: `clamp(1.6rem (the largest page typeface channeling 1970s mission-control aesthetics rendered zen-contemplative silence. Grotesk's geometry while maintaining excellent readability `clamp(1rem Grotesk"
   ============================================================= */

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

:root {
    /* Palette */
    --limestone: #EDEAF0;
    --basalt:    #1A1720;
    --shale:     #2A2730;
    --graphite:  #1E1B24;
    --chalk:     #D8D4DE;
    --slate:     #4A4650;
    --fog:       #C8C4CC;
    --fossil:    #7A7580;
    --rule:      #B0ADB5;
    --ember:     #8C6A5A;

    /* Type */
    --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --body:    'DM Sans', 'Inter', system-ui, sans-serif;
    --mono:    'IBM Plex Mono', 'Menlo', monospace;

    /* Easing */
    --settle: cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    font-family: var(--body);
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: var(--slate);
    background: var(--limestone);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.4s var(--settle);
}

a:hover,
a:focus-visible {
    color: var(--ember);
}

/* The inline SVG defs block must be invisible but kept in flow. */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
    overflow: hidden;
}

/* -------- Wordmark (fixed, unobtrusive) -------- */
.wordmark {
    position: fixed;
    left: clamp(1rem, 2.4vw, 2rem);
    bottom: clamp(1rem, 2.4vw, 2rem);
    z-index: 50;
    font-family: var(--display);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--graphite);
    opacity: 0.4;
    mix-blend-mode: difference;
    pointer-events: none;
    user-select: none;
}

/* -------- Progress bar (right edge, seismograph needle) -------- */
.progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 0;
    background: var(--fossil);
    z-index: 60;
    opacity: 0;
    transition: opacity 0.6s var(--settle);
    pointer-events: none;
}

.progress-bar.is-visible {
    opacity: 0.8;
}

/* =============================================================
   Geological Column — stacked section structure
   ============================================================= */
.geological-column {
    display: block;
    width: 100%;
}

.stratum {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding-top:    clamp(6rem, 12vh, 10rem);
    padding-bottom: clamp(6rem, 12vh, 10rem);
    border-top: 1px solid var(--rule);
    background: var(--limestone);
    color: var(--graphite);
    overflow: hidden;
    isolation: isolate;
    /* Reveal state */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.stratum:first-of-type {
    border-top: none;
}

.stratum--dark {
    background: var(--basalt);
    color: var(--chalk);
}

.stratum--dark .body-block,
.stratum--dark p {
    color: var(--fog);
}

/* Inner grid: minmax(2rem, 1fr) | minmax(auto, 720px) | minmax(2rem, 1fr) */
.grid-row {
    display: grid;
    grid-template-columns: minmax(2rem, 1fr) minmax(auto, 720px) minmax(2rem, 1fr);
    width: 100%;
    min-height: calc(100vh - 24rem);
    align-items: center;
}

.grid-col {
    grid-column: 2 / 3;
    width: 100%;
}

.grid-col--center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2rem, 4vh, 3rem);
}

/* -------- Grain overlay (per-section ::after-style element) -------- */
.grain {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 220px 220px;
}

.grain--dark {
    opacity: 0.12;
    mix-blend-mode: soft-light;
}

.grain--faint {
    opacity: 0.04;
    mix-blend-mode: multiply;
}

/* -------- Fossil-layer marble divider band (60px) -------- */
.fossil-layer {
    position: relative;
    height: 60px;
    width: 100%;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background:
        repeating-linear-gradient(
            87deg,
            transparent 0px,
            transparent 12px,
            rgba(122, 117, 128, 0.15) 12px,
            rgba(122, 117, 128, 0.15) 13px,
            transparent 13px,
            transparent 26px
        ),
        repeating-linear-gradient(
            143deg,
            transparent 0px,
            transparent 18px,
            rgba(122, 117, 128, 0.10) 18px,
            rgba(122, 117, 128, 0.10) 19px,
            transparent 19px,
            transparent 38px
        ),
        linear-gradient(135deg, #D8D4DE 0%, #EDEAF0 50%, #C8C4CC 100%);
    overflow: hidden;
    isolation: isolate;
}

.fossil-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 220px 220px;
    opacity: 0.10;
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* =============================================================
   Typography
   ============================================================= */
.headline {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--graphite);
}

.stratum--dark .headline {
    color: var(--chalk);
}

.headline--primary {
    font-size: clamp(2.4rem, 5.5vw, 5rem);
    margin-bottom: clamp(2rem, 4vh, 3rem);
}

.headline--secondary {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.headline--display {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.0;
    letter-spacing: -0.03em;
}

.body-block {
    max-width: 58ch;
    margin: 0 auto;
    color: inherit;
    font-family: var(--body);
    font-weight: 400;
}

.body-block p + p {
    margin-top: 1.4rem;
}

.caption {
    font-family: var(--mono);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fossil);
    line-height: 1.4;
}

.caption--top {
    margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.caption--ember-link {
    margin-top: 1.4rem;
}

/* =============================================================
   Section heads (waveform + caption row)
   ============================================================= */
.section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: clamp(2.4rem, 5vh, 4rem);
}

.section-head--centered {
    justify-content: center;
    margin-bottom: clamp(2rem, 4vh, 3rem);
}

.waveform {
    width: 120px;
    height: 24px;
    flex-shrink: 0;
    overflow: visible;
}

.waveform--vertical {
    width: 24px;
    height: 240px;
}

.waveform--surface {
    width: 140px;
    height: 28px;
    margin-top: 0.6rem;
    opacity: 0.7;
}

.waveform--bedrock {
    width: 90px;
    height: 18px;
    opacity: 0.55;
}

/* =============================================================
   Section 1: Surface — central seal circle
   ============================================================= */
.stratum--surface {
    background: var(--limestone);
}

.surface-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.4rem;
}

.seal-circle {
    position: relative;
    width: 300px;
    height: 300px;
    border: 1px solid var(--fossil);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: clamp(1.5rem, 4vh, 3rem) 0 clamp(1.5rem, 3vh, 2.5rem);
    transform-style: preserve-3d;
    transition: transform 0.6s var(--settle);
    will-change: transform;
}

.seal-circle::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid var(--fossil);
    border-radius: 50%;
    opacity: 0.35;
}

.seal-wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.02em;
    color: var(--graphite);
    line-height: 1;
}

.seal-sub {
    margin-top: 0.85rem;
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fossil);
}

.prompt-text {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fossil);
    animation: ember-pulse 3s ease-in-out infinite;
}

@keyframes ember-pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

/* =============================================================
   Decorative orbits (outlined circles)
   ============================================================= */
.orbit {
    position: absolute;
    border: 1px solid var(--fossil);
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.stratum--dark .orbit {
    border-color: var(--fog);
    opacity: 0.13;
}

.orbit--a { width:  90px; height:  90px; top: 14%;  left:  8%; }
.orbit--b { width: 200px; height: 200px; bottom: 10%; right:  6%; }
.orbit--c { width:  80px; height:  80px; top:  8%;  right: 14%; }
.orbit--d { width: 140px; height: 140px; bottom: 12%; left:  10%; }
.orbit--e { width: 160px; height: 160px; top:  18%; right:  4%; }

/* =============================================================
   Section 2: First stratum — tilt card
   ============================================================= */
.tilt-card {
    position: relative;
    z-index: 5;
    padding: clamp(2rem, 4vw, 3.4rem) clamp(1.4rem, 3vw, 2.4rem);
    perspective: 1000px;
    transform: rotateY(-2deg) rotateX(1deg);
    transform-style: preserve-3d;
    transition: transform 0.6s var(--settle);
    will-change: transform;
    text-align: center;
}

.tilt-card .body-block {
    color: var(--fog);
}

/* =============================================================
   Section 3: Second stratum — readout panel
   ============================================================= */
.readout-row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: clamp(1rem, 2vw, 1.6rem);
    align-items: stretch;
    width: 100%;
}

.readout-spine {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
    padding-top: 1.2rem;
    opacity: 0.65;
}

.readout-spine .waveform--vertical {
    height: 120px;
    width: 24px;
}

.readout-panel {
    position: relative;
    background: var(--shale);
    color: var(--chalk);
    border-radius: 4px;
    padding: clamp(2rem, 3vw, 3rem);
    border: 1px solid rgba(176, 173, 181, 0.18);
    box-shadow: 0 18px 60px -30px rgba(26, 23, 32, 0.55);
    perspective: 1000px;
    transform: rotateY(-2deg) rotateX(1deg);
    transform-style: preserve-3d;
    transition: transform 0.6s var(--settle);
    will-change: transform;
    overflow: hidden;
}

.readout-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 220px 220px;
    opacity: 0.10;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.readout-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(176, 173, 181, 0.18);
    margin-bottom: 1.4rem;
}

.readout-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ember);
    box-shadow: 0 0 0 3px rgba(140, 106, 90, 0.18);
}

.readout-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fog);
}

.readout-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--chalk);
}

.readout-list li {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 1.2rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(176, 173, 181, 0.10);
}

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

.readout-list .rk {
    color: var(--fossil);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.readout-list .rv {
    color: var(--fog);
}

.readout-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.6rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(176, 173, 181, 0.18);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fossil);
}

.readout-blink {
    width: 6px;
    height: 12px;
    background: var(--chalk);
    opacity: 0.7;
    animation: cursor-blink 1.4s steps(2, end) infinite;
}

@keyframes cursor-blink {
    0%, 49%   { opacity: 0.7; }
    50%, 100% { opacity: 0;   }
}

/* =============================================================
   Section 4: Third stratum — display headline + concentric rings
   ============================================================= */
.stratum--third .grid-col {
    position: relative;
    z-index: 2;
}

.concentric {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    pointer-events: none;
    z-index: -1;
}

.concentric__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--fog);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
}

.concentric__ring--1 { width: 100px; height: 100px; }
.concentric__ring--2 { width: 180px; height: 180px; }
.concentric__ring--3 { width: 260px; height: 260px; }

.hairline {
    display: inline-block;
    width: 200px;
    height: 1px;
    background: var(--fossil);
    margin: 1.6rem auto 0;
}

.ember-link {
    color: var(--fossil);
    transition: color 0.5s var(--settle);
}

.ember-link:hover {
    color: var(--ember);
}

/* =============================================================
   Section 5: Bedrock
   ============================================================= */
.stratum--bedrock {
    background: var(--limestone);
}

.bedrock-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    text-align: center;
}

.bedrock-line {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fossil);
}

.bedrock-line--small {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* =============================================================
   Responsive — keep the meditative column on small screens
   ============================================================= */
@media (max-width: 720px) {
    .seal-circle {
        width: 240px;
        height: 240px;
    }

    .readout-row {
        grid-template-columns: 1fr;
    }

    .readout-spine {
        flex-direction: row;
        justify-content: flex-start;
        padding-top: 0;
        padding-bottom: 0.4rem;
    }

    .readout-spine .waveform--vertical {
        width: 60px;
        height: 24px;
        transform: rotate(0deg);
    }

    .tilt-card,
    .readout-panel {
        transform: rotateY(0) rotateX(0);
    }

    .concentric {
        width: 200px;
        height: 200px;
    }

    .concentric__ring--3 { width: 200px; height: 200px; }
    .concentric__ring--2 { width: 140px; height: 140px; }
    .concentric__ring--1 { width:  80px; height:  80px; }
}

@media (prefers-reduced-motion: reduce) {
    .stratum {
        transition: none;
        opacity: 1;
        transform: none;
    }
    .seal-circle,
    .tilt-card,
    .readout-panel {
        transition: none;
    }
    .prompt-text,
    .readout-blink {
        animation: none;
    }
}
