/* The Lightning Atlas — home and text pages. Same night-sky palette as the modules; no external fonts. */
:root {
  color-scheme: dark;
  --bg: #06090f;
  --bg-raised: #0b111a;
  --panel: #0e1621;
  --line: rgba(178, 198, 222, 0.14);
  --line-strong: rgba(178, 198, 222, 0.28);
  --text: #d5dde7;
  --bright: #f3f6fb;
  --muted: #8f9caa;
  --accent: #e0bb82;
  --accent-ink: #1b1305;
  --cool: #a9c4ea;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --gutter: clamp(18px, 4vw, 44px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  font-synthesis: none;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--cool); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--bright); }
:focus-visible { outline: 2px solid #bfd8ff; outline-offset: 3px; border-radius: 3px; }
.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 20; padding: 8px 12px; background: var(--bright); color: #06090f; }
.skip:focus { left: 8px; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.bolt { width: 1em; height: 1em; fill: var(--accent); flex: none; }

/* Header */
.site-header { position: absolute; z-index: 5; top: 0; left: 0; right: 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--bright); text-decoration: none; font: 500 19px/1 var(--serif); letter-spacing: 0.01em; }
.wordmark .bolt { font-size: 18px; }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 30px); }
.site-header nav a { color: var(--text); text-decoration: none; font-size: 14px; padding: 6px 2px; border-bottom: 1px solid transparent; }
.site-header nav a:hover { color: var(--bright); border-bottom-color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(11, 17, 28, 0.55);
  color: var(--bright);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: rgba(44, 59, 74, 0.7); border-color: rgba(178, 198, 222, 0.5); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ecca95; border-color: #ecca95; color: var(--accent-ink); }

/* Hero */
.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#0a101b 0%, #070b13 55%, #06090f 100%);
}
.hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, #06090f 0%, rgba(6, 9, 15, 0.82) 30%, rgba(6, 9, 15, 0) 62%); pointer-events: none; }
.hero-inner { position: relative; padding-block: 120px 96px; }
.hero h1 {
  margin-top: 18px;
  font: 400 clamp(44px, 7.4vw, 92px)/1.02 var(--serif);
  letter-spacing: -0.012em;
  color: var(--bright);
  text-wrap: balance;
}
.lead { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; color: var(--text); }
.hero .lead { margin-top: 24px; max-width: 34em; }
.actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { position: absolute; right: var(--gutter); bottom: 14px; font-size: 11px; letter-spacing: 0.08em; color: #5d6b7a; }

/* Sections */
.section-head { max-width: 44em; }
.section-head h2 { font: 400 clamp(28px, 3.4vw, 40px)/1.15 var(--serif); color: var(--bright); letter-spacing: -0.005em; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.atlas { padding-block: clamp(64px, 9vw, 112px) clamp(40px, 6vw, 72px); }

/* Regions */
.region {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
  gap: 24px clamp(24px, 4vw, 56px);
}
.region-head { align-self: start; position: sticky; top: 24px; }
.region-no { display: block; font: 400 15px/1 var(--serif); letter-spacing: 0.2em; color: var(--accent); }
.region-head h3 { margin-top: 12px; font: 400 25px/1.2 var(--serif); color: var(--bright); }
.region-head p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.region-body { display: grid; gap: 18px; min-width: 0; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.feature:hover { border-color: rgba(224, 187, 130, 0.55); background: #101a27; color: inherit; }
.feature figure { background: #04070c; min-height: 100%; }
.feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.feature-text { padding: clamp(20px, 2.6vw, 30px); display: flex; flex-direction: column; align-items: flex-start; }
.kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.feature h4 { margin-top: 10px; font: 400 clamp(22px, 2.2vw, 27px)/1.2 var(--serif); color: var(--bright); text-wrap: balance; }
.feature-text > p:not(.kicker) { margin-top: 12px; font-size: 15px; color: var(--text); }
.facts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.facts li { font-size: 12px; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; white-space: nowrap; }
.open { margin-top: auto; padding-top: 22px; font-size: 15px; font-weight: 500; color: var(--accent); }
.feature:hover .open span { display: inline-block; transform: translateX(3px); }

.planned { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.planned li { padding: 18px 20px 20px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.tag { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.planned h4 { margin-top: 8px; font: 400 19px/1.25 var(--serif); color: var(--text); }
.planned p { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* Classroom */
.classroom { margin-top: clamp(24px, 4vw, 48px); padding-block: clamp(56px, 8vw, 96px); background: var(--bg-raised); border-block: 1px solid var(--line); }
.uses { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px clamp(24px, 4vw, 48px); }
.uses li { padding-top: 16px; border-top: 1px solid var(--line-strong); }
.uses h3 { font: 400 20px/1.25 var(--serif); color: var(--bright); }
.uses p { margin-top: 8px; font-size: 15px; color: var(--text); }
.requirements { margin-top: 36px; max-width: 52em; font-size: 14px; color: var(--muted); }

/* Scope */
.scope { padding-block: clamp(56px, 8vw, 96px); }
.scope-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px clamp(24px, 4vw, 48px); max-width: 60em; }
.scope-grid p { font-size: 15px; }
.scope-grid strong { color: var(--bright); font-weight: 600; }
.scope-grid p:last-child { grid-column: 1 / -1; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 36px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer a { color: var(--text); }

/* Text pages */
.page { max-width: 820px; padding-block: 140px 80px; }
.page-head h1, .not-found h1 { margin-top: 14px; font: 400 clamp(36px, 5vw, 56px)/1.08 var(--serif); color: var(--bright); letter-spacing: -0.01em; text-wrap: balance; }
.page-head .lead, .not-found .lead { margin-top: 20px; }
.page section { margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line); }
.page h2 { font: 400 26px/1.2 var(--serif); color: var(--bright); }
.page section p, .page section ul, .page section dl { margin-top: 14px; }
.page section ul { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.page strong { color: var(--bright); font-weight: 600; }
.scope-list dt { margin-top: 18px; color: var(--bright); font-weight: 600; }
.scope-list dt:first-child { margin-top: 0; }
.scope-list dd { margin-top: 4px; }
.cite { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 6px; overflow-wrap: anywhere; }
.not-found { min-height: 70vh; }
.not-found .btn { margin-top: 30px; }

@media (max-width: 860px) {
  .region { grid-template-columns: minmax(0, 1fr); }
  .region-head { position: static; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature img { aspect-ratio: 16 / 9; }
}
@media (max-width: 720px) {
  .hero { align-items: flex-start; min-height: min(100svh, 760px); }
  .hero-inner { padding-block: 104px 300px; }
  .hero-scrim { background: linear-gradient(180deg, #06090f 0%, rgba(6, 9, 15, 0.9) 50%, rgba(6, 9, 15, 0) 68%); }
  .hero-note { left: var(--gutter); right: auto; }
}
@media (max-width: 420px) {
  .wordmark { font-size: 17px; }
  .site-header nav a { font-size: 13px; }
  .btn { padding: 11px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature { transition: none; }
}
