/* ============================================================
   Constellation Labs. One-page site.
   Cream/ink two-tone system, self-hosted type family.
   No loops, blinks, or pulses; no decorative overlays,
   glassmorphism, or elevation effects. Type-only identity.
   Hero: dark surface with static constellation chart.
   Body sections: plain cream register.
   See THEME TOKENS block for color system.
   ============================================================ */

/* ---- Self-hosted font: Inter (variable, weight range 400-800).
        One family ships. No CDN, no other webfont. ---- */
@font-face {
  font-family:"Inter";
  font-style:normal;
  font-weight:400 800;
  font-display:swap;
  src:url("../fonts/inter-latin-var.woff2") format("woff2");
}

/* ============================================================
   THEME TOKENS
   Color role tokens, isolated for easy adjustment.
   All color rules reference these tokens, never raw hex values.
   Body: cream field, deep band, ink text, hairlines.
   Hero (void surface): inverted dark variant.
     --field       body field (cream)
     --field-deep  alternating section band
     --ink         primary text / wordmark ink
     --hairline    hairline rule on the field
     --void        the hero field (near-black)
     --void-line   hairline rule on the void
     --void-dim    secondary text on the void
   ============================================================ */
:root {
  --field:            #FDF8F4;
  --field-deep:       #F3ECE1;
  --ink:              #1E1F20;
  --ink-soft:          #55504A;
  --ink-faint:        #6D6556;
  --hairline:         #E4DACB;
  --hairline-strong:  #C7B99E;
  --focus:            #1E1F20;

  --void:             #0B0B0C;
  --void-line:        rgba(253,248,244,.22);
  --void-line-soft:   rgba(253,248,244,.12);
  --void-dim:         rgba(253,248,244,.58);
}
/* ============================================================
   END THEME TOKENS
   ============================================================ */

/* ---- Structural tokens (register mechanics, not theme) ---- */
:root {
  --font:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 880px;
  --gutter: 20px;
  --header-h: 72px;
}
@media (min-width:760px) { :root { --gutter:40px; } }

