/* Landing page (px.ali.et) — hero over a live AMOLED simulation.
   Palette/type come from styles/theme.css; the accent is the only
   saturated color and drifts via src/hue-drift.js. */

@font-face {
    font-family: "Instrument Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/instrument-serif-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Instrument Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/instrument-serif-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
        U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
        U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    background: #000;
    overflow-x: hidden;
}

body {
    font-family: var(--ui-font);
    color: var(--txt);
}

#display-shell {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #000;
}

#display {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

/* Legibility scrim over the running simulation: a left-side shelf the hero
   copy sits on, plus the existing radial vignette. */
#display-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,.34) 40%, rgba(0,0,0,0) 72%),
        radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 68%, rgba(0,0,0,.82) 100%);
}

#page {
    position: relative;
    z-index: 2;
}

#hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 4vw, 48px);
}

.hero-top {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.wordmark {
    font-family: var(--mono-font);
    font-size: 14px;
    letter-spacing: .04em;
    color: var(--txt);
}

.wordmark i {
    color: var(--accent);
    font-style: normal;
}

.hero-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: var(--faint);
}

.hero-foot a {
    color: var(--dim);
    text-decoration: none;
    transition: color .15s ease;
}

.hero-foot a:hover { color: var(--txt); }

.hero-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
}

.hero-main h1 {
    font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: clamp(44px, 8vw, 104px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--txt);
    text-wrap: balance;
}

.hero-sub {
    margin-top: clamp(14px, 2vw, 22px);
    max-width: 52ch;
    font-size: clamp(13px, 1.5vw, 15px);
    line-height: 1.6;
    color: var(--dim);
}

.hero-actions {
    margin-top: clamp(22px, 3.5vw, 36px);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn.primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn.primary:hover {
    background: color-mix(in oklab, var(--accent) 85%, white);
}

.btn.secondary {
    border: 1px solid var(--line);
    color: var(--txt);
    background: color-mix(in oklab, var(--bg) 55%, transparent);
    backdrop-filter: blur(6px);
}

.btn.secondary:hover {
    border-color: var(--accent-line);
}

.hero-foot .spacer { flex: 1; }

/* ---------- Content tray: crawlable "About & mechanics" copy scrolling
   over the fixed simulation. Opaque so the canvas only shows behind the
   hero; a gradient plume above the top edge softens the hand-off. */

#tray {
    position: relative;
    background: var(--bg);
    padding: clamp(56px, 8vw, 104px) clamp(20px, 4vw, 48px) clamp(40px, 6vw, 72px);
}

#tray::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: clamp(90px, 14vw, 180px);
    transform: translateY(-100%);
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--bg) 100%);
}

.tray-inner {
    max-width: 780px;
    margin: 0 auto;
}

.tray-section {
    padding: clamp(28px, 4vw, 44px) 0;
    border-bottom: 1px solid var(--line);
}

.tray-section:last-child { border-bottom: 0; }

.eyebrow {
    font-family: var(--mono-font);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.tray-section h2 {
    font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--txt);
    text-wrap: balance;
}

.tray-section h2 + p { margin-top: clamp(14px, 2vw, 20px); }

.tray-section p,
.tray-section li {
    font-size: clamp(14px, 1.4vw, 15.5px);
    line-height: 1.7;
    color: var(--dim);
    max-width: 68ch;
}

.tray-section p + p { margin-top: 14px; }
.tray-section ol + p,
.tray-section ul + p { margin-top: 18px; }

.tray-section strong { color: var(--txt); font-weight: 600; }

.tray-section a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s ease;
}

.tray-section a:hover { text-decoration-color: var(--accent); }

.tray-section ul,
.tray-section ol {
    margin-top: 16px;
    padding-left: 22px;
    display: grid;
    gap: 8px;
}

.tray-section li::marker { color: var(--accent); }

.mono {
    font-family: var(--mono-font);
    font-size: .92em;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* Collapsible deep-dives: content stays in the DOM for crawlers. */
details.deep {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: color-mix(in oklab, var(--panel) 72%, transparent);
    overflow: hidden;
}

details.deep + details.deep { margin-top: 10px; }

details.deep summary {
    cursor: pointer;
    list-style: none;
    padding: 13px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s ease;
}

details.deep summary::-webkit-details-marker { display: none; }

details.deep summary::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
    transition: transform .18s ease;
}

details.deep summary:hover { background: var(--panel-2); }
details[open].deep summary::before { transform: rotate(90deg); }

details.deep p {
    padding: 0 16px 15px 33px;
    font-size: 14px;
}

details.deep a { color: var(--accent); }

.tray-section.faq details.deep summary { font-weight: 500; }

.tray-section.cta { border-bottom: 0; padding-bottom: 0; }

.tray-section.cta .hero-actions { margin-top: 22px; }

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

@media (max-width: 640px) {
    .hero-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
    .hero-foot .spacer { display: none; }
}
