/* Starmole landing page
   Palette and type are taken from the logo. Change tokens here, not inline. */

/* Self-hosted, latin subset, variable weights (SIL Open Font License). */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 600 900; font-display: swap;
  src: url(assets/fonts/fraunces.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 700 900; font-display: swap;
  src: url(assets/fonts/fraunces-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(assets/fonts/space-grotesk.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/jetbrains-mono.woff2) format('woff2');
}

:root {
  --teal: #0F3D44;        /* primary ink + dark sections */
  --teal-deep: #0A2C31;   /* code panels */
  --cream: #F6EBD2;       /* page ground + text on dark */
  --paper: #FFFBF1;       /* cards on cream */
  --accent: #EE6F1F;      /* rocket orange: fills, rules, decor */
  --accent-ink: #A8410E;  /* orange that passes 4.5:1 on cream, for text */
  --on-accent: #071B1F;   /* text on orange fills (passes 4.5:1) */
  --muted: #3D5A5E;       /* secondary text on cream */
  --mint: #9FD8CF;        /* string literals in code */
  --cream-86: rgba(246, 235, 210, .86);
  --cream-65: rgba(246, 235, 210, .65);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1200px;
  --gutter: 40px;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--teal);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--teal); }
a:hover { color: var(--accent-ink); }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
p code, li code {
  font-family: var(--font-mono); font-size: .88em;
  background: rgba(15, 61, 68, .08); padding: 1px 6px; border-radius: 5px;
}
.dark p code, .use-featured p code { background: rgba(246, 235, 210, .14); }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 18px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-family: inherit; font-size: 16px;
  cursor: pointer;
}
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border: 2px solid transparent; }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.06); }
.btn-outlined { border-color: var(--teal); }
.btn-ghost { color: var(--cream); border: 2px solid rgba(246, 235, 210, .5); font-weight: 600; }
.btn-ghost:hover { color: #fff; border-color: var(--cream); }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 3px solid var(--teal); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-block: 14px;
}
.nav-logo img { height: 56px; width: auto; }
.nav-links { display: flex; gap: 32px; font-weight: 500; }
.nav-links a { text-decoration: none; }

/* ---------- Dark sections ---------- */
.dark {
  background-color: var(--teal);
  background-image: radial-gradient(rgba(246, 235, 210, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--cream);
}
.dark a { color: var(--cream); }
.dark a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 64px;
  padding-block: 96px 112px;
}
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-visual { flex: 1 1 440px; min-width: 0; }

