/* ================================================================
   NOMENON — Explainer
   Persistent nav + space background; one full-screen panel per
   concept: header on one line, copy + animation side by side.
   ================================================================ */

@font-face {
    font-family: "Horizon";
    src: url("/fonts/Horizon.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --void: #050608;
    --ink: #0b0f14;
    --cyan: #00c2ff;
    --mint: #42ffd1;
    --magenta: #ff0099;
    --wire: #5b6b78;
    --text: #c7d2da;

    --grot: "Oxanium", system-ui, sans-serif;
    --mono: "Space Mono", ui-monospace, monospace;
    --gutter: clamp(1.25rem, 5vw, 5rem);
    --nav-h: 64px;
}

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

html {
    scroll-padding-top: var(--nav-h);
}
html,
body {
    height: 100%;
}

body {
    background: #000;
    color: var(--text);
    font-family: var(--grot);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--cyan);
}

a:visited {
    color: #8c6fff;
}

.emph {
    color: #fff;
}

/* ── star background ── */
#space {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── persistent nav ── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    background: rgba(20, 20, 20, 0.3);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.nav-back {
    font-family: var(--grot);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text);
    text-decoration: none;
    opacity: 0.7;
    transition:
        opacity 0.2s ease,
        color 0.2s ease;
}
.nav-back:hover {
    opacity: 1;
    color: #fff;
}

.nav-wordmark {
    font-family: "Horizon", var(--grot);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 1.05rem;
    text-decoration: none;
    background: linear-gradient(90deg, #42ffd1 0%, #00c2ff 66%, #ff0099 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* glow button (canonical: pure outer glow, no border/fill) */
.glow-btn {
    border: 1px solid transparent;
    border-radius: 1px;
    background: transparent;
    color: rgb(var(--glow));
    font-family: "Open Sans", var(--grot), sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 9px 18px;
    cursor: pointer;
    transition:
        box-shadow 0.5s ease,
        color 0.3s ease;
}
.nav-apply {
    --glow: 0, 194, 255;
}

/* ── mobile nav (hidden until the mobile breakpoint) ── */
.nav-mob {
    display: none;
}
/* Mobile back arrow — SINGLE source of truth: size + NOMENON gradient.
   Stops are evenly spaced (0/50/100) so all three brand colors show
   across the glyph; otherwise it reads as a flat teal. */
.nav-back-grad {
    font-size: 2.1rem;
    line-height: 1;
    opacity: 1;
    background: linear-gradient(90deg, #42ffd1 0%, #00c2ff 50%, #ff0099 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.page-title-mob {
    font-family: "Horizon", var(--grot);
    font-weight: 800;
    font-size: clamp(0.6rem, 3vw, 1.05rem);
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    margin: 0;
}

/* ── page title (in-nav) ──
   Declared before the responsive media queries so the mobile overrides
   below win on source order, not just specificity. */
.page-title-exp {
    padding: 2.4rem var(--gutter) 0;
    font-family: "Horizon", var(--grot);
    font-weight: 800;
    font-size: clamp(1.8rem, 2vw, 3rem);
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(255, 255, 255, 1);
    margin-bottom: 2rem;
}

@media (min-width: 769px) {
    .glow-btn {
        box-shadow: 0 0 9px rgba(var(--glow), 0.05);
    }
    .glow-btn:hover {
        box-shadow: 0 0 22px rgba(var(--glow), 0.38);
        color: #fff;
    }
}
@media (max-width: 768px) {
    .glow-btn {
        box-shadow: 0 0 26px rgba(var(--glow), 0.42);
    }
    /* Swap to the dedicated mobile nav. */
    .nav-desk {
        display: none;
    }
    .nav-mob {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0.9rem;
    }
    /* (mobile back arrow size + gradient live in .nav-back-grad above) */
    /* Truly center the title in the viewport (not in the leftover gap
       between arrow and button), so it can't be crowded by either side. */
    .page-title-mob {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }
    /* CTA: sized to feel substantial (taller + larger type), still fits
       the row alongside the centered title. */
    .nav-mob .nav-apply {
        font-size: 0.74rem;
        letter-spacing: 0.06em;
        padding: 11px 15px;
        white-space: nowrap;
    }
}

/* ── panels ── */
main {
    position: relative;
    z-index: 1;
    padding-top: var(--nav-h);
}

.opener {
    position: relative;
    z-index: 1;
    width: min(64rem, calc(100% - 2 * var(--gutter)));
    margin: 3rem auto 1.25rem;
    padding: clamp(1.9rem, 4vw, 3.25rem) clamp(1.5rem, 4.5vw, 3.5rem);
    border: 1px solid rgba(91, 107, 122, 0.22);
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        rgba(11, 15, 20, 0.6),
        rgba(11, 15, 20, 0.32)
    );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    overflow: hidden;
}
/* brand edge tying the intro to the wordmark gradient */
.opener::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--mint),
        var(--cyan) 55%,
        var(--magenta)
    );
    opacity: 0.85;
}

.intro-kicker {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.1rem;
}

