/* ============================================================
   RoyaScaff — landing page
   Palette is the engine's own status system:
   slate = drafted · amber = in-progress · teal = verified
   blue = merged · rust = blocked
   ============================================================ */

:root {
  --ink-950: #070E18;
  --ink-900: #0A1420;
  --ink-850: #0E1A2B;
  --ink-800: #122238;
  --ink-700: #172B44;

  --paper: #EDF1F7;
  --paper-2: #E1E8F2;
  --paper-ink: #101C2C;

  --blue: #2B5FD9;
  --blue-soft: #6E9BFF;
  --amber: #F0B429;
  --teal: #12A594;
  --slate: #6B7B8F;
  --rust: #C2542D;

  --fg: #E8EEF7;
  --fg-dim: #A9BBD1;
  --fg-mute: #7A8CA5;
  --line: rgba(126, 165, 214, 0.16);
  --line-strong: rgba(126, 165, 214, 0.30);

  --display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --body: "Inter Tight", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --r: 14px;
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: -0.01em; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--blue); color: #fff; padding: 10px 16px;
  border-radius: 8px; font: 500 14px/1 var(--body); text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- sections ---------- */

.section {
  position: relative;
  padding: 108px 0;
}
.section--tight { padding-top: 0; }
.section--hero { padding: 148px 0 96px; }
.section--sync { padding-top: 88px; background: var(--ink-950); }
.section--packs { padding-bottom: 88px; }
.section--flows { padding-top: 78px; }
.section--proof { background: var(--ink-850); }

.section--paper {
  background: var(--paper);
  color: var(--paper-ink);
}
.section--paper::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(16, 28, 44, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 28, 44, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.section--paper > .wrap { position: relative; }
.section--end { padding-bottom: 96px; }

.grid-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}
.grid-bg > .wrap { position: relative; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(10, 20, 32, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); background: rgba(7, 14, 24, 0.92); }

.nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.brand__mark { width: 28px; height: 28px; }
.brand__mark rect { fill: none; stroke: var(--line-strong); }
.brand__mark path { fill: none; stroke: var(--blue-soft); stroke-width: 2.6; stroke-linecap: square; }
.brand__text {
  font-family: var(--display); font-weight: 800; font-size: 19px;
  letter-spacing: -0.03em;
}
.brand__tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-mute);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px;
}

.nav__links {
  display: flex; gap: 26px; margin-left: auto;
  font-size: 14.5px; font-weight: 500;
}
.nav__links a {
  text-decoration: none; color: var(--fg-dim);
  position: relative; padding-bottom: 3px;
  transition: color 0.2s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--blue-soft);
  transition: width 0.25s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.icon-link {
  color: var(--fg-dim); font-size: 19px; text-decoration: none;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 9px; transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.icon-link:hover { color: var(--fg); background: rgba(126, 165, 214, 0.10); }

.nav__toggle {
  display: none;
  background: none; border: 1px solid var(--line); color: var(--fg);
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer; font-size: 16px;
}

.nav__mobile {
  display: none; flex-direction: column;
  border-top: 1px solid var(--line);
  padding: 8px 24px 18px;
  background: rgba(7, 14, 24, 0.98);
}
.nav__mobile a {
  padding: 12px 0; text-decoration: none; color: var(--fg-dim);
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.nav__mobile a:last-child { border-bottom: none; }

/* ---------- sheet rail ---------- */

.rail {
  position: fixed; left: 26px; top: 50%; transform: translateY(-50%);
  z-index: 60; display: none; align-items: center; gap: 12px;
  writing-mode: vertical-rl;
}
.rail__line {
  width: 2px; height: 190px; background: var(--line);
  border-radius: 2px; overflow: hidden; position: relative;
}
.rail__progress {
  position: absolute; left: 0; top: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg, var(--blue-soft), var(--teal));
  transition: height 0.15s linear;
}
.rail__label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-mute);
  transition: color 0.3s var(--ease);
}

@media (min-width: 1340px) { .rail { display: flex; } }

