:root {
    /* Typography source notes: Libre Baskerville (Google Fonts), Source Serif 4" (Google Fonts), IBM Plex Mono" (Google Fonts). Scroll disclosure uses IntersectionObserver and IntersectionObserver` with multiple thresholds (`threshold` values from zero through 1.0). */
    --pumice-white: #e8e4dc;
    --obsidian: #1e1d1b;
    --volcanic-charcoal: #2c2c2e;
    --pumice: #c8c3b8;
    --basalt: #4a4745;
    --seismic-ochre: #a08b5b;
    --tremor-rust: #8a5a3b;
    --ash-drift: #b0aaa0;
    --display: "Libre Baskerville", Georgia, serif;
    --body: "Source Serif 4", Georgia, serif;
    --mono: "IBM Plex Mono", "Space Mono", monospace;
}

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

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--pumice-white);
    color: var(--volcanic-charcoal);
    font-family: var(--body);
    font-optical-sizing: auto;
    line-height: 1.72;
}

.tape { position: relative; isolation: isolate; overflow: hidden; }

.stratum,
.sentinel {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 7rem) clamp(1.2rem, 6vw, 6rem);
}

.stratum::after {
    content: attr(data-density);
    position: absolute;
    right: clamp(1rem, 3vw, 2rem);
    top: 14%;
    writing-mode: vertical-rl;
    font-family: var(--mono);
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--seismic-ochre);
    opacity: .55;
    z-index: 3;
}

.stratum-light {
    background: var(--pumice-white);
    color: var(--basalt);
    clip-path: polygon(0 0, 100% 1.7%, 99.2% 96.5%, 68% 98.8%, 35% 97.2%, 0 100%);
}

.stratum-dark {
    background: var(--obsidian);
    color: var(--ash-drift);
    clip-path: polygon(0 2.4%, 28% 0, 61% 1.2%, 100% 0, 100% 100%, 70% 97.6%, 36% 99.4%, 0 97.9%);
}

.stratum-hero { align-items: center; text-align: center; }

.masthead { position: relative; z-index: 5; max-width: 72rem; margin: 0 auto; }

.content-grid {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.2rem, 4vw, 4.6rem);
    width: min(100%, 1180px);
    margin: 0 auto;
}

.expanded-grid { row-gap: clamp(3rem, 8vw, 9rem); }
.content-block { opacity: 0; transform: translateY(20px); transition: opacity 900ms ease, transform 900ms ease; }
.is-visible .content-block { opacity: 1; transform: translateY(0); }
.is-visible .delayed { transition-delay: 200ms; }
.is-visible .deep-offset { transition-delay: 300ms; }
.span-left { grid-column: 1 / 3; }
.span-right { grid-column: 2 / 4; }
.narrow { grid-column: 1 / 2; }
.deep-offset { margin-top: clamp(3rem, 12vw, 10rem); }

h1,
h2,
.sentinel span {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: .04em;
    font-variant-ligatures: discretionary-ligatures;
    line-height: 1.08;
}

h1 { color: var(--volcanic-charcoal); font-size: clamp(3.2rem, 13vw, 10.5rem); margin: .28em 0 .18em; }
h2 { font-size: clamp(2.5rem, 6vw, 5rem); margin-bottom: .45em; }
.stratum-light h2 { color: var(--volcanic-charcoal); }
.stratum-dark h2 { color: var(--pumice); }

p { max-width: 58ch; font-size: clamp(1rem, 1.2vw, 1.25rem); color: inherit; margin: 0 0 1.2rem; }
.stratum-light p:not(.mono-label) { color: var(--basalt); }
.stratum-dark p:not(.mono-label) { color: var(--ash-drift); }
.lead { margin: 0 auto; color: var(--basalt); font-size: clamp(1.08rem, 1.5vw, 1.45rem); }
.mono-label { font-family: var(--mono); font-weight: 300; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--seismic-ochre); }

