:root {
    --bg: #f4f7f7;
    --bg-alt: #edf2f2;
    --paper: #ffffff;
    --ink: #1a2b2b;
    --ink-70: #364848;
    --ink-40: #6e8585;
    --ink-20: #a8bfbf;
    --ink-10: #d4e0e0;
    --ink-05: #eaf0f0;
    --accent: #0da8ab;
    --accent-dark: #098c8e;
    --accent-light: #5ec4c6;
    --accent-wash: #e8f6f6;
    --display: 'Space Grotesk', -apple-system, sans-serif;
    --body: 'Outfit', -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-weight: 400;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Survey line background ── */
.survey-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.survey-bg svg { width: 100%; height: 100%; }
.survey-bg .grid-line {
    stroke: var(--ink-10);
    stroke-width: 0.5;
    fill: none;
}

/* ── Nav ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 0 48px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(244, 247, 247, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ink-10);
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}
.logo img {
    height: 42px;
    width: auto;
    display: block;
}
nav .nav-right {
    display: flex;
    align-items: center;
    gap: 28px;
}
nav .nav-right a {
    font-family: var(--body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-40);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.2s;
}
nav .nav-right a:hover { color: var(--ink); }
nav .meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-40);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pill, .pill:visited, .pill:active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--accent);
    color: #ffffff !important;
    font-family: var(--body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.25s;
}
.pill:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(13,168,171,0.25);
}

/* ── Hero ── */
.hero {
    min-height: auto;
    padding: 160px 48px 120px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 520px;
    justify-self: end;
    opacity: 0;
    animation: fadeIn 1.4s 0.6s forwards;
}
.hero-stamp {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    animation: fadeIn 1s 0.2s forwards;
}
.hero-stamp::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--accent);
}
.hero h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    max-width: 22ch;
    color: var(--ink);
}
.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}
.hero h1 .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
    animation: rise 0.8s forwards;
}
.hero-sub {
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--ink-70);
    max-width: 56ch;
    margin-bottom: 48px;
    font-weight: 300;
    opacity: 0;
    animation: fadeIn 1s 1.4s forwards;
}
.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 28px;
    opacity: 0;
    animation: fadeIn 1s 1.7s forwards;
    flex-wrap: wrap;
}
.hero-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-40);
    letter-spacing: 0.05em;
}

/* ── Section structure ── */
section {
    position: relative;
    z-index: 2;
    padding: 56px 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-index {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--ink-40);
    margin-bottom: 36px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-index::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ink-10);
    max-width: 120px;
}
.section-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    max-width: 22ch;
    color: var(--ink);
}
.section-title em {
    font-style: italic;
    color: var(--accent);
}

/* ── Problem section ── */
.problem {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
}
.problem-text p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink-70);
    margin-bottom: 24px;
    max-width: 48ch;
    font-weight: 300;
}
.problem-text p:last-child {
    color: var(--ink);
    font-family: var(--display);
    font-style: italic;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 500;
}
.problem-aside {
    padding-top: 8px;
}
.problem-aside .quote {
    background: var(--paper);
    border-radius: 12px;
    padding: 32px 36px;
    font-family: var(--display);
    font-size: 22px;
    line-height: 1.45;
    color: var(--ink);
    font-weight: 300;
    letter-spacing: -0.01em;
    position: relative;
    box-shadow: 0 2px 16px rgba(26, 43, 43, 0.06);
}
.problem-aside .quote::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 36px;
    width: 20px;
    height: 12px;
    background: var(--paper);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.problem-aside .attribution {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-40);
}

/* ── Exploring section ── */
.exploring-intro {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-70);
    max-width: 62ch;
    margin-bottom: 64px;
    font-weight: 300;
}
.exploring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--ink-10);
    border-radius: 2px;
    overflow: hidden;
}
.exploring-item {
    background: var(--paper);
    padding: 44px 36px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
}
.exploring-item:hover { background: var(--accent-wash); }
.exploring-item .index {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 18px;
}
.exploring-item h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
    color: var(--ink);
}
.exploring-item p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-70);
    font-weight: 300;
    margin-top: auto;
}

