/* islx.dev landing: the static story. Complete without JavaScript, WebGL or motion;
   the corridor layer (html.js-corridor) enhances it and never replaces it. */

@font-face {
    font-family: 'Jost';
    src: url('/fonts/jost/jost-latin-wght.woff2') format('woff2');
    font-weight: 200 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --field: #000000;
    --ink: #eceef2;
    --ink-2: #9196a0;
    --accent: #ff2b2b;
    --panel: #08090b;
    --input: #0b0c0e;
    --rule: rgba(236, 238, 242, 0.14);
    --rule-strong: rgba(236, 238, 242, 0.34);

    --gutter: clamp(16px, 4vw, 56px);
    --measure: 72rem;
    --bar: clamp(40px, 6svh, 96px);
    --track: 0.36em;
    --head: 72px;

    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--field);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--field);
    color: var(--ink);
    font: 400 16px/1.6 'Jost', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }
main:focus { outline: none; }

/* ---------- Corridor layer: hidden unless the 3D layer has taken over ---------- */

#corridor,
#corridor-panels { display: none; }

.js-corridor #corridor,
.js-corridor #corridor-panels { display: block; }

/* The 3D layer sits behind the story; each station's content pins (sticky) while the
   camera dwells, then scrolls away as the camera flies on. --pin = 100svh × DWELL / (1 − DWELL). */
.js-corridor {
    --pin: 122svh;
}

.js-corridor #corridor,
.js-corridor #corridor-panels {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: corridor-in 1.4s ease-out both;
}

.js-corridor #corridor { z-index: 0; }
.js-corridor #corridor-panels { z-index: 1; overflow: hidden; pointer-events: none; }

@keyframes corridor-in { from { opacity: 0; } }

.js-corridor .site-head {
    position: fixed;
    /* Nav text sits over bright plates (~1.5:1 bare): a dark band keeps --ink-2 above 4.5:1, no blur. */
    background: linear-gradient(rgba(0, 0, 0, 0.84) 62%, transparent);
}
.js-corridor #story,
.js-corridor .site-foot { position: relative; z-index: 2; }
.js-corridor .site-foot { background: var(--field); }

.js-corridor .station {
    display: block;
    min-height: 0;
    padding: 0;
    pointer-events: none;
}

/* The hold distance. A spacer, not padding: sticky children cannot travel into padding. */
.js-corridor .station::after {
    content: '';
    display: block;
    height: var(--pin);
}

.js-corridor .station--close::after { content: none; }
.js-corridor .station .frame { display: none; }

.js-corridor .station-pin {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(28px, 4.5svh, 56px);
    min-height: 100svh;
    padding-block: var(--bar);
}

.js-corridor .station-pin { padding-top: max(var(--bar), calc(var(--head) + 8px)); }
.js-corridor .station--close .station-pin { padding-top: clamp(96px, 18svh, 200px); }

/* Only what people read or press takes the pointer; the 3D panels underneath stay clickable. */
.js-corridor .station :is(a, button, input, select, textarea, label, form, [data-caption], .note, .slate, .panel) {
    pointer-events: auto;
}

/* Text over plates: a local scrim pooled behind each text block (no blur, soft edge). Core
   alpha 0.84 over the brightest plate pixel (white × the shader's 0.8) keeps --ink-2 ≥ 4.5:1.
   The static story needs none: its text sits on the black field, never over a plate. */
.js-corridor .station-pin .copy,
.js-corridor .station-pin .evidence .proof {
    width: fit-content;
    max-width: min(100% - 2 * var(--gutter), var(--measure));
    background: rgba(0, 0, 0, 0.84);
    box-shadow: 0 0 72px 44px rgba(0, 0, 0, 0.84);
}

.js-corridor .station--close .station-pin .copy { background: none; box-shadow: none; }

.js-corridor .station-pin { text-shadow: 0 0 28px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9); }
.js-corridor .station-pin :is(.btn, input, .panel) { text-shadow: none; }

