/* FluxAstra design system v0 (2026-10-19): tokens + the one-screen "under construction" page.
   Fonts: Unbounded and Onest, SIL Open Font License, self-hosted. */

@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-800-latin.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/onest-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* Colour */
  --paper: #f6f6f4;
  --forest: #0d2a1c;
  --star: #f6e016;
  --night: #0b0f1a;

  /* Type */
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-text: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --size-text: 1rem;          /* 16px */
  --size-lead: 1.25rem;       /* 20px */
  --size-display: clamp(3.5rem, 12.5vw, 13rem);

  /* Space (4px base) */
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --margin: clamp(var(--space-6), 4vw, var(--space-12));
}

/* Theme: paper (chosen 2026-10-19). Star and night stay as palette tokens for later. */
:root { --bg: var(--paper); --fg: var(--forest); --accent: var(--forest); }

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

html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--margin);
  font-family: var(--font-text);
  font-size: var(--size-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  align-self: end;
  padding-bottom: var(--space-12);
}

.star {
  display: block;
  width: clamp(28px, 3vw, 44px);
  height: auto;
  margin-bottom: var(--space-8);
  fill: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--size-display);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
}

h1 span { display: inline-block; }

.status {
  margin: var(--space-6) 0 0;
  font-size: var(--size-lead);
  font-weight: 500;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  font-weight: 500;
}

footer nav { display: flex; gap: var(--space-6); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease;
}

a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

@media (max-width: 640px) {
  h1 { font-size: 21vw; }
  h1 span { display: block; }
  footer { flex-direction: column; }
}

/* Document pages (privacy, terms): readable column, normal scrolling. Added 2026-10-24. */
body.doc { display: block; min-height: 0; }
.doc main { align-self: auto; max-width: 68ch; padding: var(--space-8) 0 var(--space-12); }
.doc .home { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; margin-bottom: var(--space-12); }
.doc .home .star { width: 20px; margin: 0; }
.doc h1 { font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; margin-left: 0; }
.doc h2 { font-family: var(--font-text); font-size: var(--size-lead); font-weight: 700; margin: var(--space-8) 0 var(--space-2); }
.doc .note { margin: var(--space-6) 0 var(--space-8); padding: var(--space-4); border-left: 3px solid var(--fg); }
.doc p, .doc ul { margin: 0 0 var(--space-4); }
.doc li { margin-bottom: var(--space-2); }
.doc a { text-decoration-color: currentColor; }
.doc footer { border-top: 1px solid var(--fg); padding-top: var(--space-6); }
@media (max-width: 640px) { .doc h1 { font-size: 2.25rem; } }

/* Legal notice (/legal/): legal.py Markdown. The draft banner is its first blockquote. */
.legal h1 { margin: 0 0 var(--space-4); }
.legal blockquote { margin: 0 0 var(--space-8); padding: var(--space-4); background: var(--star); color: var(--forest); }
.legal blockquote p { margin: 0; }
.legal ul { padding-left: 1.25em; }
footer .langs { flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
footer .langs [aria-current] { font-weight: 700; text-decoration: none; }
