/* 4mbd.dev site styles.
   Tokens mirror project/tokens.json in the "4mbd Design System" artifact.
   Change a value there first, then copy it here; components below only use var(--token). */
:root {
  --harbor-navy: #2d4c77;
  --deep-navy: #1b2f4b;
  --ink: #111a27;
  --signal-taupe: #a49990;
  --node-taupe: #8f8984;
  --light-taupe: #bdb2a8;
  --paper: #f6f4f1;
  --surface: #ffffff;
  --chrome: #eeebe7;
  --canvas: #fbfaf8;
  --segmented-bg: #eae6e1;
  --line: #e3ded8;
  --row-line: #f0ede9;
  --line-strong: #d9d2ca;
  --control-border: #c9c1b8;
  --text-body: #4a4640;
  --text-muted: #6b645c;
  --text-nav: #3d434c;
  --sky: #8fb0da;
  --navy-tint: #e5ecf5;
  --navy-tint-soft: #eef2f8;
  --on-dark-body: #d5dde8;
  --on-dark-strong: #e8eef6;
  --dark-line: #2b4466;
  --footer-line: #2b3647;
  --added: #2e8a74;
  --added-text: #237560;
  --added-bg: #eef7f4;
  --added-badge-bg: #e3f2ed;
  --added-badge-text: #1d6452;
  --removed: #c2573a;
  --removed-text: #b04a2f;
  --removed-bg: #fbf1ee;
  --removed-badge-bg: #f8e4dd;
  --removed-badge-text: #9a3f27;
  --changed: var(--harbor-navy);
  --changed-badge-text: #243e62;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 56px;
  --space-10: 80px;
  --space-11: 104px;
  --space-12: 120px;

  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 20px;
  --radius-pill: 999px;

  --shadow-window: 0 40px 80px -40px rgba(17, 26, 39, 0.35);
  --shadow-card: 0 30px 60px -40px rgba(17, 26, 39, 0.3);
  --shadow-tooltip: 0 12px 24px -12px rgba(17, 26, 39, 0.5);

  /* Layout (not design tokens): side gutter and content column. */
  --gutter: var(--space-12);
  --column: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--harbor-navy); text-decoration: none; }
a:hover { color: var(--deep-navy); text-decoration: underline; }
input, select, textarea, button { font: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
code { font-family: var(--font-mono); font-size: 0.92em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: var(--space-4); top: -60px; z-index: 10; padding: 10px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--surface); font-weight: 600; }
.skip-link:focus { top: var(--space-4); color: var(--surface); }

/* ---------- Layout ---------- */
.band { padding: var(--space-11) var(--gutter); }
.band > .inner { max-width: var(--column); margin: 0 auto; }
.band--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; }
.section-head { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-8); max-width: 900px; }

/* ---------- Type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.4;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
.display-hero { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 76px; line-height: 1.02; letter-spacing: -0.03em; }
.display-page { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 64px; line-height: 1.04; letter-spacing: -0.03em; }
.heading-section { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1.05; letter-spacing: -0.02em; }
.lead { margin: 0; font-size: 21px; line-height: 1.5; color: var(--text-body); max-width: 660px; }
.body { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-body); }
.caption { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 52px; padding: 0 28px; border-radius: var(--radius-lg);
  font-size: 17px; font-weight: 600; line-height: 1; cursor: pointer;
  border: 1.5px solid transparent; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--harbor-navy); color: var(--surface); }
.btn--primary:hover { background: var(--deep-navy); color: var(--surface); }
.btn--secondary { background: transparent; border-color: var(--control-border); color: var(--ink); }
.btn--secondary:hover { border-color: var(--harbor-navy); color: var(--ink); }
.btn--sm { height: 44px; padding: 0 20px; border-radius: var(--radius-md); font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Site header ---------- */
.site-header {
  height: 76px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: var(--space-5);
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 30px; width: auto; display: block; }
.pill-beta {
  padding: 5px 10px; border-radius: var(--radius-pill); background: var(--harbor-navy); color: var(--surface);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap;
}
.site-nav { display: flex; gap: var(--space-7); flex-grow: 1; justify-content: flex-end; margin-right: var(--space-3); font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--text-nav); }

/* ---------- Hero ---------- */
.hero { padding: 88px var(--gutter) 96px; }
.hero > .inner { max-width: var(--column); margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-9); }
.hero__top { display: flex; gap: var(--space-10); align-items: flex-end; }
.hero__copy { display: flex; flex-direction: column; gap: var(--space-6); flex: 1 1 auto; max-width: 780px; }
.hero__ctas { display: flex; flex-direction: column; gap: var(--space-4); width: 320px; flex-shrink: 0; padding-bottom: var(--space-2); }
.hosts-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 15px; color: var(--text-muted); }
.host-chip {
  padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--ink);
}

/* Host switch above the product window */
.pw-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.segmented { display: inline-flex; padding: 3px; border-radius: var(--radius-md); background: var(--segmented-bg); }
.segmented button {
  height: 36px; padding: 0 16px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-body); font-size: 14px; font-weight: 600; cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--harbor-navy); color: var(--surface); }

