/* AI Software Development: shared design tokens and base styles.
   Every colour, radius and spacing value comes from BRIEF.md section 4 ("Tokens"). */
:root {
  --bg: #030C14;
  --sidebar: #06131F;
  --panel: #071B29;
  --raised: #0B2334;
  --border: #173B51;
  --outline-active: #267398;
  --cyan: #34C8F4;
  --highlight: #82E6FF;
  --blue: #1588D0;
  --text: #F3F8FC;
  --text-2: #ACC2D3;
  --muted: #7F9CAE;
  --success: #36C894;
  --warning: #DDB856;
  --danger: #E9787E;

  --r-sm: 7px;
  --r-md: 9px;
  --r-lg: 11px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px;

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --glow: 0 0 24px rgba(52, 200, 244, 0.35);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--highlight);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--highlight); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

.skip-link {
  position: absolute; left: var(--s4); top: -60px; z-index: 100;
  background: var(--cyan); color: var(--bg); padding: var(--s3) var(--s4);
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s4); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 22px; height: 22px; }

.mono, .eyebrow { font-family: var(--font-mono); }
.eyebrow {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2);
  display: flex; flex-wrap: wrap; gap: 0 10px; align-items: center;
}
.eyebrow .sep { color: var(--cyan); }

/* ---- Brand ---- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-height: 44px; }
.brand__mark { width: 40px; height: 40px; color: var(--cyan); filter: drop-shadow(0 0 8px rgba(52, 200, 244, 0.55)); }
.brand__name { font-family: var(--font-head); font-weight: 500; font-size: 19px; letter-spacing: -0.005em; line-height: 1.15; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 22px; border-radius: var(--r-md);
  font-family: var(--font-body); font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn--primary { background: var(--cyan); color: #02121D; box-shadow: 0 0 22px rgba(52, 200, 244, 0.35); }
.btn--primary:hover { background: var(--highlight); }
.btn--primary:focus-visible { box-shadow: var(--focus), 0 0 22px rgba(52, 200, 244, 0.35); } /* the glow above would otherwise replace the focus ring */
.btn--ghost { background: rgba(3, 12, 20, 0.55); color: var(--text); border-color: rgba(243, 248, 252, 0.7); }
.btn--ghost:hover { border-color: var(--highlight); color: var(--highlight); }
.btn--outline { background: rgba(3, 12, 20, 0.4); color: var(--text); border-color: var(--cyan); }
.btn--outline:hover { background: rgba(52, 200, 244, 0.12); }
.btn--small { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* ---- Art layers: a real image when it exists, a drawn fallback underneath when it does not ---- */
.art { position: relative; overflow: hidden; background: var(--panel); }
.art > picture, .art > .art__img { position: absolute; inset: 0; }
.art picture img, .art .art__img { width: 100%; height: 100%; object-fit: cover; }
.art.is-missing picture, .art.is-missing .art__img { display: none; }
.art__fallback { position: absolute; inset: 0; }
.art.has-art .art__fallback { display: none; }

/* Star field + Earth curve, drawn with gradients so nothing ever looks broken without artwork. */
.space-fallback {
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 42%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 12%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 30%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 9%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 24%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 46%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 6%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 52%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 60%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(ellipse 120% 90% at 70% 120%, #0B3A66 0%, #082848 35%, rgba(4,20,38,0) 62%),
    radial-gradient(ellipse 80% 70% at 85% 0%, rgba(21,136,208,.18), transparent 60%),
    linear-gradient(180deg, #020912 0%, #04121F 60%, #061A2B 100%);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
