/* Astraen Labs site.
   One typeface: Inter, self-hosted (assets/fonts/, SIL OFL), so the site makes zero
   third-party requests. The CSP in _headers (default-src 'self') enforces that, and also
   forbids inline <style> and style="" attributes — all styling lives here.

   Identity: "astra" is a star. The hero is always a night sky (both colour schemes); the
   rest of the page follows prefers-color-scheme. The accent is a warm starlight amber. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(fonts/inter-latin.woff2) format('woff2');
}

:root {
    --page: #f5f3ee;
    --surface: #ffffff;
    --ink: #13151a;
    --body: #3a3d45;
    --muted: #5f636c;
    --border: rgba(19, 21, 26, 0.10);
    --accent: #9a5b00;        /* 5.6:1 on --page */
    --accent-fill: #f0b44c;
    --on-accent: #1a1204;
    --band: #ecE8df;

    --night: #0b0d12;
    --night-2: #131722;
    --night-ink: #f3f1ec;
    --night-body: #b9bdc8;
    --night-muted: #8a90a0;
    --night-line: rgba(240, 180, 76, 0.28);
    --star: #f7e7c4;

    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --radius: 14px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #0b0d12;
        --surface: #141821;
        --ink: #f3f1ec;
        --body: #c3c7d1;
        --muted: #9096a5;
        --border: rgba(243, 241, 236, 0.10);
        --accent: #f0b44c;
        --band: #10131b;
    }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--page);
    color: var(--body);
    font: 400 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

.skip {
    position: absolute; left: -9999px; top: 8px;
    background: var(--accent-fill); color: var(--on-accent);
    padding: 8px 14px; border-radius: 8px; z-index: 10; text-decoration: none; font-weight: 600;
}
.skip:focus { left: 8px; }

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

/* ---------- Header (sits on the night hero) ---------- */

.site-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 5;
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }

.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--night-ink); text-decoration: none;
    font-weight: 650; font-size: 17px; letter-spacing: -0.01em;
}
.mark { width: 22px; height: 22px; fill: var(--accent-fill); flex: none; }

.nav { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--night-body); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--night-ink); }
.nav .nav-cta {
    color: var(--night-ink); border: 1px solid rgba(243, 241, 236, 0.22);
    padding: 7px 14px; border-radius: 999px;
}
.nav .nav-cta:hover { border-color: var(--accent-fill); }
@media (max-width: 720px) { .nav li:not(:last-child) { display: none; } }

/* ---------- Hero ---------- */

.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 480px at 78% 30%, rgba(240, 180, 76, 0.10), transparent 70%),
        radial-gradient(700px 500px at 10% 110%, rgba(90, 110, 190, 0.16), transparent 70%),
        linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
    color: var(--night-body);
    padding: 168px 0 128px;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky .dust circle { fill: var(--star); opacity: 0.45; }
.sky .lines path { fill: none; stroke: var(--night-line); stroke-width: 1; stroke-linejoin: round; }
.sky .stars circle { fill: var(--star); }
.sky .stars .bright { fill: var(--accent-fill); filter: drop-shadow(0 0 6px rgba(240, 180, 76, 0.8)); }

@media (prefers-reduced-motion: no-preference) {
    .sky .stars circle { animation: twinkle 5s ease-in-out infinite; }
    .sky .stars circle:nth-child(2n) { animation-delay: -1.6s; animation-duration: 6.5s; }
    .sky .stars circle:nth-child(3n) { animation-delay: -3.1s; animation-duration: 4.2s; }
    .sky .lines path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.2s 0.3s ease-out forwards; }
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 860px) {
    .sky .lines, .sky .stars { opacity: 0.35; }
}

.hero-inner { position: relative; max-width: 1120px; }
.hero-inner > * { max-width: 680px; }

.eyebrow {
    font: 500 13px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--accent-fill); margin-bottom: 22px;
}
.hero h1 {
    color: var(--night-ink);
    font-size: clamp(38px, 6.2vw, 68px); line-height: 1.04; font-weight: 700; letter-spacing: -0.035em;
}
.lede { margin-top: 24px; font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--night-body); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 0 22px; border-radius: 999px;
    background: var(--accent-fill); color: var(--on-accent);
    font-weight: 600; font-size: 16px; text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { background: #f5c46b; transform: translateY(-1px); }
.button.ghost { background: transparent; color: var(--night-ink); border: 1px solid rgba(243, 241, 236, 0.22); }
.button.ghost:hover { border-color: var(--accent-fill); background: rgba(243, 241, 236, 0.04); }

/* ---------- Sections ---------- */

.section { padding: 112px 0; }
@media (max-width: 720px) { .section { padding: 80px 0; } }

.band { background: var(--band); border-block: 1px solid var(--border); }

.kicker {
    font: 500 13px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 14px;
}
.section h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; max-width: 720px; }
.section-lede { margin-top: 18px; max-width: 680px; font-size: 18px; }

.grid { display: grid; gap: 20px; margin-top: 48px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three { grid-template-columns: 1fr; } }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 28px 32px;
}
.card h3 { font-size: 20px; font-weight: 650; margin: 20px 0 10px; }
.icon {
    width: 40px; height: 40px; padding: 8px; border-radius: 10px;
    background: rgba(240, 180, 76, 0.14);
    fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* In the lab */

.lab-list {
    list-style: none; margin: 48px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
    border-top: 1px solid var(--border);
}
@media (max-width: 760px) { .lab-list { grid-template-columns: 1fr; } }
.lab-list li {
    display: flex; gap: 18px; align-items: flex-start;
    padding: 28px 24px 28px 0; border-bottom: 1px solid var(--border);
}
.lab-list h3 { font-size: 18px; font-weight: 650; margin-bottom: 6px; }
.lab-list p { color: var(--muted); font-size: 16px; }
.lab-tag {
    flex: none; min-width: 52px; text-align: center; margin-top: 2px;
    font: 500 12px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 6px 8px;
}

/* Approach */

.principles { list-style: none; padding: 0; }
.principles li { border-top: 2px solid var(--ink); padding-top: 22px; }
.principles h3 { font-size: 20px; font-weight: 650; margin: 12px 0 10px; }
.num { font: 500 13px/1 var(--mono); color: var(--accent); }

/* Contact */

.contact {
    background:
        radial-gradient(600px 300px at 50% 0%, rgba(240, 180, 76, 0.12), transparent 70%),
        var(--night);
    color: var(--night-body);
    text-align: center;
}
.contact h2 { color: var(--night-ink); margin: 0 auto; }
.contact-inner p { margin: 16px auto 32px; font-size: 18px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); border-top: 1px solid rgba(243, 241, 236, 0.08); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 28px; }
.brand.small { font-size: 15px; }
.brand.small .mark { width: 18px; height: 18px; }
.fine { color: var(--night-muted); font-size: 14px; }

.notfound { min-height: 100vh; display: flex; align-items: center; padding: 96px 0; }
@media (max-width: 520px) { .hero { padding: 128px 0 88px; } .eyebrow { font-size: 12px; } }