/* ---------- shared bits ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute);
  margin: 0 0 20px;
}
.eyebrow--dark { color: rgba(16, 28, 44, 0.58); }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.dot--drafted { background: var(--slate); }
.dot--progress { background: var(--amber); }
.dot--verified { background: var(--teal); }
.dot--merged { background: var(--blue-soft); }
.dot--blocked { background: var(--rust); }

.head { max-width: 720px; margin-bottom: 54px; }
.head--center { margin-inline: auto; text-align: center; }
.head--center .eyebrow { justify-content: center; }
.head__title { font-size: clamp(30px, 4vw, 46px); margin-bottom: 18px; }
.head__lede { color: var(--fg-dim); font-size: 17.5px; max-width: 640px; }
.head--center .head__lede { margin-inline: auto; }
.section--paper .head__lede { color: rgba(16, 28, 44, 0.66); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 10px;
  font: 600 15px/1 var(--body); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--solid {
  background: var(--blue); color: #fff;
  box-shadow: 0 6px 22px -10px rgba(43, 95, 217, 0.9);
}
.btn--solid:hover { background: #3a6de6; box-shadow: 0 12px 30px -12px rgba(43, 95, 217, 1); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); background: rgba(126, 165, 214, 0.06); }
.btn--ghost:hover { border-color: var(--blue-soft); background: rgba(126, 165, 214, 0.12); }
.btn--dark { background: var(--ink-850); color: var(--fg); }
.btn--dark:hover { background: var(--ink-700); }
.btn--outline { border-color: rgba(16, 28, 44, 0.22); color: var(--paper-ink); }
.btn--outline:hover { border-color: var(--paper-ink); background: rgba(16, 28, 44, 0.04); }

.cmd {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink-950); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 11px 11px 11px 16px;
  font-family: var(--mono); font-size: 14.5px;
}
.cmd--lg { display: flex; width: 100%; font-size: 16px; padding: 15px 15px 15px 18px; }
.cmd__prompt { color: var(--teal); }
.cmd__text { color: var(--fg); white-space: nowrap; overflow-x: auto; }
.cmd__btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(126, 165, 214, 0.10); border: none; color: var(--fg-dim);
  padding: 7px 12px; border-radius: 7px; cursor: pointer;
  font: 500 12.5px/1 var(--mono);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.cmd__btn:hover { background: rgba(126, 165, 214, 0.2); color: var(--fg); }
.cmd__btn.is-done { background: rgba(18, 165, 148, 0.18); color: var(--teal); }

/* ---------- hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 64px; align-items: center;
}

.hero__title {
  font-size: clamp(40px, 6.4vw, 74px);
  margin-bottom: 26px;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue-soft) 10%, var(--teal) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero__lede {
  font-size: 19px; color: var(--fg-dim);
  max-width: 560px; margin-bottom: 34px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 34px; }

.hero__facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-size: 14px; color: var(--fg-mute);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts i { color: var(--blue-soft); font-size: 13px; }

.hero__plate { margin: 0; position: relative; }
.hero__plate img {
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  filter: saturate(0.55) contrast(1.06) brightness(0.82);
  aspect-ratio: 4 / 3.4; object-fit: cover;
}
.hero__plate::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r);
  background: linear-gradient(200deg, rgba(43, 95, 217, 0.32), transparent 55%);
  pointer-events: none;
}
.hero__plate figcaption {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: rgba(7, 14, 24, 0.8); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; color: var(--fg-dim);
}

/* ---------- sync pane (signature) ---------- */

.sync {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(43, 95, 217, 0.10), transparent 60%),
    var(--ink-900);
  padding: 20px;
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
}

.sync__bar {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.sync__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(126, 165, 214, 0.07);
  border: 1px solid var(--line); color: var(--fg-dim);
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  font: 500 13.5px/1 var(--body);
  transition: all 0.2s var(--ease);
}
.chip i { font-size: 12px; color: var(--fg-mute); transition: color 0.2s var(--ease); }
.chip:hover { border-color: var(--line-strong); color: var(--fg); }
.chip[aria-selected="true"] {
  background: rgba(43, 95, 217, 0.18);
  border-color: var(--blue-soft); color: #fff;
}
.chip[aria-selected="true"] i { color: var(--blue-soft); }