/* ---- Reset / base ---- */
*,*::before,*::after { box-sizing:border-box; }
html,body { margin:0; }
html { -webkit-text-size-adjust:100%; scroll-behavior:auto; }
body {
  background:var(--field); color:var(--ink);
  font-family:var(--font); font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
a { color:inherit; text-decoration:none; }
img,svg { display:block; max-width:100%; height:auto; }
h1,h2,h3 { margin:0; font-weight:700; }
p { margin:0 0 1em; }
ul,ol { margin:0; padding:0; list-style:none; }

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

.skip-link {
  position:absolute; left:12px; top:-60px; z-index:100;
  background:var(--ink); color:var(--field); border-radius:4px;
  padding:10px 16px; font-weight:600;
}
.skip-link:focus { top:12px; }
@media (prefers-reduced-motion: no-preference) { .skip-link { transition:top .15s ease; } }

.wrap { max-width:var(--maxw); margin:0 auto; padding:0 var(--gutter); }

.kicker {
  display:block; font-family:var(--font); font-weight:700; font-size:12px;
  letter-spacing:0.16em; text-transform:uppercase; color:var(--ink-soft);
  margin:0 0 14px;
}

/* ---- Header (plain type wordmark, no logo) ---- */
.site-header {
  position:sticky; top:0; z-index:50;
  background:var(--field);
  border-bottom:1px solid var(--hairline);
}
.site-header .wrap { min-height:var(--header-h); display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:10px; padding-bottom:10px; }
.lockup { display:flex; align-items:center; }
.wordmark { display:flex; align-items:baseline; gap:0.25em; flex-wrap:nowrap; }
.wm-1, .wm-2 { font-weight:800; font-size:clamp(15px, 3.6vw, 19px); letter-spacing:0.01em; white-space:nowrap; }

.nav { display:flex; align-items:center; }
.nav-links { display:flex; align-items:center; gap:8px 22px; }
.nav-links a { font-size:14px; font-weight:500; color:var(--ink-soft); display:inline-flex; align-items:center; min-height:44px; white-space:nowrap; }
@media (prefers-reduced-motion: no-preference) { .nav-links a { transition:color .15s ease; } }
.nav-links a:hover { color:var(--ink); }

/* Zero-JS mobile pattern: no hamburger, so the in-page nav rows
   hide under the breakpoint where five links would crowd the
   header; the wordmark alone always fits. */
@media (max-width:759px) {
  .nav { display:none; }
}
@media (max-width:600px) {
  :root { --header-h:64px; }
}

/* ---- Anchor scroll offset (sticky header): the token plus a small
        fixed buffer, so the border-bottom hairline (and any minor
        engine/font rounding) can never put the anchor a pixel short
        of the header. The streamline lesson, applied globally. ---- */
[id] { scroll-margin-top:calc(var(--header-h) + 12px); }

/* ============================================================
   THE HERO - the one night surface on the page ("the void").
   Cuts straight to the cream register below: no border, no
   transitional band, a flat background swap only.
   ============================================================ */
.hero { background:var(--void); }
.hero-inner { max-width:var(--maxw); margin:0 auto; padding:56px var(--gutter) 8px; }
.hero-content { max-width:640px; }
.hero .kicker { color:var(--void-dim); }
.hero h1 { font-size:clamp(1.9rem, 3.2vw + 1.1rem, 2.9rem); line-height:1.08; letter-spacing:-0.01em; color:var(--field); }
.hero .lead { font-size:17px; line-height:1.62; color:var(--void-dim); max-width:560px; margin:22px 0 0; }
.hero .lead + .lead { margin-top:14px; }
@media (max-width:600px) {
  .hero-inner { padding:40px var(--gutter) 4px; }
}

/* The chart itself: flat vector only, plain strokes and fills. */
.chart-wrap { max-width:var(--maxw); margin:0 auto; padding:36px var(--gutter) 0; }
.chart-frame { position:relative; }
.chart-svg text { font-family:var(--font); }
.chart-svg .cname { font-weight:600; letter-spacing:.4em; text-transform:uppercase; fill:var(--void-line); }
.chart-svg .bayer { font-weight:600; fill:var(--void-dim); }
.chart-svg .sname { font-weight:700; letter-spacing:.08em; text-transform:uppercase; fill:var(--field); }
.chart-svg .sdesc { font-weight:400; fill:var(--void-dim); }
.chart-svg .fieldcap { fill:var(--void-dim); font-weight:600; letter-spacing:.1em; text-transform:uppercase; }
.chart-svg line { stroke:var(--void-line); stroke-width:1; }
.chart-svg .tick { stroke:var(--void-line-soft); stroke-width:1; }
.chart-svg .frame-rule { stroke:var(--void-line-soft); stroke-width:1; fill:none; }
.chart-svg .orbit-arc { stroke:var(--void-line); stroke-width:1; fill:none; }
.chart-svg .vault-dot { fill:var(--void-dim); }
.chart-svg .star-dot { fill:var(--field); }
.chart-svg .rooms-line { stroke:var(--void-line); stroke-width:1; }

.void-foot { max-width:var(--maxw); margin:0 auto; padding:14px var(--gutter) 40px; }
.void-foot p { margin:0; font-size:12px; color:var(--void-dim); letter-spacing:.02em; }

/* The stacked-list fallback: below ~700px the vector chart hides
   and this plain list carries the same five entries, in the same
   order, so no information is lost on a small viewport. Pure CSS,
   no script. */
.chart-fallback { display:none; }
@media (max-width:700px) {
  .chart-wrap { display:none; }
  .chart-fallback { display:block; }
  .void-foot { display:none; }
}
.chart-fallback { max-width:var(--maxw); margin:0 auto; padding:28px var(--gutter) 8px; }
.chart-fallback li { padding:14px 0; border-top:1px solid var(--void-line-soft); }
.chart-fallback li:first-child { border-top:0; padding-top:0; }
.chart-fallback .cf-name { font-weight:700; font-size:13px; letter-spacing:.08em; text-transform:none; color:var(--field); display:block; margin-bottom:4px; }
.chart-fallback .cf-desc { font-size:13.5px; line-height:1.5; color:var(--void-dim); margin:0; }

/* ---- Section rhythm (shared by the five body sections). Tone
        alternates on the section itself (boxed within --maxw, the
        proven exemplar pattern), never full-bleed. ---- */
.section { padding:64px var(--gutter); max-width:var(--maxw); margin:0 auto; }
.section.tone-deep {
  background:var(--field-deep);
  border-top:1px solid var(--hairline);
  border-bottom:1px solid var(--hairline);
}
.section-copy { max-width:640px; }
.section h1, .section h2 { font-size:clamp(1.5rem, 1.6vw + 1.1rem, 2rem); margin:0 0 16px; }
.section p { font-size:15.5px; line-height:1.62; color:var(--ink-soft); }
.section p:last-child { margin-bottom:0; }
@media (max-width:600px) { .section { padding:48px var(--gutter); } }

.section-intro { max-width:640px; margin:0 0 8px; }

/* ---- 01 / The System: the five-layer register rows ---- */
.reg { border-top:1px solid var(--hairline-strong); margin-top:32px; }
.reg-row {
  display:grid; grid-template-columns:200px 1fr; gap:20px 24px; padding:22px 0;
  border-bottom:1px solid var(--hairline); align-items:baseline;
}
.reg-term { font-weight:700; font-size:14.5px; letter-spacing:.02em; }
.reg-def { font-size:14.5px; line-height:1.64; color:var(--ink-soft); margin:0; }
@media (max-width:640px) { .reg-row { grid-template-columns:1fr; gap:8px; } }

/* ---- 01 / The System: the catalog register (the chart's five
        entries, entered a second time as a table). ---- */
.cat-lead { max-width:640px; margin:40px 0 20px; }
.cat-scroll { overflow-x:auto; }
.cat-table { width:100%; border-collapse:collapse; border-top:1px solid var(--ink); }
.cat-table caption { text-align:left; caption-side:bottom; font-size:12px; color:var(--ink-faint); padding-top:14px; }
.cat-table th {
  text-align:left; font-size:10.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-faint); padding:12px 14px; border-bottom:1px solid var(--ink);
}
.cat-table td { padding:15px 14px; border-bottom:1px solid var(--hairline); font-size:14.5px; vertical-align:baseline; }
.cat-table tbody tr:nth-child(even) { background:var(--field-deep); }
.cat-reg { font-variant-numeric:tabular-nums; color:var(--ink-faint); white-space:nowrap; }
.cat-desig { font-weight:700; }
.cat-class { color:var(--ink-soft); }
.cat-status { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-soft); white-space:nowrap; }
.cat-status::before { content:"\2022  "; color:var(--ink); }
@media (max-width:620px) {
  .cat-table th:nth-child(3), .cat-table td:nth-child(3) { display:none; }
}