.js-corridor [data-caption] .w {
    display: inline-block;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(0.3em);
    transition: opacity 0.6s ease, filter 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js-corridor [data-caption].is-on .w {
    opacity: 1;
    filter: none;
    transform: none;
    transition-delay: var(--d, 0ms);
}

/* Wide screens: run records hang in the corridor (aria-hidden clones). The originals stay
   here for assistive tech and the keyboard, and reappear in place when focused. */
.js-corridor-panels .station .panel:not(:focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.js-corridor-panels #station-erase .station-pin,
.js-corridor .station--title .station-pin { justify-content: flex-end; }

#corridor-panels .fragment { inset: auto; }
#corridor-panels .panel { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }

/* ---------- Focus, skip link, utilities ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible { border-color: var(--ink); }

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--gutter);
    z-index: 100;
    padding: 12px 20px;
    background: var(--ink);
    color: var(--field);
    font-weight: 500;
    text-decoration: none;
}

.skip-link:focus { top: 12px; }

.sr-only,
.hp {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hp { left: -10000px; }

/* ---------- Header and wordmark ---------- */

.site-head {
    position: absolute;
    inset: 0 0 auto;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--head);
    padding-inline: var(--gutter);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-left: 0.42em;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-decoration: none;
}

.x { color: var(--accent); }

.site-nav,
.foot-nav {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav { gap: 4px clamp(8px, 2vw, 28px); }

.site-nav a,
.foot-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 4px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
}

.site-nav a:hover,
.foot-nav a:hover { color: var(--ink); }

/* ---------- Stations ---------- */

.station {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(28px, 4.5svh, 56px);
    min-height: 100svh;
    padding-block: var(--bar);
}

/* The plate, framed 2.39:1 between black bars. */
.frame {
    position: relative;
    width: 100%;
    height: min(calc(100vw / 2.39), 56svh);
    overflow: hidden;
    background: #050506;
}

.frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(125% 115% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.78) 100%);
}

.plate,
.plate img {
    display: block;
    width: 100%;
    height: 100%;
}

.plate img {
    object-fit: cover;
    object-position: 50% 50%;
}

#station-break .plate img { object-position: 56% 46%; }
#station-rebuild .plate img { object-position: 54% 38%; }
#station-future .plate:first-child img { object-position: 50% 30%; }

.frame--diptych {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.copy {
    display: grid;
    justify-items: center;
    gap: 18px;
    width: min(100% - 2 * var(--gutter), var(--measure));
    margin-inline: auto;
    text-align: center;
}

.slate {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.42em;
    padding-left: 0.42em;
}

.slate::before,
.slate::after {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--rule-strong);
}

.caption {
    max-width: 70rem;
    margin: 0;
    padding-left: var(--track); /* balances the tracking after the last letter */
    font-size: clamp(18px, 0.85rem + 1.15vw, 34px);
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: var(--track);
    text-transform: uppercase;
    text-wrap: balance;
}

.display {
    max-width: 20ch;
    margin: 0;
    font-size: clamp(40px, 1rem + 6.2vw, 120px);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

/* ---------- Hero ---------- */

.station--hero {
    gap: clamp(24px, 3.5svh, 40px);
    padding-top: calc(var(--head) + 8px);
    padding-bottom: clamp(24px, 5svh, 64px);
}

.station--hero .frame { height: min(calc(100vw / 2.39), 52svh); }

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 28px;
    margin-top: 8px;
}

.cta-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
}

.waitlist--inline {
    display: flex;
    gap: 8px;
}

.waitlist--inline input[type='email'] { width: min(64vw, 280px); }

.scroll-cue {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 12px;
    color: var(--ink-2);
    font-size: 11px;
    letter-spacing: 0.42em;
    padding-left: calc(12px + 0.42em);
    text-transform: uppercase;
    text-decoration: none;
}

.scroll-cue::after {
    content: '';
    width: 1px;
    height: 36px;
    background: var(--rule-strong);
    transform-origin: top;
    animation: cue 2.4s ease-in-out infinite;
}

@keyframes cue {
    0% { transform: scaleY(0); }
    50% { transform: scaleY(1); }
    100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Buttons, links, inputs ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 0;
    font: 500 13px/1 'Jost', system-ui, sans-serif;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn--primary { background: var(--ink); color: var(--field); }
.btn--primary:hover { background: #ffffff; }
.btn--ghost { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }

.text-link,
.note-link a,
.panel-foot a {
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
}

.text-link:hover,
.note-link a:hover,
.panel-foot a:hover { text-decoration-color: var(--ink); }

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--rule-strong);
    border-radius: 0;
    background: var(--input);
    color: var(--ink);
    font: 400 16px/1.4 'Jost', system-ui, sans-serif;
}

input::placeholder,
textarea::placeholder { color: var(--ink-2); opacity: 1; }

textarea {
    padding-block: 12px;
    resize: vertical;
}

