/* =====================================================
   Static pages — privacy.html, terms.html, support.html
   Night Launch tokens (see landing.css) carried locally:
   these pages load without the SPA and its stylesheets,
   so everything they need is here.
   ===================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.legal-page {
    --void: #080503;
    --deep: #110c08;
    --ink: #1b1510;
    --signal: #f46622;
    --signal-soft: #fd9156;
    --frost: #add8ef;
    --bone: #edebe7;
    --bone-dim: #bebab3;
    --bone-faint: #9c9890;
    --rule: rgba(237, 235, 231, 0.14);
    --rule-strong: rgba(237, 235, 231, 0.28);
    --font-display: 'Saira', 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'SFMono-Regular', 'Roboto Mono', Consolas, 'Liberation Mono', monospace;
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

    margin: 0;
    min-height: 100vh;
    color: var(--bone);
    color-scheme: dark;
    background-color: var(--void);
    background-image:
        radial-gradient(ellipse 120% 70% at 72% -12%, #1c110a 0%, transparent 55%),
        radial-gradient(ellipse 90% 60% at 8% 102%, #0c1218 0%, transparent 55%),
        linear-gradient(180deg, #080503 0%, #0b0705 50%, #080503 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.legal-page ::selection { background: var(--signal); color: var(--void); }

.legal-page :focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

.legal-page a { transition: color 0.2s var(--ease-out); }

/* Prose links are the only underlined ones; navigation and contact values style themselves */
.legal-lede a,
.legal-section a {
    color: var(--signal-soft);
    text-decoration: underline;
    text-decoration-color: rgba(253, 145, 86, 0.4);
    text-underline-offset: 3px;
}

.legal-lede a:hover,
.legal-section a:hover { color: var(--bone); }

.legal-page img { max-width: 100%; display: block; }

/* ---------- Header bar ---------- */
.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 5, 3, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--rule);
}

.legal-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.legal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--bone);
}

.legal-logo:hover { color: var(--bone); }

.legal-logo-img {
    width: 40px;
    height: auto;
    border-radius: 4px;
}

.legal-logo-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.legal-logo-text em {
    font-style: normal;
    font-weight: 300;
    color: var(--signal);
}

.legal-header-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 22px;
}

.legal-header-nav a {
    color: var(--bone-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.legal-header-nav a:hover { color: var(--bone); }
.legal-header-nav a[aria-current="page"] { color: var(--signal); }

/* ---------- Document ---------- */
.legal-main {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 88px) 24px clamp(64px, 8vw, 110px);
}

.legal-rail {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bone-faint);
    white-space: nowrap;
}

.legal-rail .rail-label { color: var(--signal); }

.legal-rail .rail-line {
    flex: 1;
    height: 1px;
    min-width: 40px;
    background: var(--rule);
}

.legal-title {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 200;
    line-height: 1.1;
    letter-spacing: 0;
    text-wrap: balance;
}

.legal-title em {
    font-style: normal;
    font-weight: 500;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0 0 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
    color: var(--bone-faint);
    font-size: 0.9rem;
}

.legal-meta strong {
    color: var(--bone-dim);
    font-weight: 500;
}

.legal-lede {
    margin: 0 0 36px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--bone-dim);
}

/* Table of contents */
.legal-toc {
    margin: 0 0 48px;
    padding: 22px 24px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: rgba(17, 12, 8, 0.6);
}

.legal-toc-title {
    margin: 0 0 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bone-faint);
}

.legal-toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 32px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.legal-toc li {
    padding: 4px 0;
    break-inside: avoid;
}

.legal-toc li::marker { color: var(--bone-faint); }

.legal-toc a {
    color: var(--bone-dim);
    text-decoration: none;
}

.legal-toc a:hover { color: var(--signal-soft); }

/* Sections */
.legal-section h2 {
    margin: 52px 0 14px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.25;
    scroll-margin-top: 96px;
}

.legal-section:first-of-type h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-section h3 {
    margin: 26px 0 8px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.3;
}

.legal-section p {
    margin: 0 0 16px;
    color: var(--bone-dim);
}

.legal-section strong {
    color: var(--bone);
    font-weight: 600;
}

.legal-section ul,
.legal-section ol {
    margin: 0 0 18px;
    padding-left: 1.4rem;
    color: var(--bone-dim);
}

.legal-section li { margin-bottom: 8px; }
.legal-section li::marker { color: var(--bone-faint); }

.legal-section address {
    font-style: normal;
    color: var(--bone-dim);
    line-height: 1.8;
}

.legal-callout {
    margin: 0 0 20px;
    padding: 16px 20px;
    border-left: 2px solid var(--signal);
    border-radius: 0 8px 8px 0;
    background: rgba(244, 102, 34, 0.06);
}

.legal-callout p:last-child { margin-bottom: 0; }

/* Contact cells (support page) — ruled, no cards */
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0 0 44px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.legal-contact-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 26px 24px 28px 0;
}

.legal-contact-item + .legal-contact-item {
    padding-left: 24px;
    border-left: 1px solid var(--rule);
}

.legal-contact-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bone-faint);
}

.legal-contact-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 300;
    font-style: normal;
    line-height: 1.4;
    color: var(--bone);
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.legal-contact-value:hover { color: var(--signal-soft); }

.legal-contact-value strong {
    display: block;
    font-weight: 500;
}

.legal-contact-note {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--bone-dim);
}

a.legal-contact-note {
    color: var(--frost);
    text-decoration: none;
}

a.legal-contact-note:hover { color: var(--bone); }

/* ---------- Footer ---------- */
.legal-footer {
    border-top: 1px solid var(--rule);
    background: rgba(8, 5, 3, 0.6);
}

.legal-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 36px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 32px;
    color: var(--bone-faint);
    font-size: 0.86rem;
    line-height: 1.7;
}

.legal-footer address { font-style: normal; }

.legal-footer address strong {
    color: var(--bone-dim);
    font-weight: 500;
}

.legal-footer p { margin: 6px 0 0; }

.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px 20px;
}

.legal-footer-links a {
    color: var(--bone-dim);
    text-decoration: none;
}

.legal-footer-links a:hover { color: var(--bone); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .legal-header-nav { gap: 6px 14px; }
    .legal-toc ol { columns: 1; }

    .legal-contact-grid { grid-template-columns: 1fr; }
    .legal-contact-item { padding: 22px 0; }

    .legal-contact-item + .legal-contact-item {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--rule);
    }

    .legal-footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
    .legal-logo-text { display: none; }
    .legal-rail { letter-spacing: 0.14em; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
