:root {
    /* DESIGN TRACE: (Google Fonts) IntersectionObserver` instance manages animated elements via `data-reveal` attribute toggle. IntersectionObserver` with threshold values of 0.15 */
    --horizon-pink: #c4a8a0;
    --harbor-text: #3d5c6a;
    --salt-spray: #d8e6ec;
    --kelp-shadow: #1a2e38;
    --instrument-blue: #4a8fa8;
    --deep-tide: #2b4a5a;
    --sea-glass: #7ba7b8;
    --fog-white: #f0f4f6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 12% 6%, rgba(216, 230, 236, 0.92), transparent 38rem),
        linear-gradient(180deg, var(--fog-white) 0%, #edf4f6 45%, var(--salt-spray) 100%);
    color: var(--harbor-text);
    font-family: "Quicksand", "Inter", sans-serif;
    font-size: clamp(1rem, 1.05vw, 1.15rem);
    line-height: 1.78;
    letter-spacing: 0.01em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(90deg, rgba(123, 167, 184, 0.08) 0 1px, transparent 1px 9vw),
        repeating-linear-gradient(0deg, rgba(123, 167, 184, 0.055) 0 1px, transparent 1px 8rem);
    mask-image: radial-gradient(ellipse at 50% 48%, #000 0%, transparent 72%);
}

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

.meridian-spine {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 6;
    width: 1px;
    height: 100vh;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, rgba(74, 143, 168, 0.7) 16%, rgba(123, 167, 184, 0.38) 50%, rgba(74, 143, 168, 0.7) 84%, transparent);
    box-shadow: 0 0 18px rgba(74, 143, 168, 0.18);
    pointer-events: none;
}

.spine-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7rem;
    height: 62vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(123, 167, 184, 0.15), transparent 68%);
}

.spine-tick {
    position: absolute;
    left: 50%;
    width: 2.8rem;
    height: 1px;
    transform: translateX(-50%);
    background: rgba(74, 143, 168, 0.32);
}

.tick-a { top: 23%; }
.tick-b { top: 50%; width: 4.2rem; background: rgba(196, 168, 160, 0.42); }
.tick-c { top: 77%; }

.coordinate-display {
    position: fixed;
    right: 2rem;
    bottom: 1.8rem;
    z-index: 12;
    color: var(--instrument-blue);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    opacity: 0.68;
}

.coord-prefix {
    color: var(--deep-tide);
    opacity: 0.7;
}

.digit {
    display: inline-block;
    min-width: 0.62em;
    transition: transform 220ms ease, opacity 220ms ease;
}

.decimal,
.hemisphere {
    color: var(--sea-glass);
}

.meridian-indicators {
    position: fixed;
    right: 1.35rem;
    top: 50%;
    z-index: 12;
    display: flex;
    flex-direction: column;
    gap: 1.28rem;
    transform: translateY(-50%);
}

.indicator {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    border: 1px solid var(--instrument-blue);
    border-radius: 999px;
    background: rgba(240, 244, 246, 0.45);
    opacity: 0.42;
    transition: opacity 260ms ease, background 260ms ease, transform 260ms ease, box-shadow 260ms ease;
    cursor: pointer;
}

.indicator span {
    position: absolute;
    right: 1.15rem;
    top: 50%;
    transform: translateY(-50%) translateX(0.4rem);
    color: var(--harbor-text);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 260ms ease, transform 260ms ease;
    white-space: nowrap;
}

.indicator:hover,
.indicator.active {
    opacity: 1;
    transform: scale(1.35);
}

.indicator.active {
    background: var(--instrument-blue);
    box-shadow: 0 0 18px rgba(74, 143, 168, 0.36);
}

.indicator.active span,
.indicator:hover span {
    opacity: 0.76;
    transform: translateY(-50%) translateX(0);
}

.meridian {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(1rem, 1fr) minmax(0, 40rem) minmax(0, 40rem) minmax(1rem, 1fr);
    align-items: center;
    column-gap: clamp(2rem, 6vw, 7rem);
    padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 4rem);
    isolation: isolate;
}

.meridian-background {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
}

.meridian-background::before,
.meridian-background::after {
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: 48% 52% 46% 54%;
    filter: blur(0.2px);
    opacity: 0.95;
    animation: mesh-drift 34s ease-in-out infinite alternate;
}

.meridian-background::after {
    inset: 18% 10%;
    opacity: 0.54;
    animation-duration: 42s;
    animation-direction: alternate-reverse;
}

[data-meridian="0"] .meridian-background::before { background: radial-gradient(ellipse at 18% 26%, rgba(74, 143, 168, 0.16), transparent 34%), radial-gradient(ellipse at 76% 72%, rgba(196, 168, 160, 0.12), transparent 30%), conic-gradient(from 80deg at 50% 52%, rgba(123, 167, 184, 0.1), transparent 24%, rgba(216, 230, 236, 0.2), transparent 62%, rgba(74, 143, 168, 0.1)); }
[data-meridian="45"] .meridian-background::before { background: radial-gradient(ellipse at 34% 22%, rgba(123, 167, 184, 0.18), transparent 32%), radial-gradient(ellipse at 68% 72%, rgba(74, 143, 168, 0.11), transparent 36%), conic-gradient(from 140deg at 50% 50%, rgba(196, 168, 160, 0.08), transparent 30%, rgba(216, 230, 236, 0.22), transparent 72%); }
[data-meridian="90"] .meridian-background::before { background: radial-gradient(ellipse at 62% 38%, rgba(74, 143, 168, 0.16), transparent 30%), radial-gradient(ellipse at 28% 66%, rgba(196, 168, 160, 0.12), transparent 34%), conic-gradient(from 230deg at 50% 48%, rgba(123, 167, 184, 0.12), transparent 40%, rgba(216, 230, 236, 0.18), transparent 78%); }
[data-meridian="135"] .meridian-background::before { background: radial-gradient(ellipse at 42% 50%, rgba(196, 168, 160, 0.11), transparent 32%), radial-gradient(ellipse at 72% 28%, rgba(123, 167, 184, 0.18), transparent 36%), conic-gradient(from 315deg at 50% 52%, rgba(74, 143, 168, 0.1), transparent 36%, rgba(216, 230, 236, 0.24), transparent 80%); }
[data-meridian="180"] .meridian-background::before { background: radial-gradient(ellipse at 50% 48%, rgba(74, 143, 168, 0.18), transparent 34%), radial-gradient(ellipse at 22% 80%, rgba(196, 168, 160, 0.11), transparent 32%), conic-gradient(from 0deg at 50% 50%, rgba(123, 167, 184, 0.13), transparent 28%, rgba(216, 230, 236, 0.19), transparent 66%); }