.sync__replay {
  background: none; border: 1px solid var(--line); color: var(--fg-mute);
  border-radius: 8px; padding: 8px 13px; cursor: pointer;
  font: 500 12.5px/1 var(--mono);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sync__replay:hover { color: var(--fg); border-color: var(--line-strong); }
.sync__replay i { transition: transform 0.5s var(--ease); display: inline-block; }
.sync__replay:hover i { transform: rotate(180deg); }

.sync__pack {
  color: var(--fg-mute); margin: 0 0 14px;
  font-size: 12px; letter-spacing: 0;
}

.sync__panes {
  display: grid; grid-template-columns: 1fr 46px 1fr;
  align-items: stretch;
}

.pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-950);
  overflow: hidden;
  min-width: 0;
}
.pane--spec { border-color: rgba(240, 180, 41, 0.22); }
.pane--code { border-color: rgba(18, 165, 148, 0.22); }

.pane__head {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(126, 165, 214, 0.045);
  color: var(--fg-dim); font-size: 12.5px;
}
.pane__head i { color: var(--amber); font-size: 12px; }
.pane--code .pane__head i { color: var(--teal); }
.pane__head .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane__tag {
  margin-left: auto; font: 500 10px/1 var(--mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(240, 180, 41, 0.3);
  padding: 4px 7px; border-radius: 5px; flex-shrink: 0;
}
.pane__tag--code { color: var(--teal); border-color: rgba(18, 165, 148, 0.3); }

.pane__body {
  margin: 0; padding: 16px 14px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.85;
  min-height: 292px;
  overflow-x: auto;
  white-space: pre;
  color: var(--fg-dim);
}

.ln { display: block; position: relative; padding-left: 14px; }
.ln--add {
  color: var(--fg);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.ln--add.is-in { opacity: 1; transform: none; }
.ln--add::before {
  content: "+"; position: absolute; left: 0; color: var(--teal); font-weight: 700;
}
.pane--spec .ln--add::before { color: var(--amber); }
.ln--add.is-in {
  background: linear-gradient(90deg, rgba(18, 165, 148, 0.10), transparent 70%);
}
.pane--spec .ln--add.is-in {
  background: linear-gradient(90deg, rgba(240, 180, 41, 0.10), transparent 70%);
}

.tok-c { color: var(--fg-mute); }
.tok-k { color: var(--blue-soft); }
.tok-s { color: #8FD6A8; }
.tok-f { color: #E8C08A; }
.tok-h { color: #fff; font-weight: 700; }

.spine { position: relative; display: grid; place-items: center; }
.spine__line {
  position: absolute; top: 26px; bottom: 26px; left: 50%;
  width: 1px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}
.spine__pulse {
  position: absolute; left: 50%; top: 30%;
  width: 7px; height: 7px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--blue-soft);
  box-shadow: 0 0 0 4px rgba(110, 155, 255, 0.16);
  opacity: 0;
}
.spine__pulse.is-running {
  opacity: 1;
  animation: travel 1.5s var(--ease) infinite;
}
@keyframes travel {
  0% { top: 22%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 78%; opacity: 0; }
}
.spine__badge {
  position: relative; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-900); border: 1px solid var(--line-strong);
  color: var(--fg-mute); font-size: 11px;
}

.status {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.status__step {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--mono);
  color: var(--fg-mute);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px;
  opacity: 0.45;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.status__step .dot { transition: box-shadow 0.3s var(--ease); }
.status__step.is-on { opacity: 1; color: var(--fg); }
.status__step.is-now { border-color: currentColor; background: rgba(126, 165, 214, 0.08); }
.status__step[data-state="drafted"].is-now { color: var(--slate); }
.status__step[data-state="in-progress"].is-now { color: var(--amber); }
.status__step[data-state="verified"].is-now { color: var(--teal); }
.status__step[data-state="merged"].is-now { color: var(--blue-soft); }
.status__step.is-now .dot { box-shadow: 0 0 0 4px currentColor; opacity: 0.9; }

.sync__note {
  margin-top: 22px; color: var(--fg-mute); font-size: 15px;
  text-align: center;
}

/* ---------- problem ---------- */

.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-bottom: 72px;
}
.card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(126, 165, 214, 0.035);
  padding: 30px 26px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: rgba(126, 165, 214, 0.07);
}
.card__icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(194, 84, 45, 0.14); color: var(--rust); font-size: 17px;
}
.card h3 { font-size: 20px; margin-bottom: 11px; }
.card p { color: var(--fg-dim); font-size: 15.5px; margin: 0; }
.card em { color: var(--fg); font-style: italic; }

.split {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: 48px; align-items: center;
}
.split__media { margin: 0; }
.split__media img {
  border-radius: var(--r); border: 1px solid var(--line);
  filter: saturate(0.5) brightness(0.8);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.split__copy h3 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }
.split__copy p { color: var(--fg-dim); }
.split__copy strong { color: var(--fg); }
.quote {
  border-left: 2px solid var(--blue-soft);
  padding-left: 18px; color: var(--fg-mute) !important;
  font-size: 14px; line-height: 1.7;
}

/* ---------- control path (paper) ---------- */

.path {
  list-style: none; margin: 0 0 56px; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  counter-reset: none;
}
.path__step {
  position: relative;
  background: #fff;
  border: 1px solid rgba(16, 28, 44, 0.10);
  border-radius: 12px;
  padding: 24px 20px 22px;
  box-shadow: 0 1px 0 rgba(16, 28, 44, 0.05);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.path__step:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -22px rgba(16, 28, 44, 0.5); }
.path__step::after {
  content: ""; position: absolute; right: -9px; top: 50%;
  width: 8px; height: 1px; background: rgba(16, 28, 44, 0.22);
}
.path__step:last-child::after { display: none; }
.path__num {
  display: block; color: var(--blue); font-weight: 700;
  font-size: 11px; letter-spacing: 0.1em; margin-bottom: 14px;
}
.path__step > i { font-size: 18px; color: rgba(16, 28, 44, 0.42); margin-bottom: 12px; display: block; }
.path__step h3 { font-size: 18px; margin-bottom: 8px; }
.path__step p { font-size: 14px; color: rgba(16, 28, 44, 0.62); margin: 0; line-height: 1.55; }

.chain {
  border: 1px dashed rgba(16, 28, 44, 0.24);
  border-radius: var(--r);
  padding: 30px 32px;
  background: rgba(255, 255, 255, 0.6);
}
.chain__label {
  color: rgba(16, 28, 44, 0.5); letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 11px; margin-bottom: 16px;
}
.chain__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.chain__row i { color: var(--blue); font-size: 13px; }
.chain__node {
  font-family: var(--display); font-weight: 600; font-size: clamp(17px, 2.2vw, 23px);
  background: #fff; border: 1px solid rgba(16, 28, 44, 0.12);
  border-radius: 9px; padding: 9px 16px;
  letter-spacing: -0.02em;
}
.chain__note { color: rgba(16, 28, 44, 0.62); font-size: 15px; max-width: 720px; margin: 0; }

/* ---------- blueprint (paper) ---------- */

.bp {
  display: grid; grid-template-columns: 1.35fr 0.65fr;
  gap: 26px; margin-bottom: 26px;
}
.bp__tree {
  background: var(--ink-950); border-radius: var(--r);
  padding: 26px 24px; overflow-x: auto;
  box-shadow: 0 30px 60px -40px rgba(7, 14, 24, 0.9);
}
.bp__side { display: grid; gap: 16px; align-content: start; }
.bp__rule {
  background: #fff; border: 1px solid rgba(16, 28, 44, 0.10);
  border-radius: 12px; padding: 22px 22px;
}
.bp__rule h3 {
  font-size: 17px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.bp__rule h3 i { color: var(--blue); font-size: 14px; }
.bp__rule p { font-size: 14.5px; color: rgba(16, 28, 44, 0.62); margin: 0; }
.bp__rule strong { color: var(--paper-ink); }
.bp__rule .mono { color: var(--blue); }

.tree {
  margin: 0; font-family: var(--mono); font-size: 12.5px;
  line-height: 2; color: var(--fg-mute); white-space: pre;
}
.tree--sm { font-size: 12px; line-height: 1.95; }
.t-dir { color: var(--blue-soft); font-weight: 700; }
.t-file { color: var(--fg); }
.t-note { color: rgba(122, 140, 165, 0.75); }

.callout {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--paper-2);
  border: 1px solid rgba(16, 28, 44, 0.10);
  border-left: 3px solid var(--teal);
  border-radius: 12px; padding: 26px 28px;
}
.callout__icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(18, 165, 148, 0.14); color: #0C7D70; font-size: 17px;
}
.callout h3 { font-size: 20px; margin-bottom: 8px; }
.callout p { color: rgba(16, 28, 44, 0.68); font-size: 15.5px; margin: 0; }
.callout .mono { color: var(--blue); }

