/* Protostar site — implemented from "Protostar Site v3" (Claude Design handoff). */

:root {
  --bg: #0b0815;
  --bg-deep: #08060f;
  --panel: #0d0a18;
  --code-bg: #0e0b19;
  --text: #b4b0cc;
  --text-strong: #eef2ff;
  --heading: #f3f5ff;
  --lede: #e6ecff;
  --muted: #a9a3c6;
  --dim: #8d88a8;
  --violet: #8a63d1;
  --lavender: #c9b6ff;
  --peach: #ffdbb3;
  --peach-hover: #fff0de;
  --ink: #170f22;
  --line: #1d1730;
  --line-2: #221b38;
  --line-3: #2a2244;
  --line-btn: #3a3058;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html, body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a { color: var(--lavender); text-decoration: none; }
a:hover { color: var(--peach); }
::selection { background: var(--violet); color: #fff; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; }

code { font-family: var(--mono); color: var(--lede); font-size: 15px; }

/* Full-screen shader used for the page transition */
#fx {
  position: fixed; inset: 0; width: 100vw; height: 100vh; display: block;
  pointer-events: none; z-index: 100; opacity: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 7, 17, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; color: var(--text-strong);
}
.brand img { width: 34px; height: 34px; display: block; }
.brand span { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav-link {
  background: none; border: 0; padding: 8px 12px; border-radius: 8px;
  font-size: 15px; color: var(--text);
}
.nav-link:hover { color: var(--text-strong); background: #16112a; }
.nav-cta {
  margin-left: 8px; padding: 8px 16px; border-radius: 999px; border: 0;
  background: var(--peach); color: var(--ink); font-weight: 600; font-size: 14px;
}
.nav-cta:hover { background: var(--peach-hover); }

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--lavender);
}
.eyebrow.muted { color: var(--dim); }
.h2 {
  margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.06;
  letter-spacing: -0.03em; font-weight: 600; color: var(--heading); text-wrap: balance;
}
.body-lg { margin: 0; font-size: 17px; text-wrap: pretty; }
.pretty { text-wrap: pretty; }

.btn-primary {
  padding: 14px 24px; border-radius: 999px; border: 0;
  background: var(--peach); color: var(--ink); font-weight: 600; font-size: 16px;
  box-shadow: 0 0 40px rgba(255, 200, 150, 0.28);
  display: inline-block;
}
.btn-primary:hover { background: var(--peach-hover); color: var(--ink); }
.btn-ghost {
  padding: 14px 24px; border-radius: 999px; border: 1px solid var(--line-btn);
  background: rgba(14, 10, 27, 0.6); color: var(--text-strong);
  font-weight: 500; font-size: 16px; transition: border-color .2s;
}
.btn-ghost:hover { border-color: var(--violet); }

.frame {
  border-radius: 12px; border: 1px solid var(--line-3); overflow: hidden;
  background: var(--panel); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.frame > img { width: 100%; height: auto; display: block; }

/* ---------- Home: hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-deep); }
.hero canvas, .dl-hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.hero-grid {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 40px 24px 160px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px; min-height: 620px; align-items: center;
}
.hero-spacer { min-height: 240px; }
.hero-copy {
  display: flex; flex-direction: column; gap: 22px; max-width: 520px;
  text-shadow: 0 2px 24px rgba(8, 6, 15, 0.8);
}
.hero-copy h1 {
  margin: 0; font-size: clamp(56px, 9vw, 104px); line-height: 0.95;
  letter-spacing: -0.04em; font-weight: 600; color: var(--heading);
}
.hero-lede {
  margin: 0; font-size: clamp(19px, 2vw, 22px); line-height: 1.4;
  color: var(--lede); text-wrap: pretty;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.hero-shot { max-width: 1240px; margin: -120px auto 0; padding: 0 24px; position: relative; }
.hero-shot .frame { box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(138, 99, 209, 0.15); }

/* ---------- Home: steps ---------- */
.steps {
  max-width: 1200px; margin: 0 auto; padding: 120px 24px 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px;
}
.step { display: flex; flex-direction: column; gap: 10px; }
.step-n { font-family: var(--mono); font-size: 14px; color: var(--peach); }
.step h3 { margin: 0; font-size: 22px; font-weight: 600; color: var(--text-strong); }
.step p { margin: 0; text-wrap: pretty; }
.step code { font-size: 14px; }

/* ---------- Home: presets ---------- */
.presets {
  max-width: 1200px; margin: 0 auto; padding: 100px 24px 56px;
  display: flex; flex-direction: column; gap: 40px;
}
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.preset-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 32px 24px;
}
.preset { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.preset .frame { aspect-ratio: 4 / 3; }
.preset .frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: 100% 60%; display: block;
  transition: transform .8s var(--ease);
}
.preset .frame img:hover { transform: scale(1.04); }
.preset figcaption { display: flex; flex-direction: column; gap: 2px; }
.preset figcaption strong { color: var(--text-strong); font-weight: 600; font-size: 17px; }
.preset figcaption span { font-size: 15px; }

/* ---------- Home: split feature rows ---------- */
.split {
  max-width: 1200px; margin: 0 auto; padding: 56px 24px;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
}
.split.reverse { flex-direction: row-reverse; }
.split-copy {
  flex: 1 1 320px; min-width: 0; max-width: 440px;
  display: flex; flex-direction: column; gap: 16px;
}
.split > .frame { flex: 1.6 1 480px; min-width: 0; }

/* ---------- Home: toolkit ---------- */
.toolkit {
  max-width: 1200px; margin: 0 auto; padding: 80px 24px 40px;
  display: flex; flex-direction: column; gap: 40px;
}
.toolkit-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 32px;
}
.tool { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.tool h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--text-strong); }
.tool p { margin: 0; font-size: 15px; text-wrap: pretty; }

