:root {
    /* Design terms: Playfair Display" (Google Fonts Source Serif 4" (Google Fonts Space Grotesk" (Google Fonts IntersectionObserver (threshold: 0.4 class toggles. The scroll listener for the grid glow effect uses `requestAnimationFrame` throttling and updates a single CSS custom property (`--scroll-y` */
    --navy: #0f1a2e;
    --linen: #f5f0e8;
    --ink: #2b2520;
    --faded: #6b6460;
    --cyan: #00f0ff;
    --magenta: #ff2d95;
    --violet: #8b5cf6;
    --amber: #e8a849;
    --glow-x: 50%;
    --glow-y: 50%;
    --scroll-y: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--navy);
    color: var(--linen);
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    overflow-x: hidden;
}

.nav-glyph {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

.globe-mini { width: 2rem; height: 2rem; overflow: visible; }
.globe-line, .globe-rim {
    fill: none;
    stroke: var(--violet);
    stroke-width: 1.4;
    stroke-dasharray: 155;
    stroke-dashoffset: 155;
    animation: globeDraw 8s linear infinite;
    animation-delay: var(--phase, 0s);
}
.globe-rim { stroke: var(--cyan); opacity: .55; }
.globe-spin { transform-origin: center; animation: globeSpin 60s linear infinite; }

.radial-menu {
    position: absolute;
    inset: -4.9rem;
    opacity: 0;
    pointer-events: none;
    transform: scale(.82) rotate(-8deg);
    transition: opacity .35s ease, transform .35s ease;
}
.nav-glyph:hover .radial-menu, .nav-glyph.open .radial-menu {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) rotate(0deg);
}
.menu-item {
    position: absolute;
    color: var(--cyan);
    font: 500 clamp(.7rem, .9vw, .95rem)/1 "Space Grotesk", Inter, Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(0, 240, 255, .45);
    transition: color .25s ease, transform .25s ease;
}
.menu-item:hover { color: var(--magenta); transform: translateY(-2px); }
.menu-tokyo { left: 50%; top: 0; transform: translateX(-50%); }
.menu-lagos { left: 50%; bottom: 0; transform: translateX(-50%); }
.menu-sao { left: 0; top: 50%; transform: translateY(-50%); }
.menu-helsinki { right: 0; top: 50%; transform: translateY(-50%); }