/* ---------- packs ---------- */

.packs {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 26px; margin-bottom: 30px; align-items: start;
}
.packs__pack {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ink-950); padding: 22px 24px; overflow-x: auto;
}
.packs__path { color: var(--blue-soft); margin: 0 0 16px; font-size: 12px; }

.packs__states { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.packs__states li {
  display: flex; align-items: center; gap: 14px;
  font-size: 14.5px; color: var(--fg-dim);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.packs__states li:hover { border-color: var(--line-strong); background: rgba(126, 165, 214, 0.04); }

.pill {
  font: 600 11.5px/1 var(--mono); letter-spacing: 0.02em;
  padding: 6px 11px; border-radius: 6px; flex-shrink: 0; min-width: 96px; text-align: center;
}
.pill--drafted { background: rgba(107, 123, 143, 0.18); color: #A6B6C9; }
.pill--progress { background: rgba(240, 180, 41, 0.16); color: var(--amber); }
.pill--verified { background: rgba(18, 165, 148, 0.16); color: var(--teal); }
.pill--merged { background: rgba(43, 95, 217, 0.20); color: var(--blue-soft); }
.pill--cancelled { background: rgba(126, 165, 214, 0.10); color: var(--fg-mute); }
.pill--blocked { background: rgba(194, 84, 45, 0.16); color: #E08A63; }

.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.note {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; background: rgba(126, 165, 214, 0.035);
}
.note h3 { font-size: 17.5px; margin-bottom: 9px; display: flex; align-items: center; gap: 10px; }
.note h3 i { color: var(--blue-soft); font-size: 14px; }
.note p { color: var(--fg-dim); font-size: 15px; margin: 0; }
.note .mono { color: var(--fg); }

/* ---------- flows ---------- */

.flows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flow {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 24px; background: rgba(126, 165, 214, 0.03);
  position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.flow::before {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 2px;
  background: var(--blue-soft); transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s var(--ease);
}
.flow:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.flow:hover::before { transform: scaleY(1); }
.flow header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.flow header i { color: var(--blue-soft); font-size: 17px; }
.flow__phase {
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-mute); border: 1px solid var(--line);
  border-radius: 5px; padding: 4px 8px;
}
.flow h3 { font-size: 19px; margin-bottom: 10px; color: var(--fg); letter-spacing: -0.01em; }
.flow p { color: var(--fg-dim); font-size: 14.5px; margin: 0; }

.flow--cta {
  background: linear-gradient(150deg, rgba(43, 95, 217, 0.16), rgba(18, 165, 148, 0.08));
  border-color: rgba(110, 155, 255, 0.3);
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
}
.flow--cta h3 { font-family: var(--display); font-size: 21px; margin: 0; }
.flow--cta .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- install ---------- */

.install {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 26px; align-items: start; margin-bottom: 42px;
}
.install__box {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; background: rgba(126, 165, 214, 0.035);
}
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  background: none; border: 1px solid var(--line); color: var(--fg-mute);
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font: 500 13px/1 var(--body);
  transition: all 0.2s var(--ease);
}
.tab:hover { color: var(--fg); }
.tab.is-active { background: rgba(43, 95, 217, 0.18); border-color: var(--blue-soft); color: #fff; }

.tabpanel { display: none; }
.tabpanel.is-active { display: block; animation: fade 0.3s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.install__hint { margin: 14px 0 0; color: var(--fg-mute); font-size: 14px; }
.install__hint .mono { color: var(--fg-dim); }

.install__tree {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ink-950); padding: 22px 24px; overflow-x: auto;
}
.install__caption {
  color: var(--fg-mute); letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 10.5px; margin: 0 0 16px;
}

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.steps li {
  display: flex; align-items: flex-start; gap: 14px;
  color: var(--fg-dim); font-size: 15.5px;
  border-top: 1px solid var(--line); padding-top: 18px;
  line-height: 1.5;
}
.steps .mono { color: var(--fg); }
.steps__n {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(43, 95, 217, 0.2); color: var(--blue-soft);
  font-size: 12px; font-weight: 700;
}

/* ---------- proof ---------- */

.proof { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.proof__media { margin: 0; }
.proof__media img {
  border-radius: var(--r); border: 1px solid var(--line);
  filter: saturate(0.55) brightness(0.85);
  aspect-ratio: 4 / 4.2; object-fit: cover;
}
.proof__copy p { color: var(--fg-dim); }
.proof__copy .head__title { margin-bottom: 20px; }
.proof__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- ends: contribute + contact ---------- */

.ends { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.end {
  background: #fff; border: 1px solid rgba(16, 28, 44, 0.10);
  border-radius: 16px; padding: 40px 38px;
}
.end__title { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 16px; }
.end p { color: rgba(16, 28, 44, 0.66); font-size: 16px; }
.end__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.end--contact {
  background: linear-gradient(165deg, var(--ink-850), var(--ink-950));
  border-color: transparent; color: var(--fg);
}
.end--contact .eyebrow { color: var(--fg-mute); }
.end--contact p { color: var(--fg-dim); }

.mailbox {
  display: flex; align-items: center; gap: 14px;
  margin-top: 28px; text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 18px 20px; background: rgba(126, 165, 214, 0.06);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.mailbox:hover { border-color: var(--blue-soft); background: rgba(43, 95, 217, 0.14); transform: translateY(-2px); }
.mailbox > i { color: var(--amber); font-size: 18px; }
.mailbox__addr { font-size: 16.5px; color: #fff; letter-spacing: -0.01em; }
.mailbox__go {
  margin-left: auto; color: var(--fg-mute);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}
.mailbox:hover .mailbox__go { transform: translateX(4px); color: var(--blue-soft); }

.linkish {
  margin-top: 14px; background: none; border: none; cursor: pointer;
  color: var(--fg-mute); font: 500 13px/1 var(--mono);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.linkish:hover { color: var(--fg); }

/* ---------- footer ---------- */

.footer { background: var(--ink-950); border-top: 1px solid var(--line); padding: 44px 0 40px; }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
}
.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__brand p { color: var(--teal); margin: 0; font-size: 13px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14.5px; }
.footer__links a {
  color: var(--fg-dim); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s var(--ease);
}
.footer__links a:hover { color: var(--fg); }
.footer__legal { color: var(--fg-mute); font-size: 13px; margin: 0; width: 100%; }
.footer__legal a { color: var(--fg-dim); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 24px);
  background: var(--ink-800); border: 1px solid var(--line-strong);
  color: var(--fg); padding: 12px 20px; border-radius: 10px;
  font: 500 14px/1 var(--body);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 44px; }
  .hero__plate { order: -1; }
  .hero__plate img { aspect-ratio: 16 / 8; }
  .path { grid-template-columns: repeat(3, 1fr); }
  .path__step::after { display: none; }
  .bp, .packs, .install, .ends { grid-template-columns: 1fr; }
  .flows { grid-template-columns: repeat(2, 1fr); }
  .proof { grid-template-columns: 1fr; gap: 36px; }
  .proof__media img { aspect-ratio: 16 / 8; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .section { padding: 76px 0; }
  .section--hero { padding: 96px 0 72px; }
  .nav__links { display: none; }
  .nav__toggle { display: grid; place-items: center; }
  .nav__mobile.is-open { display: flex; }
  .nav__inner { gap: 14px; }
  .brand__tag { display: none; }
  .cards { grid-template-columns: 1fr; margin-bottom: 52px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .notes, .steps { grid-template-columns: 1fr; }
  .sync__panes { grid-template-columns: 1fr; gap: 12px; }
  .spine { display: none; }
  .pane__body { min-height: 0; }
  .end { padding: 30px 26px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .path { grid-template-columns: 1fr; }
  .flows { grid-template-columns: 1fr; }
  .head__title { font-size: clamp(26px, 7vw, 34px); }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .cmd { justify-content: space-between; }
  .hero__cta .btn { justify-content: center; }
  .chain { padding: 22px 20px; }
  .callout { flex-direction: column; gap: 14px; }
  .packs__states li { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ln--add { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .flow:hover, .path__step:hover { transform: none; }
}