/* ---------- Home: custom nodes ---------- */
.extend {
  max-width: 1200px; margin: 0 auto; padding: 100px 24px 40px;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
}
.extend-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.code-block {
  flex: 1.3 1 440px; min-width: 0; margin: 0; padding: 24px 26px;
  background: var(--code-bg); border: 1px solid #241d3a; border-radius: 12px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #d7dcf5; overflow-x: auto;
}
.code-block .c { color: #8f86b5; }
.code-block .k { color: #8fa8ff; }
.code-block .f { color: var(--peach); }
.code-block .n { color: #d4b8ff; }

/* ---------- Home: get CTA ---------- */
.get { max-width: 1200px; margin: 0 auto; padding: 120px 24px; }
.get-card {
  border-radius: 20px; border: 1px solid var(--line-3);
  background: radial-gradient(ellipse at 50% 0%, #1a1233 0%, var(--panel) 70%);
  padding: 64px 32px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 20px;
}
.get-card img { width: 128px; height: 128px; display: block; }
.get-card .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.get-card .btn-primary { box-shadow: 0 0 40px rgba(255, 200, 150, 0.25); }

/* ---------- Download page ---------- */
.dl-hero { position: relative; overflow: hidden; background: var(--bg-deep); }
.dl-hero-inner {
  position: relative; max-width: 760px; margin: 0 auto; padding: 300px 24px 80px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
  text-shadow: 0 2px 20px rgba(8, 6, 15, 0.85);
}
.dl-hero-inner h1 {
  margin: 0; font-size: clamp(44px, 6vw, 72px); line-height: 1;
  letter-spacing: -0.035em; font-weight: 600; color: var(--heading);
}
.dl-hero-inner .btn-primary {
  margin-top: 8px; padding: 15px 30px; text-shadow: none;
  box-shadow: 0 0 44px rgba(255, 200, 150, 0.32); transition: background .2s;
}

.builds { max-width: 760px; margin: 0 auto; padding: 64px 24px 0; display: flex; flex-direction: column; gap: 16px; }
.build-list { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--panel); }
.build { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; }
.build + .build { border-top: 1px solid var(--line); }
.build-info { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.build-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.build-title strong { color: var(--text-strong); font-weight: 600; font-size: 17px; }
.build-title span { font-size: 15px; color: var(--muted); }
.build-title .badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--peach); padding: 3px 8px; border-radius: 999px;
}
.build-file { font-family: var(--mono); font-size: 12.5px; color: var(--dim); word-break: break-all; }
.btn-outline {
  flex: none; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-btn);
  color: var(--text-strong); font-weight: 500; font-size: 14.5px;
  transition: border-color .2s, color .2s;
}
.btn-outline:hover { border-color: var(--peach); color: var(--peach); }
.build .soon {
  flex: none; padding: 9px 18px; border-radius: 999px; border: 1px dashed var(--line-btn);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
}
.build-note + .build-note { margin-top: 8px; }
.build-note { margin: 16px 0 0;font-size: 14px; color: var(--dim); text-wrap: pretty; }
.build-note strong { color: var(--muted); font-weight: 600; }
.btn-primary.is-soon, .btn-primary.is-soon:hover {
  background: rgba(14, 10, 27, 0.6); color: var(--muted); border: 1px solid var(--line-btn);
  box-shadow: none; cursor: default;
}

.older-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; }

.before { max-width: 760px; margin: 0 auto; padding: 56px 24px 120px; display: flex; flex-direction: column; gap: 28px; }
.before-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.before-grid > div { display: flex; flex-direction: column; gap: 8px; }
.before-grid h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text-strong); }
.before-grid p { margin: 0; font-size: 15px; text-wrap: pretty; }
.fine-print {
  margin: 0; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--dim); text-wrap: pretty;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.site-footer .inner {
  max-width: 1200px; margin: 0 auto; padding: 40px 24px;
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.site-footer .who { display: flex; flex-direction: column; gap: 4px; }
.site-footer .who strong { color: var(--text-strong); font-weight: 600; }
.site-footer .who span { font-size: 13.5px; color: var(--dim); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14.5px; }
.footer-links button {
  background: none; border: 0; padding: 0; font-size: 14.5px; color: var(--lavender);
}
.footer-links button:hover { color: var(--peach); }

/* ---------- Scroll reveal (armed by JS only) ---------- */
.js [data-reveal] { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal]:not(.is-revealed) { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal]:not(.is-revealed) { opacity: 1; transform: none; }
  .preset .frame img:hover { transform: none; }
}
