/* =========================================================================
   ElysiumX — static landing page
   -------------------------------------------------------------------------
   Lab / terminal dark theme. Near-black canvas, off-white ink, a single muted
   amber accent. Monospace is the chrome language (labels, nav, metadata);
   sans carries body; Mozilla Headline is the display face for the hero.
   Hand-written CSS (no build step) reproducing the original Tailwind design.
   ========================================================================= */

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
    --font-sans: "DejaVu Sans", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "DejaVu Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-display: "Mozilla Headline Variable", "DejaVu Sans", ui-sans-serif, system-ui, sans-serif;

    /* Canvas — near-black, faintly warm so amber doesn't read as alien. */
    --color-bg: #0a0b0c;
    --color-bg-dim: #111315;
    --color-bg-raised: #16191b;

    /* Ink */
    --color-fg: #e8e6e1;
    --color-fg-muted: #9a978f;
    --color-fg-faint: #5f5d57;

    /* Lines */
    --color-line: #2a2d30;
    --color-line-soft: #1c1e20;

    /* Single chromatic accent — muted amber / copper. Used sparingly. */
    --color-accent: #e0a060;
    --color-accent-dim: #b87d42;

    --color-danger: #d9694f;
}

/* ── Fonts ──────────────────────────────────────────────────────────────── */
@font-face {
    font-family: "DejaVu Sans";
    src: local("DejaVu Sans"),
         url("../fonts/DejaVuSans.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "DejaVu Sans Mono";
    src: local("DejaVu Sans Mono"),
         url("../fonts/DejaVuSansMono.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "DejaVu Sans Mono";
    src: local("DejaVu Sans Mono Bold"), local("DejaVu Sans Mono"),
         url("../fonts/DejaVuSansMono-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Mozilla Headline Variable";
    src: url("../fonts/mozilla-headline-latin-wght-normal.woff2") format("woff2-variations");
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}

/* ── Reset / base ───────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--color-bg);
    color-scheme: dark;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-fg);
    overflow-x: hidden;
    line-height: 1.5;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Layout primitives ──────────────────────────────────────────────────── */
.page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.container {
    margin-inline: auto;
    width: 100%;
    max-width: 920px;
    padding-inline: 20px;
}

.main {
    position: relative;
    flex: 1 1 auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid var(--color-line);
}

.site-header__bar {
    display: flex;
    height: 56px;
    align-items: center;
    justify-content: space-between;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--color-fg);
}

.wordmark__base {
    transition: color 0.15s ease;
}
.wordmark__x {
    font-weight: 700;
    color: var(--color-accent);
    transition: color 0.15s ease;
}
.wordmark:hover .wordmark__base {
    color: var(--color-fg-muted);
}
.wordmark:hover .wordmark__x {
    color: var(--color-accent-dim);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.site-nav a {
    color: var(--color-fg-muted);
    transition: color 0.15s ease;
}
.site-nav a:hover {
    color: var(--color-fg);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--color-line);
}

.site-footer__bar {
    display: flex;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-fg-faint);
}

/* ── Shared mono eyebrow / labels ───────────────────────────────────────── */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-fg-muted);
    line-height: 1.5;
}
.eyebrow__dot {
    color: var(--color-accent);
}

/* ── Home — single-screen terminal index ────────────────────────────────── */
.home {
    /* Fill the viewport between the 56px header and footer so the home page
       never scrolls; content is vertically centered. */
    min-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 48px;
}

.home__title {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--color-fg);
    text-wrap: balance;
}
.home__title-emphasis {
    font-weight: 700;
    color: var(--color-accent);
}

.home__intro {
    margin-top: 24px;
    max-width: 62ch;
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-fg-muted);
    text-wrap: pretty;
}

/* ── Terminal index (ls listing) ────────────────────────────────────────── */
.term {
    margin-top: 44px;
    font-family: var(--font-mono);
}

.term__prompt {
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--color-fg-faint);
}
.term__path {
    color: var(--color-accent);
}
.term__sigil {
    color: var(--color-fg-muted);
    margin-left: 0.15em;
    margin-right: 0.15em;
}

.term__list {
    list-style: none;
    margin-top: 14px;
    border-top: 1px solid var(--color-line-soft);
}

.term__row {
    border-bottom: 1px solid var(--color-line-soft);
}

.term__link {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 4px;
    font-size: 14px;
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}
.term__link:hover,
.term__link:focus-visible {
    background-color: var(--color-bg-dim);
    padding-left: 12px;
    outline: none;
}

.term__name {
    color: var(--color-fg);
    min-width: 9ch;
}
.term__link:hover .term__name,
.term__link:focus-visible .term__name {
    color: var(--color-accent);
}

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

.term__desc {
    color: var(--color-fg-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* ── Doc — manifesto reading page ───────────────────────────────────────── */
.doc {
    padding-block: 64px 80px;
    max-width: 70ch;
}

.doc__crumb {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--color-fg-faint);
}

.doc__title {
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-fg-muted);
}
.doc__title::before {
    content: "// ";
    color: var(--color-accent);
}

.doc__body {
    margin-top: 28px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--color-fg);
}
.doc__body > * + * {
    margin-top: 24px;
}
.doc__body p.muted {
    color: var(--color-fg-muted);
}

.doc__sign {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-line);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-fg-muted);
}

.doc__back {
    margin-top: 28px;
}
.doc__back-link {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    transition: color 0.15s ease;
}
.doc__back-link:hover {
    color: var(--color-accent-dim);
}

/* ── Terminal blink cursor ──────────────────────────────────────────────── */
@keyframes elysium-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.blink-cursor {
    display: inline-block;
    width: 0.6ch;
    height: 1em;
    margin-left: 0.15em;
    transform: translateY(0.12em);
    vertical-align: middle;
    background-color: var(--color-accent);
    animation: elysium-blink 1.1s step-end infinite;
}

/* ── Entrance fade-in (replicates the original Framer Motion hero stagger) ── */
@keyframes elysium-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
    opacity: 0;
    animation: elysium-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.fade-up.delay-0 { animation-delay: 0s; }
.fade-up.delay-1 { animation-delay: 0.06s; }
.fade-up.delay-2 { animation-delay: 0.12s; }
.fade-up.delay-3 { animation-delay: 0.18s; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
    .container { padding-inline: 32px; }
    .home__title { font-size: 48px; }
    .home__intro { font-size: 18px; }
    .doc__body { font-size: 18px; }
    .term__link { font-size: 15px; }
}

@media (min-width: 768px) {
    .home__title { font-size: 56px; }
}

@media (min-width: 1024px) {
    .container { padding-inline: 40px; }
    .home__title { font-size: 62px; }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-up { opacity: 1; }
}