.intro-lead {
    font-family: var(--grot);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.4vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 1.4rem;
}
.intro-lead .accent {
    background: linear-gradient(
        90deg,
        var(--mint),
        var(--cyan) 60%,
        var(--magenta)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.intro {
    font-family: "Open Sans", var(--grot), sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.5rem);
    line-height: 1.72;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    max-width: 56rem;
}
.intro + .intro {
    margin-top: 1.1rem;
}
.intro strong {
    font-weight: 600;
    color: #fff;
}

.intro-cue {
    display: inline-block;
    margin-top: 1.7rem;
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mint);
}

.intro-cue a {
    color: var(--mint);
    text-decoration: none;
}

.intro-cue-mark {
    color: var(--mint);
    font-weight: 700;
}
/* footnote to "Here's how*" — sits beneath the opener box, right-aligned */
.intro-directions {
    margin: 1.2rem 0;
    font-family: "Oxanium", sans-serif;
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.55;
    color: var(--mint);
    text-align: center;
}

.panel {
    position: relative;
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
    padding: 1.6rem var(--gutter);
    overflow: hidden;
}
.panel + .panel {
    border-top: 1px solid rgba(91, 107, 122, 0.18);
}

.panel h1 {
    flex: 0 0 auto;
    font-weight: 800;
    font-size: clamp(1.3rem, 2.6vw, 2.3rem);
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}
.panel h1 .accent {
    background: linear-gradient(
        90deg,
        var(--mint),
        var(--cyan) 60%,
        var(--magenta)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* header on one line, copy + animation side by side beneath */
.panel-row {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: clamp(1.5rem, 4vw, 4rem);
}
.panel-copy {
    flex: 0 0 38%;
    max-width: 33rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}
.panel-anim {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.panel-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.sub {
    font-weight: 300;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.55;
    color: var(--text);
}

/* ── stage / vector legend ── */
.legend {
    margin-top: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 24rem;
}
.vec {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    background: rgba(11, 15, 20, 0.6);
    border: 1px solid rgba(91, 107, 122, 0.22);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        color 0.25s ease;
}
.vec-dot {
    width: 8px;
    height: 8px;
    background: var(--magenta);
    box-shadow: 0 0 10px rgba(255, 0, 153, 0.7);
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease;
}
.vec-name {
    text-transform: uppercase;
}
.vec-state {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wire);
    opacity: 0;
    transform: translateX(-6px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        color 0.3s ease;
}
.vec:hover,
.vec:focus-visible,
.vec.on {
    border-color: rgba(66, 255, 209, 0.6);
    color: #fff;
    outline: none;
}
.vec:hover .vec-dot,
.vec:focus-visible .vec-dot,
.vec.on .vec-dot {
    background: var(--mint);
    box-shadow: 0 0 12px rgba(66, 255, 209, 0.8);
}
.vec:hover .vec-state,
.vec:focus-visible .vec-state,
.vec.on .vec-state {
    opacity: 1;
    transform: none;
    color: var(--mint);
}

/* identity-governance & collapse steps read cyan, not threat magenta */
#governance .vec-dot,
#collapse .vec-dot {
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 194, 255, 0.55);
}
#governance .vec.on .vec-dot,
#collapse .vec.on .vec-dot {
    background: var(--mint);
    box-shadow: 0 0 12px rgba(66, 255, 209, 0.8);
}

/* ── mechanism caption ── */
.mechanism {
    margin-top: 1.4rem;
    max-width: 32rem;
    min-height: 4.4em;
    font-family: var(--mono);
    font-size: 0.76rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--text);
    border-left: 2px solid rgba(66, 255, 209, 0.4);
    padding-left: 0.9rem;
    opacity: 0.55;
    transition:
        opacity 0.3s ease,
        border-color 0.3s ease;
}
.mechanism.show {
    opacity: 1;
    border-color: rgba(66, 255, 209, 0.75);
}
.mechanism strong {
    color: var(--mint);
    font-weight: 700;
}

:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .vec,
    .vec-dot,
    .vec-state {
        transition: none;
    }
}

/* ── mobile: stack header, copy, animation ── */
@media (max-width: 900px) {
    .panel {
        height: auto;
        max-height: none;
        min-height: calc(100dvh - var(--nav-h));
        justify-content: flex-start;
        padding-top: 2rem;
    }
    .panel h1 {
        white-space: normal;
    }
    .panel-row {
        flex-direction: column;
    }
    .panel-copy {
        flex: 0 0 auto;
        max-width: none;
        overflow: visible;
    }
    .panel-anim {
        flex: 0 0 auto;
        min-height: 46vh;
    }
}

@media (max-width: 540px) {
    .intro-lead .accent {
        white-space: normal;
    }
    .opener {
        padding: 1.75rem 1.4rem;
    }
}

