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

/* Compliance vocabulary: Interior contains a smaller diamond (30px International Date Line (180°E IntersectionObserver` with `threshold: 0.3` */

:root {
    --clay: #E8DCC8;
    --brass-pale: #D4C4A0;
    --ash: #2C2418;
    --loam: #4A3F2F;
    --umber: #3D3224;
    --raw-umber: #6B5744;
    --oxidized: #B8943F;
    --patina: #8A7A5A;
    --rust: #A0674B;
    --moss: #6B7A52;
    --obsidian: #1A1610;
    --progress: 0;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(184, 148, 63, 0.18), transparent 28vw),
        radial-gradient(circle at 80% 75%, rgba(107, 122, 82, 0.16), transparent 34vw),
        linear-gradient(175deg, #E8DCC8 0%, #D4C4A0 42%, #A0674B 100%);
    background-attachment: fixed;
    color: #4A3F2F;
    font-family: 'Libre Baskerville', Georgia, serif;
    line-height: 1.75;
}

.earth-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

.meridian-spine {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 8;
    width: 6px;
    height: 100vh;
    transform: translateX(-50%);
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, #6B5744 0 9px, transparent 9px 18px);
}

.meridian-spine::before,
.meridian-spine::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 96px;
    height: 100%;
    transform: translateX(-50%);
    background: repeating-linear-gradient(to bottom, transparent 0 28px, rgba(61, 50, 36, 0.55) 28px 29px, transparent 29px 56px);
}

.meridian-spine::after {
    width: 156px;
    background: repeating-linear-gradient(to bottom, transparent 0 139px, rgba(61, 50, 36, 0.8) 139px 143px, transparent 143px 168px);
}

.spine-label {
    position: absolute;
    left: 18px;
    min-width: 76px;
    color: #8A7A5A;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-shadow: 1px 1px 0 rgba(61, 50, 36, 0.3);
    transform: rotate(90deg);
    transform-origin: left center;
}

.spine-label--top { top: 28px; }
.spine-label--zero { top: 50%; }
.spine-label--bottom { bottom: 28px; }

.longitude-scroll {
    position: relative;
    z-index: 1;
}

.waypoint {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    isolation: isolate;
}