/* ── Data spec ── */
.data-spec-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: -40px auto 0;
    padding: 0 48px 80px;
}
.data-spec {
    padding-top: 48px;
    border-top: 1px solid var(--ink-10);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}
.spec-item {
    border-left: 2px solid var(--ink-10);
    padding-left: 20px;
}
.spec-item .number {
    font-family: var(--display);
    font-weight: 300;
    font-size: 52px;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}
.spec-item .number sup {
    font-size: 16px;
    color: var(--accent);
    font-style: italic;
    margin-left: 3px;
    vertical-align: super;
}
.spec-item .label {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-40);
}

/* ── Register section ── */
.register {
    background: var(--bg-alt);
    padding: 56px 48px;
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--ink-10);
    border-bottom: 1px solid var(--ink-10);
}
.register-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
}
.register-left .intro {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-70);
    max-width: 44ch;
    margin-bottom: 36px;
    font-weight: 300;
}
.register-left .fine-print {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-40);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.9;
}

/* ── Form ── */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-row label {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-40);
}
.form-row input,
.form-row select,
.form-row textarea {
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--ink-10);
    padding: 12px 0;
    color: var(--ink);
    font-family: var(--body);
    font-size: 15px;
    transition: border-color 0.3s ease;
    outline: none;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-bottom-color: var(--accent);
}
.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--ink-20);
}
.form-row select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e8585' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 28px;
}
.form-row select option {
    background: var(--paper);
    color: var(--ink);
}
.form-row textarea {
    resize: vertical;
    min-height: 80px;
    border: 1.5px solid var(--ink-10);
    border-radius: 6px;
    padding: 12px;
}
.form-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13,168,171,0.08);
}
.form-submit {
    margin-top: 12px;
    align-self: flex-start;
    background: var(--accent);
    color: #fff;
    padding: 16px 32px;
    font-family: var(--body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s;
}
.form-submit:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(13,168,171,0.25);
}
.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.form-submit svg { transition: transform 0.3s ease; }
.form-submit:hover svg { transform: translateX(4px); }
.form-msg {
    padding: 14px 18px;
    border-left: 3px solid var(--accent);
    background: var(--paper);
    font-family: var(--body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    display: none;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(13,168,171,0.1);
}
.form-msg.show { display: block; }
.form-msg.err {
    border-left-color: #c0392b;
    background: #fdf2f2;
}
/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ── Footer ── */
footer {
    padding: 48px 48px 40px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 16px;
}
footer .footer-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-40);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
footer .footer-meta em {
    font-style: normal;
    color: var(--ink-40);
}

/* ── Site plan visual ── */
#sitePlan {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* Fine reference grid fades in first */
.sp-grid line {
    opacity: 0;
    animation: spFade 0.5s 0.4s forwards;
}

/* Context plots draw themselves in */
.sp-ctx-line {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: spDraw 0.8s 0.6s forwards;
}

/* Soft glow pulses gently */
.sp-glow {
    opacity: 0;
    animation: spGlowPulse 4s 0.8s infinite;
    transform-origin: center;
}

/* Main boundary draws itself */
.sp-boundary {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    fill-opacity: 0;
    animation: spDraw 1s 0.9s forwards, spFill 0.6s 1.8s forwards;
}