.atlas { width: 100%; }
.spread {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding-block: clamp(4rem, 8vh, 10rem);
    overflow: hidden;
}
.spread::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#00f0ff14 1px, transparent 1px), linear-gradient(90deg, #00f0ff14 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: .8;
}
.spread-dark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at var(--glow-x) var(--glow-y), #00f0ff0a, transparent 70%);
}
.spread-light { background: var(--linen); color: var(--ink); }
.spread-light::before { background-image: linear-gradient(#00f0ff18 1px, transparent 1px), linear-gradient(90deg, #00f0ff18 1px, transparent 1px); opacity: .55; }
.spread-dark { background: var(--navy); }

.spread-inner, .spread-grid, .locales-flow, .method-inner, .coda-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-inline: clamp(3rem, 12vw, 16rem);
}

.hero-inner {
    min-height: calc(100vh - clamp(8rem, 16vh, 20rem));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.folio-mark, .data-label {
    color: var(--violet);
    font: 500 clamp(.72rem, .85vw, .95rem)/1.4 "Space Grotesk", Inter, Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-title {
    color: var(--linen);
    font-family: "Playfair Display", "Didot", Georgia, serif;
    font-size: clamp(3.5rem, 18vw, 14rem);
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: .78;
}
.hero-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(2rem);
    animation: titleEntry 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero-title span:nth-child(2) { animation-delay: .06s; }
.hero-title span:nth-child(3) { animation-delay: .12s; }
.hero-title span:nth-child(4) { animation-delay: .18s; }
.hero-title span:nth-child(5) { animation-delay: .24s; }
.hero-title span:nth-child(6) { animation-delay: .3s; }
.hero-line, .coda-copy {
    max-width: 38em;
    margin-top: 2.25rem;
    font-size: clamp(1.05rem, 1.2vw, 1.3rem);
    line-height: 1.85;
}

.spread-grid {
    min-height: calc(100vh - clamp(8rem, 16vh, 20rem));
    display: grid;
    grid-template-columns: 1fr .613fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}
.split::after {
    content: "";
    position: absolute;
    top: -10rem;
    bottom: -10rem;
    left: calc(clamp(3rem, 12vw, 16rem) + (100% - (clamp(3rem, 12vw, 16rem) * 2)) * .62);
    width: 1px;
    background: var(--amber);
    opacity: .2;
}
.prose { max-width: 38em; font-size: clamp(1.05rem, 1.2vw, 1.3rem); line-height: 1.85; margin-top: 1.5rem; }
.prose-panel { color: var(--ink); }
.annotate { position: relative; display: inline-block; }
.annotate svg { position: absolute; left: 0; right: 0; bottom: -.45rem; width: 100%; height: .7rem; overflow: visible; }
.annotate path {
    fill: none;
    stroke: var(--magenta);
    stroke-width: 3;
    opacity: .6;
    stroke-dasharray: 190;
    stroke-dashoffset: 190;
    transition: stroke-dashoffset .8s cubic-bezier(.25, .1, .25, 1);
}
.annotate.drawn path { stroke-dashoffset: 0; }

.world-map { width: min(100%, 34rem); display: block; margin-inline: auto; }
.map-grid path { fill: none; stroke: var(--cyan); stroke-width: .7; opacity: .25; }
.continent-lines path { fill: none; stroke: var(--cyan); stroke-width: 2; opacity: .75; stroke-linecap: round; }
.locale-points circle { fill: var(--magenta); animation: pointPulse 2.3s ease-in-out infinite; cursor: pointer; }
.world-map text { fill: var(--violet); font: 500 13px "Space Grotesk", Inter, Arial, sans-serif; letter-spacing: .22em; }

.locales-flow { display: flex; flex-direction: column; gap: clamp(5rem, 10vh, 10rem); }
.locale-vignette {
    width: min(42rem, 100%);
    padding-left: clamp(1rem, 3vw, 3rem);
    border-left: 1px solid rgba(232, 168, 73, .28);
}
.locale-vignette.offset { align-self: flex-end; }
.locale-name {
    color: var(--linen);
    font-family: "Playfair Display", "Didot", Georgia, serif;
    font-size: clamp(2.8rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: .9;
    text-shadow: 0 0 26px rgba(255, 45, 149, .15);
}
.locale-copy { margin-top: 1.3rem; max-width: 34em; font-size: clamp(1rem, 1.1vw, 1.18rem); line-height: 1.75; }
.sparkline { width: 96px; height: 40px; margin-top: 1.4rem; overflow: visible; }
.spark-path { fill: none; stroke: var(--magenta); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.2s cubic-bezier(.25, .1, .25, 1); }
.spark-dot { fill: var(--amber); transform: scale(0); transform-origin: center; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1) 1.2s; }
.sparkline.drawn .spark-path { stroke-dashoffset: 0; }
.sparkline.drawn .spark-dot { transform: scale(1); }
.radial-chart { width: 7rem; height: 7rem; margin-top: 1.5rem; overflow: visible; }
.radial-fill { fill: rgba(139, 92, 246, .12); stroke: var(--violet); stroke-width: 1.5; }
.radial-lines { fill: none; stroke: var(--cyan); stroke-width: 1; opacity: .75; }

.method-inner { min-height: calc(100vh - clamp(8rem, 16vh, 20rem)); display: flex; flex-direction: column; justify-content: center; }
.spread-title {
    color: var(--ink);
    font-family: "Playfair Display", "Didot", Georgia, serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -.03em;
}
.flow-strip { margin-top: clamp(2rem, 5vw, 4rem); overflow-x: auto; padding-block: 2rem; border-block: 1px solid rgba(232, 168, 73, .24); }
.flowchart { width: 1040px; min-width: 1040px; height: 260px; display: block; }
.flow-path { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: flowDraw 5s ease-in-out infinite alternate; }
.flow-node circle { fill: var(--magenta); filter: drop-shadow(0 0 10px rgba(255,45,149,.6)); animation: nodeGlow 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .25s); }
.flow-node text { fill: var(--violet); font: 500 15px "Space Grotesk", Inter, Arial, sans-serif; letter-spacing: .16em; text-anchor: middle; }

.coda-inner { min-height: calc(100vh - clamp(8rem, 16vh, 20rem)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.globe-large { width: min(60vh, 86vw); height: min(60vh, 86vw); overflow: visible; }
.globe-large .globe-line, .globe-large .globe-rim { stroke: var(--cyan); stroke-width: .9; stroke-dasharray: 745; stroke-dashoffset: 745; opacity: .6; }
.coda-link {
    position: relative;
    display: inline-block;
    margin-top: 1.7rem;
    color: var(--linen);
    text-decoration: none;
    font-size: clamp(1.05rem, 1.2vw, 1.25rem);
}
.coda-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -.35rem;
    height: 2px;
    width: 0;
    background: var(--magenta);
    transition: width .45s ease;
}
.coda-link:hover { color: var(--cyan); }
.coda-link:hover::after { width: 100%; }

@keyframes titleEntry { to { opacity: 1; transform: translateY(0); } }
@keyframes globeDraw { 0%, 100% { stroke-dashoffset: 155; opacity: .3; } 50% { stroke-dashoffset: 0; opacity: .95; } }
@keyframes globeSpin { to { transform: rotate(360deg); } }
@keyframes pointPulse { 0%, 100% { r: 6; opacity: .7; } 50% { r: 9; opacity: 1; } }
@keyframes flowDraw { to { stroke-dashoffset: 0; } }
@keyframes nodeGlow { 50% { transform: translateY(-4px); opacity: .75; } }

@media (max-width: 768px) {
    .spread-inner, .spread-grid, .locales-flow, .method-inner, .coda-inner { padding-inline: clamp(1.5rem, 6vw, 3rem); }
    .spread-grid { grid-template-columns: 1fr; }
    .split::after { display: none; }
    .locale-vignette.offset { align-self: flex-start; }
    .nav-glyph { top: 1.25rem; left: 1.25rem; }
}