select {
    appearance: none;
    padding-right: 40px;
    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 1.5l5 5 5-5' fill='none' stroke='%239196a0' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* ---------- Break: code fragments over the plate ---------- */

.fragments {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.fragment {
    position: absolute;
    margin: 0;
    padding: 0.55em 0.9em;
    border: 1px solid var(--rule);
    background: rgba(0, 0, 0, 0.62);
    color: rgba(236, 238, 242, 0.88);
    font: 300 clamp(10px, 0.5rem + 0.45vw, 15px)/1.4 'Jost', system-ui, sans-serif;
    letter-spacing: 0.03em;
    white-space: pre;
}

.fragment:nth-child(1) { top: 13%; left: 5%; transform: rotate(-2.5deg); }
.fragment:nth-child(2) { top: 34%; right: 4%; transform: rotate(2deg) translateX(1.5%); }
.fragment:nth-child(3) { bottom: 30%; left: 9%; transform: rotate(1.25deg); }
.fragment:nth-child(4) { bottom: 11%; right: 8%; transform: rotate(-1.75deg) translateY(-6%); }

/* ---------- Panels: records of real runs ---------- */

.panel {
    width: 100%;
    border: 1px solid var(--rule);
    background: var(--panel);
    text-align: left;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 0;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.log {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 22px 20px;
    list-style: none;
    font-size: 16px;
    line-height: 1.5;
}

.log li {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 16px;
}

.log-step {
    padding-top: 0.3em;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.log strong { font-weight: 500; }

.log .log-files {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 20px;
    margin-top: -6px;
    padding-left: calc(5rem + 16px);
    color: var(--ink-2);
    font-size: 13px;
}

.dim { color: var(--ink-2); }

.panel-foot {
    margin: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--rule);
}

.panel-foot a { font-size: 12px; }

/* Station 3 has no plate: the record itself is the picture. */
.station--field .panel {
    width: min(100% - 2 * var(--gutter), 46rem);
    margin-inline: auto;
}

/* ---------- Proof ---------- */

.evidence {
    display: grid;
    gap: 40px;
    align-items: start;
    width: min(100% - 2 * var(--gutter), var(--measure));
    margin-inline: auto;
}

.proof { text-align: left; }

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px clamp(32px, 5vw, 72px);
    margin: 0;
}

.stat {
    display: grid;
    gap: 12px;
    text-decoration: none;
}

.num {
    font-size: clamp(56px, 2rem + 4.4vw, 112px);
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

.num--zero { color: var(--accent); }

.label {
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    text-underline-offset: 6px;
}

.stat:hover .label { color: var(--ink); text-decoration-color: var(--ink); }

.note {
    max-width: 36rem;
    margin: 24px 0 0;
    color: var(--ink-2);
    font-size: 16px;
}

.note-link { margin: 16px 0 0; }

.proof--note { text-align: center; }
.proof--note .note { margin: 0 auto; }

/* ---------- Title and close ---------- */

.station--title .display { font-size: clamp(44px, 1rem + 7vw, 120px); }

.station--close {
    gap: clamp(48px, 8svh, 96px);
    padding-top: clamp(96px, 18svh, 200px);
}

.display--close { font-size: clamp(36px, 0.75rem + 5vw, 88px); }

.final-cta {
    display: grid;
    gap: 32px;
    justify-items: center;
    width: min(100% - 2 * var(--gutter), 44rem);
    margin-inline: auto;
}

.waitlist--full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
    width: 100%;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--rule);
    background: var(--panel);
}

.form-title {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.field { display: grid; gap: 8px; }
.field--wide { grid-column: 1 / -1; }

.field label {
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.optional { letter-spacing: 0.1em; text-transform: none; }

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 4px;
}

.fine {
    margin: 0;
    color: var(--ink-2);
    font-size: 14px;
}

/* ---------- Footer ---------- */

.site-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--rule);
}

.foot-nav { gap: 0 20px; }

.foot-fine {
    width: 100%;
    margin: 0;
    color: var(--ink-2);
    font-size: 14px;
}

.foot-fine a { color: var(--ink-2); text-underline-offset: 4px; }
.foot-fine a:hover { color: var(--ink); }

/* ---------- Wide screens ---------- */

@media (min-width: 960px) {
    .evidence {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 72px;
    }
}

/* ---------- Phones: re-composed frames, cover-cropped around each plate's focus ---------- */

@media (max-width: 640px) {
    :root {
        --track: 0.32em;
        --head: 60px;
        --bar: 56px;
    }

    .frame {
        height: auto;
        aspect-ratio: 4 / 5;
        max-height: 60svh;
    }

    .station--hero .frame {
        height: auto;
        aspect-ratio: 4 / 5;
        max-height: 44svh;
    }

    .station--title .frame { aspect-ratio: 16 / 9; }

    .frame--diptych { grid-template-columns: 1fr; }
    .frame--diptych { aspect-ratio: auto; max-height: none; }
    .frame--diptych .plate { aspect-ratio: 16 / 10; }

    .site-nav li:nth-child(2) { display: none; }
    .site-nav a,
    .foot-nav a { letter-spacing: 0.18em; }

    .waitlist--inline {
        flex-direction: column;
        width: 100%;
    }

    .waitlist--inline input[type='email'] { width: 100%; }
    .cta-row { width: 100%; }

    .waitlist--full { grid-template-columns: 1fr; }

    .log li { grid-template-columns: 1fr; gap: 2px; }
    .log .log-files { padding-left: 0; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-cue::after { animation: none; }
}