/* ── closing CTA (before footer) ── */
.cta-deeper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
    text-align: center;
}
.cta-deeper-eyebrow {
    font-family: var(--grot); /* Oxanium */
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1rem;
}
.cta-deeper-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.3rem;
}
.cta-deeper-link {
    text-decoration: none;
}
/* Each button carries its own glow colour. */
.cta-btn-manifesto {
    --glow: 255, 0, 153; /* magenta — matches index box-btn-manifesto */
}
.cta-btn-founder {
    --glow: 66, 255, 209; /* mint — matches index box-btn-fund */
}
/* Bigger presence than the nav buttons for the page's closing moment. */
.cta-deeper .glow-btn {
    padding: 14px 30px;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

@media (max-width: 768px) {
    .cta-deeper-btns {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }
    .cta-deeper .glow-btn {
        width: 100%;
    }
}

/* ── footer (matched to index.html) ── */
footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem var(--gutter);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    max-width: 100%;
}
footer span {
    font-family: "Open Sans", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
footer > span:first-child {
    flex: 1;
}
footer a {
    font-family: "Open Sans", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    padding: 4px 13px;
    border-radius: 1px;
    background: transparent;
    box-shadow: 0 0 9px rgba(0, 194, 255, 0.06);
    transition:
        box-shadow 0.5s ease,
        color 0.2s ease;
}
footer a:hover {
    box-shadow: 0 0 18px rgba(0, 194, 255, 0.34);
    color: rgba(255, 255, 255, 0.9);
}
.footer-legal {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.footer-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

@media screen and (max-width: 769px) {
    footer {
        flex-direction: column;
        align-items: center;
        gap: 0.18rem;
        padding: 0.9rem var(--gutter);
    }
    footer span {
        font-size: 0.63rem;
    }
    .footer-legal {
        display: none;
    }
    footer a {
        font-size: 0.63rem;
        padding: 0.75rem 0.75rem;
        min-height: 3rem;
        display: inline-flex;
        align-items: center;
        box-shadow: 0 0 14px rgba(0, 194, 255, 0.28);
    }
    .footer-links {
        gap: 4px;
    }
}

/* ── Visually-hidden labels (ported from index.css) ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ── Intake form fields (ported from index.css) ── */
.intake-field {
    margin-bottom: 0.75rem;
}
.intake-field input,
.intake-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1px;
    color: rgba(255, 255, 255, 0.85);
    font-family: "Open Sans", sans-serif;
    font-size: 0.75rem;
    padding: 0 0.75rem;
    outline: none;
    transition: border-color 0.25s;
    caret-color: rgba(255, 255, 255, 0.6);
}
.intake-field input:focus-visible,
.intake-field textarea:focus-visible {
    border-color: rgba(0, 194, 255, 0.7);
}
.intake-field input {
    height: 2.5rem;
}
.intake-field textarea {
    height: 5rem;
    padding: 0.63rem 0.75rem;
    resize: none;
}
.intake-field input::placeholder,
.intake-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.32);
}
.intake-field input:focus,
.intake-field textarea:focus {
    border-color: rgba(255, 255, 255, 0.45);
}
.intake-field input.err,
.intake-field textarea.err {
    border-color: rgba(255, 80, 80, 0.5);
}
.intake-submit {
    --glow: 0, 194, 255;
    width: 100%;
    margin-top: 0.8rem;
    font-size: 0.63rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}
.intake-submit:disabled {
    opacity: 0.5;
    cursor: default;
}
@media (min-width: 769px) {
    .intake-submit {
        font-size: 1rem;
        height: 2.75rem;
    }
}
.intake-error {
    font-family: "Open Sans", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(255, 80, 80, 0.8);
    margin-top: 0.5rem;
    min-height: 1em;
}

/* ── Apply / Design Partner drawer (ported from index.css) ── */
.apply-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        visibility 0s linear 0.3s;
}
.apply-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition:
        opacity 0.3s ease,
        visibility 0s linear 0s;
}
.apply-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28vw;
    min-width: 320px;
    max-width: 480px;
    background: #050505;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 210;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: hidden;
    padding: 1.5rem 2rem 1.5rem;
    pointer-events: none;
}
.apply-overlay.open .apply-drawer {
    transform: translateX(0);
    pointer-events: auto;
}
.apply-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.apply-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1px;
    color: rgba(255, 255, 255, 0.55);
    font-family: "Open Sans", sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition:
        border-color 0.2s,
        color 0.2s;
}
.apply-close:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
.apply-title {
    flex: 1;
    text-align: right;
    font-family: "Oxanium", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #00c2ff;
    margin-bottom: 0;
}
.apply-drawer .intake-field {
    margin-bottom: 0.45rem;
}
.apply-drawer .intake-field textarea {
    height: 59px;
}
.apply-drawer #a-agents-product,
.apply-drawer #a-agents-internal {
    height: 76px;
}
.apply-drawer .intake-submit {
    margin-top: 0.5rem;
}
@media screen and (max-width: 769px) {
    .apply-drawer {
        padding: 1.5rem 1.5rem 2rem;
    }
    .apply-drawer .intake-field {
        margin-bottom: 0.7rem;
    }
    .apply-drawer .intake-field textarea {
        height: 4.5rem;
    }
    .apply-drawer #a-agents-product,
    .apply-drawer #a-agents-internal {
        height: 6rem;
    }
    .apply-drawer .intake-submit {
        margin-top: 1rem;
        height: 2.75rem;
    }
}
