/* Galaxy Playground — portal landing page
   Design source: GAL-60 spec (Lyra) + Galaxy Brand & Design Guide v1.1.
   Tokens and measured contrast per spec §1/§9. Self-contained: no
   third-party requests, no tracking. */

:root {
  --ink: #0B2647;
  --ink-deep: #071A32;
  --surface-card: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.12);
  --text: #FFFFFF;
  --text-muted: #C9D6EA;
  --text-faint: #9FB2CC;
  --emerald: #10B981;
  --indigo: #4C6EF5;
  --violet: #7C3AED;
  --nebula: linear-gradient(135deg, #4C6EF5 0%, #7C3AED 100%);
  --focus: #10B981;
  --radius-card: 16px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --shadow: 0 16px 40px rgba(11, 38, 71, 0.14);
  --maxw: 1120px;
  --font: Manrope, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(720px 420px at 82% -10%, rgba(76, 110, 245, 0.28), transparent 60%),
    radial-gradient(620px 360px at 6% -4%, rgba(255, 255, 255, 0.06), transparent 58%),
    var(--ink);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; }

img { max-width: 100%; height: auto; }

/* Visible keyboard focus everywhere; 2px Emerald, 2px offset (spec §1). */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--emerald);
  color: #06281C;
  font-weight: 700;
  border-radius: 0 0 var(--radius-control) 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 38, 71, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 72px;
  padding: 12px 0;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand img { width: 108px; height: auto; display: block; }
.site-nav { display: flex; gap: 8px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-control);
}
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero-inner { max-width: 720px; }
.rule {
  display: block;
  width: 64px;
  height: 2px;
  margin: 0 0 24px;
  background: var(--emerald);
  border-radius: 1px;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(2.25rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.accent { color: var(--emerald); }
.lede {
  margin: 0 0 32px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.55;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--emerald); color: #06281C; }
.btn-primary:hover { background: #34D399; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.32); }
.micro { margin: 0; color: var(--text-faint); font-size: 13px; line-height: 1.4; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: rgba(7, 26, 50, 0.55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.section-lede {
  margin: 0 0 24px;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}
.section-lede:last-child { margin-bottom: 0; }

/* Portals */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.card:hover { border-color: rgba(255, 255, 255, 0.24); }
.medallion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-control);
  background: rgba(76, 110, 245, 0.16);
  border: 1px solid rgba(76, 110, 245, 0.34);
  color: var(--text);
}
.card h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}
.blurb { margin: 0; color: var(--text-muted); font-size: 16px; line-height: 1.55; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}
.chip-live { border-color: rgba(16, 185, 129, 0.4); color: var(--text); }
.chip-live .dot { background: var(--emerald); }
/* Live portal card: one accessible link, one tab stop (spec §4). */
.card-link { text-decoration: none; }
.card-link:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.card-link:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.card-link .cta { margin-top: 4px; color: var(--emerald); font-size: 15px; font-weight: 600; }
.card-link .medallion { color: var(--emerald); background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.36); }

/* About */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.pill svg { color: var(--emerald); flex: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-faint);
  font-size: 14px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.footer-brand img { display: block; }
.footer-copy { margin-left: auto; }

/* Responsive: 3-up >=1000, 2-up 640–999, 1-up <640 (spec §8). */
@media (min-width: 640px) {
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
  .footer-copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  .btn:hover, .card-link:hover { transform: none; }
}

/* Windows High Contrast / forced colours: keep text and controls visible. */
@media (forced-colors: active) {
  .accent { color: CanvasText; }
  .btn, .chip, .pill, .card { border-color: CanvasText; }
}