.meridian-background::after {
    background-image:
        repeating-radial-gradient(circle at 50% 50%, transparent 0 3.1rem, rgba(74, 143, 168, 0.08) 3.14rem 3.18rem),
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(196, 168, 160, 0.16) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
    mask-image: radial-gradient(ellipse at center, #000 0%, transparent 66%);
}

@keyframes mesh-drift {
    0% { transform: translate3d(-1.5%, -1%, 0) rotate(0deg) scale(1); }
    100% { transform: translate3d(1.5%, 1%, 0) rotate(8deg) scale(1.04); }
}

.degree-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -2;
    transform: translate(-50%, -50%);
    color: var(--kelp-shadow);
    font-family: "Nunito", "Inter", sans-serif;
    font-size: clamp(15rem, 30vw, 25rem);
    font-weight: 300;
    letter-spacing: -0.07em;
    line-height: 0.85;
    opacity: 0.055;
    white-space: nowrap;
}

.compass-rose {
    position: absolute;
    left: 50%;
    top: 8%;
    z-index: -1;
    width: min(36rem, 68vw);
    height: auto;
    transform: translateX(-50%);
    opacity: 0.48;
    animation: compass-turn 120s linear infinite;
}

.compass-rose circle,
.compass-rose path,
.compass-rose line {
    fill: none;
    stroke: var(--instrument-blue);
    stroke-width: 0.8;
    stroke-opacity: 0.32;
}

.compass-rose path {
    fill: rgba(74, 143, 168, 0.035);
    stroke-opacity: 0.18;
}

@keyframes compass-turn {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

.content-panel {
    position: relative;
    z-index: 2;
    width: min(100%, 39ch);
    padding: clamp(1.45rem, 3vw, 2.7rem);
    opacity: 0;
    transform: translateY(2.2rem) scale(0.985);
    transition: opacity 520ms ease, transform 520ms ease;
}

.content-panel::before {
    content: "";
    position: absolute;
    top: 1.1rem;
    bottom: 1.1rem;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(123, 167, 184, 0.44), transparent);
}

.content-panel.left {
    grid-column: 2;
    justify-self: end;
    text-align: right;
}

.content-panel.left::before {
    right: 0;
}

.content-panel.right {
    grid-column: 3;
    justify-self: start;
}

.content-panel.right::before {
    left: 0;
}

.content-panel.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.content-panel.note {
    color: var(--instrument-blue);
    font-size: clamp(1.15rem, 1.35vw, 1.45rem);
    line-height: 1.55;
}

.kicker {
    margin-bottom: 0.85rem;
    color: var(--instrument-blue);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2 {
    margin-bottom: 1.35rem;
    color: var(--deep-tide);
    font-family: "Nunito", "Inter", sans-serif;
    font-size: clamp(2rem, 4.2vw, 4.6rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

p + p {
    margin-top: 1.1rem;
}

.emphasis {
    color: var(--instrument-blue);
    font-weight: 500;
}

.wave-transition {
    display: block;
    position: relative;
    z-index: 3;
    width: 100%;
    height: 4.5rem;
    margin: -2.25rem 0;
    overflow: visible;
}

.wave-transition path {
    fill: none;
    stroke: var(--sea-glass);
    stroke-width: 1;
    stroke-opacity: 0.24;
    vector-effect: non-scaling-stroke;
    animation: wave-flow 18s linear infinite;
}

.wave-transition path:nth-child(2) {
    stroke: var(--horizon-pink);
    stroke-opacity: 0.16;
    animation-duration: 24s;
    animation-direction: reverse;
}

@keyframes wave-flow {
    from { transform: translateX(0); }
    to { transform: translateX(-16.666%); }
}

@media (max-width: 820px) {
    .meridian {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 5rem 1.25rem;
    }

    .content-panel,
    .content-panel.left,
    .content-panel.right {
        width: min(100%, 42rem);
        text-align: left;
        justify-self: auto;
    }

    .content-panel.left::before,
    .content-panel.right::before {
        left: 0;
        right: auto;
    }

    .meridian-indicators {
        display: none;
    }

    .coordinate-display {
        right: 1rem;
        bottom: 1rem;
    }

    .degree-watermark {
        font-size: clamp(8rem, 34vw, 15rem);
    }
}

@media (max-width: 520px) {
    body {
        font-size: 0.98rem;
    }

    .compass-rose {
        width: 88vw;
        top: 14%;
    }

    .content-panel {
        padding: 1.4rem 1rem;
    }
}
