/* Brand type system — self-hosted variable fonts. See memory/brand-palette.md
   Space Grotesk = display (wordmark, headings); Hanken Grotesk = body/UI. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
}

:root {
  /* Spaceman Factory brand palette: navy + single rust accent. See memory/brand-palette.md */
  --bg: #14213d;
  --panel: #1d2e52;
  --text: #ffffff;
  --muted: #aeb6c7;
  --line: #2a3a5c;
  --accent: #df6b40;   /* 4.80:1 on --bg. Was #d65a31 at 4.08:1, which failed WCAG AA for small text (both CTAs). */
  --accent-text: #e8875c; /* Small accent TEXT on --panel surfaces, where
                          --accent drops to 4.14:1. This is 5.28:1. */
  --accent-2: #4ad6a8;
  --blueprint: #9fb3d1;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.6 "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  background:
    radial-gradient(1100px 640px at 84% -12%, rgba(214,90,49,.15), transparent 60%),
    radial-gradient(760px 520px at 0% 108%, rgba(0,0,0,.32), transparent 55%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Blueprint background treatment --- */
/* Faint graph-paper grid (minor 30px + major 150px lines) behind everything. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(159,179,209,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,179,209,.05) 1px, transparent 1px),
    linear-gradient(rgba(159,179,209,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,179,209,.09) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px, 150px 150px, 150px 150px;
}
/* Technical "drawing" motifs — orbits, gear callout, dimension line. */
.blueprint { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; color: var(--blueprint); }
.blueprint svg { position: absolute; fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.blueprint text { fill: currentColor; stroke: none; font: 9px "Space Grotesk", monospace; letter-spacing: .12em; }
.blueprint .bp-tl  { top: 88px;  left: 34px;  width: 190px; height: 190px; opacity: .45; }
.blueprint .bp-br  { right: 40px; bottom: 76px; width: 232px; height: 232px; opacity: .40; }
@media (max-width: 760px) { .blueprint .bp-br, .blueprint .bp-dim { display: none; } }

/* Keep page content above the blueprint layers. */
.topbar, .hero, .foot { position: relative; z-index: 1; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; width: auto; display: block; }

/* Display type: headings + actions use Space Grotesk; body stays Hanken. */
h1, .login-btn, .btn { font-family: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif; }
.login-btn {
  color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; white-space: nowrap;
}
.login-btn:hover { background: var(--panel); border-color: var(--accent); color: var(--accent-text); }

.hero { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 26px; }
.hero-inner { max-width: 720px; text-align: center; }
.hero-mark { width: clamp(104px, 15vw, 150px); height: auto; display: block; margin: 0 auto 28px; }
.hero h1 {
  font-size: clamp(30px, 6vw, 52px); line-height: 1.1; margin: 0 0 20px; font-weight: 800;
  letter-spacing: -.5px;
}
.lede { font-size: clamp(16px, 2.5vw, 20px); color: var(--muted); margin: 0 auto 32px; max-width: 600px; text-wrap: pretty; }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 16px;
  border-radius: 10px; padding: 13px 26px; transition: filter .15s, background .15s;
}
.btn.primary { background: var(--accent); color: #14213D; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.portal-note { margin-top: 30px; font-size: 14px; color: var(--muted); }
.portal-note a { color: var(--accent); text-decoration: none; }
.portal-note a:hover { text-decoration: underline; }

.foot {
  display: flex; align-items: center; justify-content: space-between;
  /* Wraps because the footer now carries three items (copyright, legal links,
     admin). Without this they overflow the viewport below ~360px. */
  flex-wrap: wrap; gap: 8px 18px;
  padding: 18px 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* Footer legal links. Required to be reachable from the site root for A2P/10DLC
   carrier review, so they sit between the copyright and the admin link. */
.foot-legal { display: flex; align-items: center; }
.foot-legal .sep { color: rgba(174,182,199,.45); padding: 0 8px; }

/* Deliberately dark-only. A light theme lived here and was broken: the header
   logo is the reversed (white) lockup, so on a white background it vanished,
   and the blueprint colour went with it. Dark is also the right call --
   portal.spacemanfactory.com is dark, and this page exists to hand off to it,
   so a light gateway would make that transition jarring. If a light theme is
   ever wanted, it needs a non-reversed lockup swapped in and its own
   blueprint colour, not just inverted tokens. */

/* Footer admin link. Deliberately the quietest interactive element on the page:
   it serves one person and must not compete with the client CTAs. */
.foot-admin { letter-spacing: .04em; }
.foot-admin:hover { color: var(--accent); }