.pill {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 10px;
  padding: 8px 16px; border: 1.5px solid rgba(246, 235, 210, .4); border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.star { fill: var(--accent); }

.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(46px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; font-weight: 900; color: var(--accent); }
.lead { font-size: 20px; line-height: 1.55; max-width: 540px; color: var(--cream-86); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.swoosh { display: block; width: 100%; height: 56px; }
.swoosh .fill { fill: var(--cream); }
.swoosh .line { fill: none; stroke: var(--accent); stroke-width: 8; }

/* ---------- Terminal / code panels ---------- */
.panel {
  background: var(--teal-deep); color: var(--cream);
  border: 2px solid rgba(246, 235, 210, .22); border-radius: 18px; overflow: hidden;
}
.panel-shadow-right { box-shadow: 12px 12px 0 var(--accent); }
.panel-shadow-left { box-shadow: -12px 12px 0 var(--teal); border-color: var(--teal); }
.panel-bar {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px;
  border-bottom: 1px solid rgba(246, 235, 210, .14);
  font-family: var(--font-mono); font-size: 13px; color: rgba(246, 235, 210, .7);
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(246, 235, 210, .25); }
.panel-title { margin-left: 10px; }
.panel pre {
  margin: 0; padding: 24px 22px 28px; font-family: var(--font-mono);
  font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; overflow-x: auto;
}
.panel pre.code { font-size: 14px; white-space: pre; }
.t-dim { color: var(--cream-65); }
.t-ok, .t-kw { color: var(--accent); }
.t-str { color: var(--mint); }
.cursor {
  display: inline-block; width: 9px; height: 18px; background: var(--cream); vertical-align: -3px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- Section headings ---------- */
.section { padding-block: 96px; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: 56px; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.h2 {
  font-family: var(--font-display); font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.015em;
}
.h2 em { font-style: italic; }
.section-lead { font-size: 19px; line-height: 1.6; color: var(--muted); }

/* ---------- Pillars ---------- */
.pillars { padding-block: 88px 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.card {
  background: var(--paper); border: 2px solid var(--teal); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.card h3 { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1.15; }
.card p { font-size: 17px; line-height: 1.6; color: var(--muted); }
.icon-badge {
  width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Diagram ---------- */
.diagram {
  background: var(--teal); color: var(--cream); border-radius: 24px;
  padding: 48px 40px; display: flex; flex-direction: column; align-items: center; gap: 28px;
  margin-bottom: 56px;
}
.relay {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 24px; border: 2px dashed rgba(246, 235, 210, .45); border-radius: 14px;
  font-family: var(--font-mono); font-size: 14px;
}
.relay strong { font-weight: 600; }
.relay span { color: rgba(246, 235, 210, .7); }
.diagram-row { display: flex; align-items: center; justify-content: center; width: 100%; flex-wrap: wrap; gap: 20px; }
.node {
  flex: 0 1 260px; background: var(--cream); color: var(--teal); border-radius: 16px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 6px;
}
.node-tag { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.node-name { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.node-id { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.link { flex: 1 1 200px; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.link-label { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent); }
.link-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--accent); }
.link-note { font-size: 13px; color: rgba(246, 235, 210, .7); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--teal); padding-top: 20px; }
.step-num { font-family: var(--font-display); font-style: italic; font-size: 40px; font-weight: 900; color: var(--accent-ink); line-height: 1; }
.steps h3 { font-size: 21px; font-weight: 700; }
.steps p { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Use cases ---------- */
.band { background: var(--paper); border-block: 3px solid var(--teal); }
.use {
  border-radius: var(--radius); background: var(--cream); border: 2px solid var(--teal);
  padding: 36px 32px; display: flex; flex-direction: column; gap: 14px;
}
.use h3 { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1.15; }
.use p { font-size: 17px; line-height: 1.6; color: var(--muted); }
.use-featured { background: var(--teal); color: var(--cream); border-color: var(--teal); }
.use-featured p { color: var(--cream-86); }
.tag {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--teal);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.use-featured .tag { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- Library ---------- */
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split-copy { display: flex; flex-direction: column; gap: 18px; }
.checks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex: none; margin-top: 2px; }
.stack { display: flex; flex-direction: column; gap: 32px; }

/* ---------- Install CTA ---------- */
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; padding-block: 96px; }
.cta .h2 { font-size: clamp(38px, 5vw, 60px); max-width: 820px; }
.cta .h2 em { color: var(--accent); }
.cta .lead { max-width: 600px; }
.install {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; max-width: 100%;
  background: var(--teal-deep); border: 2px solid rgba(246, 235, 210, .25); border-radius: 14px;
  padding: 10px 10px 10px 22px;
}
.install code { font-family: var(--font-mono); font-size: 16px; overflow-x: auto; }
.install .btn { border-radius: 10px; padding: 0 18px; font-size: 15px; border: 0; }
.cta-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; font-weight: 600; }
.cta-links a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Poster + footer ---------- */
.poster { padding-block: 72px 40px; }
.poster img { width: 100%; height: auto; border-radius: var(--radius); border: 3px solid var(--teal); }
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
  padding-block: 32px 56px; font-size: 15px; color: var(--muted);
}
.footer-mark { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 20px; color: var(--teal); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav-links { display: none; }
  .hero-inner { padding-block: 64px 80px; }
  .section { padding-block: 72px; }
  .diagram { padding: 32px 20px; }
  .panel pre { font-size: 12px; padding: 18px 16px 22px; }
}
