:root {
  --space: #07101d;
  --space-2: #0b1828;
  --panel: rgba(16, 35, 55, 0.82);
  --line: rgba(153, 196, 218, 0.2);
  --ink: #f5f8fb;
  --muted: #9eb0bf;
  --cyan: #6fffe9;
  --blue: #67a8ff;
  --green: #59f18b;
  --amber: #ffd166;
  --red: #ff6477;
  --violet: #b58cff;
  --max: 1180px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 8%, rgba(103, 168, 255, .14), transparent 32rem),
    radial-gradient(circle at 82% 28%, rgba(111, 255, 233, .08), transparent 30rem),
    var(--space);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .33;
  background-image:
    linear-gradient(rgba(140, 190, 220, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 220, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 29, .88);
  backdrop-filter: blur(18px);
}

.wordmark { display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-decoration: none; }
.wordmark i { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a { color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.site-header nav a:hover { color: var(--cyan); }

main { overflow: hidden; }
.hero, .section, footer { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.hero { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(52px, 7vw, 100px); padding: 86px 0; }
.eyebrow { margin: 0 0 14px; color: var(--cyan); font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 12ch; margin-bottom: 24px; font-size: clamp(52px, 6.5vw, 92px); line-height: .98; letter-spacing: -.065em; }
h1 span { color: var(--cyan); }
.hero-lede { max-width: 620px; margin-bottom: 30px; color: var(--muted); font-size: clamp(18px, 1.6vw, 22px); }
.hero-actions, .about-links { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 0 21px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 800; text-decoration: none; }
.button.primary { color: var(--space); border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 28px rgba(111, 255, 233, .17); }
.button.secondary { background: rgba(255,255,255,.035); }
.button:hover { transform: translateY(-2px); }
.quick-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 38px 0 0; padding: 0; list-style: none; }
.quick-facts li { display: flex; flex-direction: column; gap: 3px; padding-top: 14px; border-top: 1px solid var(--line); }
.quick-facts strong { font-size: 13px; }
.quick-facts span { color: var(--muted); font-size: 11px; }

.hero-visual { min-height: 530px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 17px; border: 1px solid var(--line); border-radius: 36px; background: radial-gradient(circle at 50% 40%, rgba(103,168,255,.16), transparent 55%), rgba(11,24,40,.66); box-shadow: 0 32px 100px rgba(0,0,0,.32); }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; border: 1px solid rgba(111,255,233,.17); border-radius: 50%; }
.hero-visual::before { width: 310px; height: 310px; }
.hero-visual::after { width: 390px; height: 390px; border-style: dashed; }
.message, .repair, .channel { position: relative; z-index: 1; }
.message { min-width: 270px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(7,16,29,.92); }
.message small { color: var(--muted); font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.message code { font: 900 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.message.damaged code { color: var(--muted); }
.message.damaged em { color: var(--red); font-style: normal; }
.message.recovered { border-color: rgba(89,241,139,.42); }
.message.recovered code { color: var(--green); }
.channel { display: flex; align-items: center; gap: 9px; color: var(--red); }
.channel span { width: 24px; height: 2px; background: var(--muted); }
.channel b { font-size: 20px; }
.repair { padding: 7px 12px; border-radius: 999px; color: var(--violet); background: rgba(181,140,255,.11); font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

.section { padding: 100px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { max-width: 720px; margin-bottom: 42px; }
.section-heading h2, .about h2 { margin-bottom: 12px; font-size: clamp(36px, 4vw, 58px); line-height: 1.05; letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--muted); font-size: 18px; }
.feature-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.feature-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; min-height: 260px; padding: 31px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.feature-card.featured { background: radial-gradient(circle at 90% 0, rgba(111,255,233,.11), transparent 50%), var(--panel); }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: var(--space); background: var(--cyan); font-size: 22px; font-weight: 900; }
.card-kicker { margin-bottom: 7px; color: var(--cyan); font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
.feature-card h3, .worksheet-card h3 { margin-bottom: 10px; font-size: 23px; line-height: 1.15; }
.feature-card p, .worksheet-card p { color: var(--muted); }
.feature-card a, .worksheet-card a { color: var(--cyan); font-weight: 800; text-underline-offset: 4px; }

.worksheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.worksheet-card { min-height: 285px; display: flex; flex-direction: column; align-items: flex-start; padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.worksheet-card:hover, .reading-list a:hover { border-color: rgba(111,255,233,.5); transform: translateY(-3px); }
.sheet-number { margin-bottom: 35px; color: var(--amber); font: 900 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.worksheet-card p { flex: 1; font-size: 14px; }

.reading-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.reading-list a { display: flex; flex-direction: column; min-height: 160px; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: rgba(16,35,55,.62); text-decoration: none; transition: .2s ease; }
.reading-list span { margin-bottom: 18px; color: var(--cyan); font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; }
.reading-list strong { max-width: 40ch; font-size: 18px; }
.reading-list small { margin-top: auto; padding-top: 11px; color: var(--muted); }

.about { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 52px; }
.about-mark { width: 180px; height: 180px; display: grid; place-items: center; border: 1px solid rgba(111,255,233,.4); border-radius: 50%; color: var(--cyan); background: radial-gradient(circle, rgba(111,255,233,.11), transparent 65%); font-size: 54px; font-weight: 900; letter-spacing: -.06em; }
.about > div:last-child { max-width: 760px; }
.about > div:last-child > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.about-links a { color: var(--cyan); font-weight: 750; text-underline-offset: 4px; }

footer { min-height: 95px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer a { color: var(--cyan); }
.feature-card, .worksheet-card, .reading-list a, .button { transition: border-color .2s ease, transform .2s ease, background .2s ease; }

@media (max-width: 900px) {
  .site-header nav a:not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hero-visual { min-height: 470px; }
  .feature-grid, .reading-list { grid-template-columns: 1fr; }
  .worksheet-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hero, .section, footer { width: min(100% - 30px, var(--max)); }
  .site-header { padding-inline: 15px; }
  .wordmark { font-size: 10px; }
  .site-header nav { gap: 10px; }
  h1 { font-size: clamp(46px, 15vw, 68px); }
  .hero { min-height: auto; gap: 58px; padding: 64px 0 80px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .quick-facts { grid-template-columns: 1fr; }
  .hero-visual { min-height: 430px; border-radius: 24px; }
  .hero-visual::before { width: 250px; height: 250px; }
  .hero-visual::after { width: 300px; height: 300px; }
  .message { min-width: min(270px, calc(100% - 38px)); }
  .section { padding: 76px 0; }
  .feature-card { grid-template-columns: 1fr; }
  .worksheet-grid { grid-template-columns: 1fr; }
  .worksheet-card { min-height: 240px; }
  .about { grid-template-columns: 1fr; gap: 30px; }
  .about-mark { width: 120px; height: 120px; font-size: 40px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