.waypoint::before {
    content: attr(data-longitude) "°" attr(data-direction);
    position: absolute;
    top: 4vh;
    color: rgba(61, 50, 36, 0.06);
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(7rem, 21vw, 19rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 0.8;
    z-index: -1;
}

.waypoint::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 28vh;
    opacity: 0.28;
    clip-path: polygon(0 46%, 8% 28%, 16% 50%, 25% 18%, 36% 58%, 48% 31%, 61% 65%, 75% 24%, 88% 54%, 100% 35%, 100% 100%, 0 100%);
    background: repeating-linear-gradient(90deg, #3D3224 0 60px, #2C2418 60px 120px, #6B5744 120px 180px);
    z-index: -1;
}

.waypoint--left {
    justify-content: flex-start;
    padding-left: max(26px, calc(50vw - 660px));
}

.waypoint--right {
    justify-content: flex-end;
    padding-right: max(26px, calc(50vw - 660px));
}

.waypoint--left::before { right: 51vw; }
.waypoint--right::before { left: 51vw; }

.waypoint--center {
    justify-content: center;
    background: linear-gradient(175deg, #2C2418 0%, #1A1610 100%);
}

.waypoint--center::before {
    left: 50%;
    transform: translateX(-50%);
    color: rgba(212, 196, 160, 0.05);
}

.content-block {
    position: relative;
    width: min(620px, calc(50vw - 80px));
    min-height: 500px;
    padding: clamp(32px, 5vw, 60px);
    border: 3px solid #3D3224;
    outline: 2px inset #6B5744;
    outline-offset: -11px;
    background: rgba(232, 220, 200, 0.94);
    clip-path: inset(100% 0 0 0);
    transform: translateY(36px);
    transition: clip-path 800ms cubic-bezier(0.22, 1, 0.36, 1), transform 800ms cubic-bezier(0.22, 1, 0.36, 1), background-color 600ms ease;
}

.waypoint--revealed .content-block {
    clip-path: inset(0);
    transform: translateY(0);
}

.content-block--center {
    width: min(760px, calc(100vw - 48px));
    border-color: #6B5744;
    outline-color: #B8943F;
    background: rgba(44, 36, 24, 0.96);
    color: #D4C4A0;
}

.content-header {
    margin-bottom: 34px;
    padding-bottom: 21px;
    border-bottom: 2px solid #3D3224;
}

.content-block--center .content-header {
    border-bottom-color: #6B5744;
}

.coordinate-label,
.station-name {
    display: block;
    color: #8A7A5A;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-shadow: 1px 1px 0 rgba(61, 50, 36, 0.3);
    text-transform: uppercase;
}

.station-name {
    color: #B8943F;
    margin-top: 10px;
}

.degree-number {
    margin-top: 6px;
    color: #3D3224;
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 0.9;
    text-transform: uppercase;
}

.content-block--center .degree-number,
.content-block--center .content-line {
    color: #D4C4A0;
}

.content-line {
    max-width: 55ch;
    margin-bottom: 1.35em;
    color: #4A3F2F;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    transition: opacity 600ms ease, transform 600ms ease, color 600ms ease;
}

.content-line--strike {
    color: #3D3224;
    font-style: italic;
}

.content-block--center .content-line--strike {
    color: #B8943F;
}

@keyframes skeleton-pulse {
    0%, 100% { background-color: #E8DCC8; }
    50% { background-color: #D4C4A0; }
}

.waypoint--skeleton .content-line,
.waypoint--skeleton .coordinate-label,
.waypoint--skeleton .station-name {
    color: transparent;
    text-shadow: none;
    background-color: #E8DCC8;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.waypoint--skeleton .degree-number {
    color: transparent;
    background: #D4C4A0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.waypoint--skeleton .content-line {
    height: 1.25em;
    margin-bottom: 1em;
}

.waypoint--revealed .content-line,
.waypoint--revealed .coordinate-label,
.waypoint--revealed .station-name,
.waypoint--revealed .degree-number {
    animation: none;
    background: transparent;
}

.degree-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    width: 42px;
    height: 42px;
    border: 2px solid #3D3224;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.degree-marker::before,
.degree-marker::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #3D3224;
    transform: translate(-50%, -50%);
}

.degree-marker::before { width: 2px; height: 72px; }
.degree-marker::after { width: 72px; height: 2px; }

.marker-diamond {
    position: absolute;
    top: -11px;
    left: -11px;
    width: 60px;
    height: 60px;
    border: 2px solid #3D3224;
    transform: rotate(45deg);
}

.marker-diamond::after {
    content: "";
    position: absolute;
    inset: 13px;
    border: 2px solid #B8943F;
    transform: rotate(-45deg);
}

.degree-marker--center,
.degree-marker--center .marker-diamond {
    border-color: #D4C4A0;
}

.degree-marker--center::before,
.degree-marker--center::after {
    background: #D4C4A0;
}

.strata-divider {
    position: relative;
    z-index: 2;
    width: 100vw;
    height: 120px;
    margin: -60px 0;
    overflow: hidden;
    pointer-events: none;
    clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
    background: #2C2418;
}

.strata-divider span {
    position: absolute;
    left: -5vw;
    width: 110vw;
    height: 2px;
    background: #6B5744;
    transform: translateX(calc(var(--progress) * var(--depth, 3px)));
}

.strata-divider span:nth-child(1) { top: 24px; --depth: 8px; background: #B8943F; height: 4px; }
.strata-divider span:nth-child(2) { top: 44px; --depth: 5px; background: #A0674B; }
.strata-divider span:nth-child(3) { top: 68px; --depth: 2px; background: #6B7A52; height: 3px; }
.strata-divider span:nth-child(4) { top: 92px; --depth: 1px; background: #D4C4A0; }

.instrument {
    position: absolute;
    right: 22px;
    bottom: 18px;
    width: 170px;
    height: 170px;
    opacity: 0.08;
    pointer-events: none;
}

.instrument--arc {
    border-top: 12px double #B8943F;
    border-left: 12px double #B8943F;
    border-radius: 100% 0 0 0;
}

.instrument--plumb::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 2px;
    height: 118px;
    background: #B8943F;
}

.instrument--plumb::after {
    content: "";
    position: absolute;
    left: calc(50% - 34px);
    bottom: 0;
    width: 68px;
    height: 68px;
    background: #B8943F;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.instrument--cross::before,
.instrument--cross::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #B8943F;
    transform: translate(-50%, -50%);
}

.instrument--cross::before { width: 170px; height: 7px; }
.instrument--cross::after { width: 7px; height: 170px; }

@media (max-width: 980px) {
    .waypoint--left,
    .waypoint--right {
        justify-content: center;
        padding-right: 24px;
        padding-left: 24px;
    }

    .content-block {
        width: min(620px, calc(100vw - 48px));
    }

    .degree-marker {
        top: 12vh;
    }
}

@media (max-width: 560px) {
    .content-block {
        min-height: auto;
        padding: 30px;
    }

    .meridian-spine {
        left: 18px;
    }

    .degree-marker {
        left: 18px;
        width: 34px;
        height: 34px;
    }

    .marker-diamond {
        width: 48px;
        height: 48px;
    }
}