/* ---------- Product window (1200×676: browser chrome + a pull-request screenshot, scaled to fit) ---------- */
.pw-frame { width: 100%; max-width: 1200px; aspect-ratio: 1200 / 676; position: relative; container-type: inline-size; }
.pw {
  position: absolute; left: 0; top: 0; width: 1200px; height: 676px;
  transform-origin: 0 0; transform: scale(var(--pw-scale, 1));
  border-radius: var(--radius-xl); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-window); display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--font-sans);
}
.pw__chrome { height: 44px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--chrome); border-bottom: 1px solid var(--line); }
.pw__dots { display: flex; gap: 7px; }
.pw__dots span { width: 11px; height: 11px; border-radius: 50%; background: #d3ccc4; }
.pw__url { flex-grow: 1; height: 28px; border-radius: 6px; background: var(--surface); display: flex; align-items: center; padding: 0 12px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.pw__ext { width: 22px; height: 22px; display: block; outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 5px; }
.pw__body { flex-grow: 1; min-height: 0; background: var(--surface); }
.pw__shot { display: block; width: 100%; height: auto; }
.pw-caption { margin-top: var(--space-4); }

/* ---------- Before / after ---------- */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7); }
.compare figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.compare figcaption { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.compare figure.is-after figcaption { color: var(--harbor-navy); }
.compare__panel { height: 320px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.is-after .compare__panel { border: 2px solid var(--harbor-navy); }
.compare__bar { height: 48px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--paper); border-bottom: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 13px; }
.compare__bar span:first-child { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare__chip { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); font-family: var(--font-sans); font-size: 12px; }
.compare__chip--on { border-color: var(--harbor-navy); background: var(--harbor-navy); color: var(--surface); font-weight: 600; }
.compare__empty { flex-grow: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 15px; }
/* #f0f0f0 matches the renderer's own panel background in the screenshot, so letterboxing is invisible. */
.compare__diagram { flex-grow: 1; min-height: 0; background: #f0f0f0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.compare__diagram img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---------- Checklist ---------- */
.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); font-size: 16px; line-height: 1.5; }
.checklist li { display: flex; gap: var(--space-3); }
.checklist svg { flex-shrink: 0; margin-top: 2px; width: 20px; height: 20px; stroke: var(--harbor-navy); }

/* ---------- Request form ---------- */
.request { display: flex; gap: var(--space-10); align-items: flex-start; }
.request__pitch { width: 440px; flex-shrink: 0; display: flex; flex-direction: column; gap: 22px; }
.request__card { flex: 1 1 auto; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 40px; box-shadow: var(--shadow-card); }
.form { display: flex; flex-direction: column; gap: var(--space-5); }
.form[hidden], .form-done[hidden], .form-error[hidden] { display: none; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-size: 14px; font-weight: 600; padding: 0; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--control-border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); font-size: 16px;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--harbor-navy); }
.field input[aria-invalid="true"] { border-color: var(--removed); }
.field-error { font-size: 13px; color: var(--removed-text); }
.field legend { margin-bottom: var(--space-2); }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border: 1.5px solid var(--control-border); border-radius: var(--radius-md); background: var(--surface);
  color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer;
}
.choice input:checked + span { border-color: var(--harbor-navy); background: var(--harbor-navy); color: var(--surface); font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.form__submit { display: flex; align-items: center; gap: var(--space-5); margin-top: var(--space-1); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-done { min-height: 520px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 18px; }
.form-done__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--added-badge-bg); display: flex; align-items: center; justify-content: center; }
.form-done__icon svg { stroke: var(--added-text); }
.form-done h3 { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
.form-error { padding: 14px 16px; border-radius: var(--radius-md); background: var(--removed-bg); color: var(--removed-badge-text); font-size: 15px; }
.form-error a { color: var(--removed-badge-text); font-weight: 600; text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.faq h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 21px; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { padding: var(--space-8) var(--gutter); background: var(--ink); color: var(--light-taupe); font-size: 14px; }
.site-footer > .inner { max-width: var(--column); margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.site-footer img { height: 28px; width: auto; }
.site-footer a { color: var(--light-taupe); }
.site-footer a:hover { color: var(--surface); }
.site-footer__links { display: flex; gap: var(--space-7); align-items: center; flex-wrap: wrap; }
.site-footer__legal { width: 100%; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--footer-line); font-size: 13px; }

/* ---------- Prose pages (privacy, 404) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin: var(--space-8) 0 var(--space-3); font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.prose p, .prose li { color: var(--text-body); font-size: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  :root { --gutter: var(--space-8); }
  .display-hero { font-size: 60px; }
  .request__pitch { width: 360px; }
}
@media (max-width: 900px) {
  :root { --gutter: var(--space-4); }
  .band { padding-top: 72px; padding-bottom: 72px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .hero > .inner { gap: var(--space-8); }
  .hero__top, .request { flex-direction: column; align-items: stretch; gap: var(--space-7); }
  .hero__ctas, .request__pitch { width: 100%; }
  .display-hero { font-size: 44px; }
  .display-page { font-size: 40px; }
  .heading-section { font-size: 36px; }
  .lead { font-size: 18px; }
  .compare, .faq, .form__row { grid-template-columns: minmax(0, 1fr); }
  .compare__panel { height: 240px; }
  .request__card { padding: var(--space-6); }
  .form__submit { flex-direction: column; align-items: stretch; }
  .site-nav { display: none; }
  .site-header { justify-content: space-between; }
  .site-header__logo img { height: 26px; }
}
@media (max-width: 600px) {
  .pill-beta { display: none; }
  .display-hero { font-size: 38px; }
}