/* ---- 02 / The Method ---- */
.method-body { max-width:680px; }

/* ---- 03 / Born Here + 04 / The Lab + Who: prose + outbound links ---- */
.prose { max-width:680px; }
.prose p:last-child { margin-bottom:0; }
.outbound { font-weight:700; color:var(--ink); border-bottom:1.5px solid var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) { .outbound { transition:border-color .15s ease; } }
.outbound:hover { border-bottom-color:var(--ink); }

/* ---- Footer ---- */
.site-footer { border-top:1px solid var(--hairline); background:var(--field); }
.footer-top { max-width:var(--maxw); margin:0 auto; padding:40px var(--gutter) 28px; }
.footer-brand .name { font-weight:800; font-size:16px; letter-spacing:0.01em; }
.footer-brand p { font-size:13.5px; color:var(--ink-soft); max-width:440px; line-height:1.6; margin:10px 0 0; }
.footer-rule { border-top:1px solid var(--hairline); }
.footer-rule .wrap { padding:18px var(--gutter); display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:12px; color:var(--ink-faint); }

/* ---- 404 page ---- */
.notfound-copy { max-width:520px; color:var(--ink-soft); font-size:16px; line-height:1.6; margin:18px 0 30px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--font); font-weight:600; font-size:15px; line-height:1;
  border:1.5px solid var(--ink); border-radius:3px; cursor:pointer;
  padding:14px 24px; min-height:48px;
  color:var(--field); background:var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition:background-color .15s ease, color .15s ease, border-color .15s ease; }
}
.btn:hover { background:var(--ink-soft); border-color:var(--ink-soft); }
