:root {
    --bg: #030303;
    --text: #f5f5f5;
    --text-muted: #a1a1aa;
    --text-faint: #71717a;
    --cream: #f1ebcf;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --card: rgba(255, 255, 255, 0.025);
    --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, monospace;
    --ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 3px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 8px; z-index: 200;
    background: var(--cream); color: #000; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 6px; }

/* Top bar */

.topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(3, 3, 3, 0.72);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar .container { display: flex; align-items: center; gap: 24px; height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.brand img { border-radius: 7px; }

.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 0.92rem; }
.nav a:not(.btn) { color: var(--text-muted); text-decoration: none; transition: color var(--ease); }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--cream); color: #000;
    padding: 14px 26px; border: 1px solid transparent; border-radius: 12px;
    font-weight: 600; font-size: 1rem; text-decoration: none;
    transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(241, 235, 207, 0.18); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-small { padding: 7px 14px; font-size: 0.88rem; border-radius: 9px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); box-shadow: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.fineprint { color: var(--text-faint); font-size: 0.88rem; margin-top: 14px; }
.fineprint a { color: var(--text-muted); }
.fineprint a:hover { color: var(--text); }
.fineprint [data-latest-version]::after { content: " · "; }

/* Home */

.hero { position: relative; padding: 88px 0 56px; text-align: center; }
.hero::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    top: -120px; left: 50%; transform: translateX(-50%);
    width: min(900px, 100%); height: 520px;
    background: radial-gradient(ellipse at center, rgba(241, 235, 207, 0.09), transparent 68%);
}
.hero-icon { width: 128px; height: 128px; border-radius: 28px; margin: 0 auto 28px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; }
.tagline { font-size: clamp(1.25rem, 3vw, 1.6rem); color: var(--text-muted); letter-spacing: -0.02em; margin-top: 10px; }
.intro { max-width: 640px; margin: 24px auto 32px; color: var(--text-muted); font-size: 1.1rem; }
.intro strong { color: var(--text); font-weight: 500; }
.hero .cta-row { justify-content: center; }
.hero-shot { margin-top: 56px; }

.shot {
    display: block; width: 100%; padding: 0; border: 0; background: none;
    border-radius: 14px; overflow: hidden; cursor: zoom-in;
    transition: transform var(--ease);
}
.shot:hover { transform: translateY(-3px); }

section { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 1.05rem; }
.eyebrow {
    display: inline-block; margin-bottom: 12px;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--cream); opacity: 0.85;
}
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; }

.engines, .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.engine, .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card { padding: 28px; }
.engine h3, .card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.engine p, .card p { color: var(--text-muted); font-size: 0.95rem; }
.card a { color: var(--text); }
.card .icon { width: 26px; height: 26px; color: var(--cream); margin-bottom: 14px; }
.card code { font-family: var(--mono); font-size: 0.88em; }
.made-with { max-width: 720px; margin: 40px auto 0; text-align: center; color: var(--text-muted); font-size: 0.95rem; }
.made-with strong, .made-with a { color: var(--text); }

.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; padding: 40px 0; }
.feature.reverse { grid-template-columns: 7fr 5fr; }
.feature.reverse .feature-text { order: 2; }
.feature h3 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 650; letter-spacing: -0.025em; margin-bottom: 12px; }
.lead { color: var(--text-muted); margin-bottom: 18px; }

.ticks { list-style: none; }
.ticks li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text-muted); font-size: 0.95rem; }
.ticks li::before { content: "→"; position: absolute; left: 0; color: var(--text-faint); }
.ticks strong { color: var(--text); font-weight: 500; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.gallery figcaption { color: var(--text-faint); font-size: 0.85rem; margin-top: 8px; text-align: center; }

.download-band {
    text-align: center; padding: 56px 24px;
    background: linear-gradient(180deg, rgba(241, 235, 207, 0.06), rgba(241, 235, 207, 0.015));
    border: 1px solid var(--border); border-radius: 24px;
}
.download-band h2 { margin-bottom: 12px; }
.download-band p { color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; }
.download-band .cta-row { justify-content: center; }
.download-band .chips { max-width: 560px; margin: 28px auto 0; text-align: left; }
.download-band .fineprint { margin: 18px auto 0; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 14px; padding: 16px 20px; }
.chip b { display: block; }
.chip span { color: var(--text-muted); font-size: 0.9rem; }
.chip code { font-family: var(--mono); font-size: 0.88em; white-space: nowrap; }

/* Footer */

footer { border-top: 1px solid var(--border); margin-top: 72px; padding: 40px 0 48px; color: var(--text-faint); font-size: 0.88rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.legal { margin-top: 24px; font-size: 0.8rem; }

.signature { display: inline-grid; }
.signature span { grid-area: 1 / 1; font-style: italic; transition: opacity var(--ease); }
.signature .alt, .signature:hover .main, .signature.active .main { opacity: 0; }
.signature:hover .alt, .signature.active .alt { opacity: 1; }

/* Lightbox */

.lightbox {
    max-width: none; max-height: none; width: 100%; height: 100%;
    padding: 16px; border: 0; background: transparent;
    align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; }
.lightbox button {
    position: absolute; top: 16px; right: 20px;
    background: none; border: 0; color: #fff; font-size: 38px; line-height: 1; cursor: pointer;
}

@media (max-width: 900px) {
    .feature, .feature.reverse { grid-template-columns: 1fr; gap: 28px; padding: 28px 0; }
    .feature.reverse .feature-text { order: 0; }
    .engines, .cards { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .nav { gap: 16px; }
    .hide-sm { display: none; }
    .hero { padding: 56px 0 40px; }
    .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
    .hero-shot { margin-top: 40px; }
    .hero .btn, .download-band .btn { width: 100%; }
    section { padding: 48px 0; }
    .gallery, .chips { grid-template-columns: 1fr; }
    .download-band { padding: 40px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