/* Each corner marker pops in individually after boundary is drawn */
.sp-corner {
    opacity: 0;
    transform-origin: var(--cx, 260px) var(--cy, 260px);
    animation: spCornerPop 0.3s forwards;
}
.sp-corner:nth-child(1) { --cx: 150px; --cy: 150px; animation-delay: 1.8s; }
.sp-corner:nth-child(2) { --cx: 340px; --cy: 150px; animation-delay: 1.9s; }
.sp-corner:nth-child(3) { --cx: 340px; --cy: 275px; animation-delay: 2.0s; }
.sp-corner:nth-child(4) { --cx: 260px; --cy: 275px; animation-delay: 2.1s; }
.sp-corner:nth-child(5) { --cx: 260px; --cy: 380px; animation-delay: 2.2s; }
.sp-corner:nth-child(6) { --cx: 150px; --cy: 380px; animation-delay: 2.3s; }

/* North arrow fades in */
.sp-north {
    opacity: 0;
    animation: spFade 0.5s 1.2s forwards;
}

/* Scan line sweeps once before callouts */
.sp-scan {
    animation: spScan 1s 2.5s forwards;
}

/* Callouts draw in sequentially */
.sp-callout {
    opacity: 0;
}
.sp-callout line {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
}
.sp-callout rect,
.sp-callout text {
    opacity: 0;
}

.sp-callout-3 { animation: spCalloutShow 0.01s 3.0s forwards; }
.sp-callout-3 line { animation: spDrawShort 0.3s 3.0s forwards; }
.sp-callout-3 rect { animation: spFade 0.3s 3.2s forwards; }
.sp-callout-3 text { animation: spFade 0.3s 3.3s forwards; }

.sp-callout-1 { animation: spCalloutShow 0.01s 3.5s forwards; }
.sp-callout-1 line { animation: spDrawShort 0.3s 3.5s forwards; }
.sp-callout-1 rect { animation: spFade 0.3s 3.7s forwards; }
.sp-callout-1 text { animation: spFade 0.3s 3.8s forwards; }

@keyframes spDraw {
    to { stroke-dashoffset: 0; }
}
@keyframes spDrawShort {
    to { stroke-dashoffset: 0; }
}
@keyframes spFill {
    to { fill-opacity: 1; }
}
@keyframes spFade {
    to { opacity: 1; }
}
@keyframes spCornerPop {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 1; transform: scale(1.4); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes spNorthIn {
    0% { opacity: 0; transform: rotate(-90deg) scale(0.5); }
    100% { opacity: 0.7; transform: rotate(0) scale(1); }
}
@keyframes spGlowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
@keyframes spScan {
    0% { opacity: 0; transform: translateY(-260px); }
    5% { opacity: 0.8; }
    95% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(260px); }
}
@keyframes spCalloutShow {
    to { opacity: 1; }
}

/* Accessible: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sp-grid line,
    .sp-ctx-line,
    .sp-boundary,
    .sp-corner,
    .sp-north,
    .sp-callout,
    .sp-callout line,
    .sp-callout rect,
    .sp-callout text {
        opacity: 1;
        animation: none;
        stroke-dashoffset: 0;
        fill-opacity: 1;
        transform: none;
    }
    .sp-glow { opacity: 0.6; animation: none; }
    .sp-scan { display: none; }
}

/* ── Animations ── */
@keyframes rise {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    to { opacity: 1; }
}
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    nav { padding: 0 24px; }
    .hero {
        padding: 120px 24px 80px;
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .hero-visual {
        order: -1;
        max-width: 380px;
        justify-self: center;
    }
    section { padding: 40px 24px; }
    .problem,
    .register-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .problem-aside {
        border-left: none;
        border-top: 1px solid var(--ink-10);
        padding-left: 0;
        padding-top: 32px;
    }
    .exploring-grid { grid-template-columns: 1fr; }
    .data-spec {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    .register { padding: 40px 24px; }
    footer {
        padding: 32px 24px;
        flex-direction: column;
        align-items: flex-start;
    }
    nav .meta { display: none; }
}
@media (max-width: 520px) {
    .data-spec { grid-template-columns: 1fr; }
    .hero-cta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    nav .nav-right a:not(.pill) { display: none; }
    nav .nav-right .pill {
        font-size: 12px;
        padding: 8px 16px;
    }
}