.reveal-title .char {
    display: inline-block;
    transform: translateY(1.18em);
    opacity: .02;
    transition: transform 760ms cubic-bezier(.22, 1, .36, 1), opacity 560ms ease;
}

.is-visible .reveal-title .char,
.stratum-hero .reveal-title .char { transform: translateY(0); opacity: 1; }

.instrument-band { position: absolute; inset: 10vh -2vw auto; height: 38vh; z-index: 2; opacity: .95; }
.instrument-band::before {
    content: attr(data-label);
    position: absolute;
    left: clamp(1rem, 5vw, 5rem);
    top: 0;
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .1em;
    color: var(--seismic-ochre);
}

.waveform { width: 100%; height: 100%; overflow: visible; pointer-events: none; will-change: transform; }
.crossing-wave { position: relative; z-index: 4; display: block; height: clamp(6rem, 16vw, 11rem); margin-top: clamp(2rem, 9vw, 8rem); }
.wave-path { fill: none; stroke: var(--seismic-ochre); stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .8; }
.wave-b { opacity: .42; stroke-dasharray: 8 4 2 4; }
.wave-c { opacity: .28; }
.wave-rust { stroke: var(--tremor-rust); opacity: .32; }

.fault-line { height: 24px; position: relative; z-index: 10; margin: -12px 0; pointer-events: auto; }
.fault-line span {
    display: block;
    position: absolute;
    inset: 11px 0 auto;
    height: 2px;
    background-image: repeating-linear-gradient(90deg, var(--seismic-ochre) 0 8px, transparent 8px 12px, var(--seismic-ochre) 12px 14px, transparent 14px 18px);
    opacity: .42;
    animation: fault-drift 8s linear infinite, fault-pulse 6s ease-in-out infinite;
    transition: height 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}
.fault-line:hover span { height: 4px; opacity: .85; box-shadow: 0 0 12px rgba(160, 139, 91, .4); }
@keyframes fault-drift { from { background-position: 0 0; } to { background-position: 56px 0; } }
@keyframes fault-pulse { 0%,100% { opacity: .28; } 50% { opacity: .72; } }

.noise-field,
.sediment-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 900ms ease; }
.stratum-light .noise-field { mix-blend-mode: multiply; }
.stratum-dark .noise-field { mix-blend-mode: screen; }
.is-visible .noise-field { opacity: .07; }
.stratum-light.is-visible .noise-field { opacity: .045; }
.sediment-field { z-index: 2; opacity: .55; }

.chladni-field {
    position: relative;
    z-index: 5;
    grid-column: 2 / 4;
    width: clamp(210px, 24vw, 300px);
    aspect-ratio: 1;
    margin: clamp(1rem, 4vw, 3rem) auto 0;
    border: 1px solid var(--seismic-ochre);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.94);
    transition: opacity 800ms ease, transform 800ms ease;
}
.is-visible .chladni-field { opacity: 1; transform: scale(1); }
.chladni-field::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    top: calc(100% + .8rem);
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .08em;
    color: var(--seismic-ochre);
}
.chladni-field canvas { width: 100%; height: 100%; border-radius: 50%; display: block; }
.chladni-offset { grid-column: 1 / 2; }

.sentinel { min-height: 82vh; align-items: center; text-align: center; background: var(--pumice-white); color: var(--seismic-ochre); gap: 1rem; }
.sentinel span { position: relative; z-index: 4; font-size: clamp(1.5rem, 4vw, 3rem); opacity: .62; text-transform: uppercase; }
.sentinel .mono-label { position: relative; z-index: 4; }

@media (max-width: 760px) {
    .stratum, .sentinel { padding: 4rem 1.2rem; clip-path: polygon(0 0, 100% 1%, 100% 99%, 0 100%); }
    .content-grid { display: block; }
    .content-block, .deep-offset { margin-top: 0; margin-bottom: 2.2rem; }
    .instrument-band { height: 28vh; top: 14vh; }
    .chladni-field, .chladni-offset { margin: 2.5rem auto; }
    .stratum::after { display: none; }
}
