/* ==========================================================================
   iamota MCP — public landing page styles
   Consumes the shared tokens in /brand.css. Palette and type values belong
   there, not here.

   Brand rules held to throughout: square corners, fine rules, Instrument
   Serif for display, Instrument Sans for copy, Roboto Mono uppercase with
   2px tracking for labels/nav/buttons, restrained use of yellow and blue.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* Body-copy links keep an underline — colour alone must not carry meaning. */
.prose-two a,
.step-text a,
.serves-note a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose-two a:hover,
.step-text a:hover { color: var(--accent); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--ia-gray-light);
  border: var(--hairline) solid var(--border);
  padding: 0.1em 0.34em;
}

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

/* ===== Layout scale ===================================================== */

:root {
  --gutter: 24px;
  --measure: 1180px;
}

/* One centring rule for every band. Padding centres the content box, so
   children keep a common left edge regardless of their own width — applying
   max-width per child instead centres each one and makes edges drift. */
.hero,
.band,
.site-header,
.site-footer {
  padding-inline: max(var(--gutter), calc((100% - var(--measure)) / 2));
}

/* ===== Header =========================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  border-bottom: var(--hairline) solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 22px; width: auto; }
.brand-sep { width: var(--hairline); height: 20px; background: var(--border-strong); }
.brand-tag { font-size: 12px; }

.site-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.nav-link { font-size: 11px; color: var(--text-muted); }
.nav-link:hover { color: var(--text); }
.nav-link-cta { color: var(--text); }
.nav-link-cta:hover { color: var(--accent); }

/* ===== Hero ============================================================= */

.hero { padding-block: clamp(56px, 10vw, 116px) clamp(48px, 8vw, 92px); }

.eyebrow { font-size: 11px; color: var(--text-muted); margin-bottom: 26px; }

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 7.4vw, 86px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-bottom: 28px;
}
.hero-title em { font-style: italic; }

.hero-lede {
  max-width: 58ch;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--text-muted);
  margin-bottom: 38px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.hero-facts > div {
  padding: 20px 22px;
  border: var(--hairline) solid var(--border);
  margin: 0 0 calc(var(--hairline) * -1) calc(var(--hairline) * -1);
}
.hero-facts dt { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.hero-facts dd { font-size: 15px; }
.hero-facts code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
  word-break: break-all;
}

/* ===== Buttons =========================================================
   Brand spec: square corners, Roboto Mono SemiBold 12px uppercase, 2px
   tracking, 50px reference height, optional 10px arrow with a 10px gap. */

.btn {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  height: 50px;
  padding-inline: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: var(--hairline) solid transparent;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
              border-color 0.15s var(--ease);
}
.btn-arrow { font-size: 10px; line-height: 1; }

.btn-primary { background: var(--ia-yellow); color: var(--ia-charcoal); }
.btn-primary:hover { background: var(--ia-charcoal); color: var(--ia-white); }

.btn-secondary {
  background: var(--surface);
  color: var(--ia-charcoal);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--ia-yellow); border-color: var(--ia-yellow); }

.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn:disabled:hover { background: var(--surface); color: var(--ia-charcoal); }

/* ===== Bands ============================================================ */

.band {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: var(--hairline) solid var(--border);
}
.band-tint { background: var(--surface); }

.band-invert {
  background: var(--surface-invert);
  color: var(--text-invert);
  border-top-color: var(--surface-invert);
}
.band-invert .eyebrow { color: rgba(255, 255, 255, 0.62); }
.band-invert code {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-invert);
  color: var(--ia-beige);
}

.band-head { margin-bottom: 48px; }

.band-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.1;
  max-width: 24ch;
}

.band-lede {
  margin-top: 20px;
  max-width: 56ch;
  color: var(--text-muted);
}

.prose-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px 56px;
  max-width: 92ch;
}
.prose-two p { color: var(--text-muted); }

/* ===== Numbered flow ==================================================== */

.flow {
  list-style: none;
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.flow > li {
  padding: 28px 26px 32px;
  border: var(--hairline) solid var(--border);
  margin: 0 0 calc(var(--hairline) * -1) calc(var(--hairline) * -1);
}
.flow-step { font-size: 11px; color: var(--accent); }
.flow-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  margin: 14px 0 10px;
}
.flow > li p { font-size: 15px; color: var(--text-muted); }

/* ===== Serves grid ====================================================== */

.serves-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}
.serves-grid > li {
  padding: 28px 26px 34px;
  border: var(--hairline) solid var(--border-invert);
  border-top: 3px solid transparent;
  margin: 0 0 calc(var(--hairline) * -1) calc(var(--hairline) * -1);
}
.serves-grid > li:hover { border-top-color: var(--ia-yellow); }
.serves-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  margin-bottom: 12px;
}
.serves-grid > li p { font-size: 15px; color: rgba(255, 255, 255, 0.68); }

.serves-note {
  margin-top: 40px;
  max-width: 62ch;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.68);
  border-left: 2px solid var(--ia-yellow);
  padding-left: 18px;
}

/* ===== Wizard — client cards ============================================ */

.client-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  background: var(--surface);
  border: var(--hairline) solid var(--border-strong);
}

.client-card {
  background: var(--surface);
  border-inline-end: var(--hairline) solid var(--border);
  border-top: 3px solid transparent;
  padding: 30px 26px 34px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  position: relative;
  transition: background-color 0.15s var(--ease);
}
.client-card:last-child { border-inline-end: 0; }
.client-card:hover { background: var(--ia-gray-light); border-top-color: var(--ia-yellow); }

.card-kicker { font-size: 10px; color: var(--text-muted); }
.card-title { font-family: var(--font-serif); font-size: 34px; line-height: 1.1; }
.card-sub { font-size: 15px; color: var(--text-muted); }
.card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 14px;
  border-top: var(--hairline) solid var(--border);
}
.card-go {
  position: absolute;
  top: 26px;
  right: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.client-card:hover .card-go { color: var(--text); }

.prereq {
  margin-top: 40px;
  border: var(--hairline) solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 22px 24px;
  max-width: 72ch;
}
.prereq-head { font-size: 10px; color: var(--accent); margin-bottom: 10px; }
.prereq p { font-size: 15px; color: var(--text-muted); }

/* ===== Wizard — steps =================================================== */

.wizard-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: var(--hairline) solid var(--border);
  margin-bottom: 30px;
}
.wizard-back {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0;
}
.wizard-back:hover { color: var(--text); }
.wizard-crumb { font-size: 11px; color: var(--text-muted); }

.wizard-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
}
.wizard-intro {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--text-muted);
}

.wizard-progress {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--border);
  border: var(--hairline) solid var(--border);
  margin: 34px 0 0;
}
.progress-item {
  background: var(--bg);
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 160px;
  transition: background-color 0.15s var(--ease);
}
.progress-item:hover { background: var(--ia-gray-light); }
.progress-num { font-size: 10px; color: var(--text-faint); }
.progress-label { font-size: 13px; color: var(--text-muted); }
.progress-item.is-done .progress-num { color: var(--accent); }
.progress-item.is-current { background: var(--ia-charcoal); }
.progress-item.is-current .progress-num { color: var(--ia-yellow); }
.progress-item.is-current .progress-label { color: var(--ia-white); }

#wizard-body {
  border: var(--hairline) solid var(--border);
  border-top: 0;
  background: var(--surface);
  padding: 34px 30px 38px;
}

.step-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.step-lede { color: var(--text-muted); max-width: 62ch; margin-bottom: 22px; }
.step-text { max-width: 68ch; margin-bottom: 18px; }
.step-text:last-child { margin-bottom: 0; }

.step-list { margin: 0 0 22px 1.35em; max-width: 66ch; }
.step-list li { margin-bottom: 9px; }
.step-list li::marker { font-family: var(--font-mono); font-size: 0.85em; color: var(--text-muted); }

/* ===== Code blocks ====================================================== */

.code-block {
  border: var(--hairline) solid var(--border-strong);
  background: var(--ia-charcoal);
  margin-bottom: 22px;
  max-width: 78ch;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: var(--hairline) solid var(--border-invert);
}
.code-label { font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.code-copy {
  background: none;
  border: var(--hairline) solid var(--border-invert);
  color: var(--ia-beige);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  padding: 5px 10px;
  cursor: pointer;
}
.code-copy:hover { background: var(--ia-yellow); color: var(--ia-charcoal); border-color: var(--ia-yellow); }

.code-pre {
  padding: 15px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ia-beige);
  white-space: pre;
}

/* The inner <code> must not inherit the inline-code chip styling from the
   generic `code` rule above — a light-gray chip behind beige text is
   unreadable on the charcoal block. */
.code-pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ===== Notes ============================================================ */

.step-note {
  border: var(--hairline) solid var(--border);
  border-left: 3px solid var(--info);
  background: var(--info-bg);
  padding: 15px 18px;
  margin-bottom: 22px;
  max-width: 72ch;
}
.step-note p { font-size: 15px; }
.step-note-warn { border-left-color: var(--warn); background: var(--warn-bg); }

/* ===== Branches ========================================================= */

.branch { margin-bottom: 8px; }
.branch-q { font-weight: 500; margin-bottom: 16px; }

.branch-opts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.branch-opt {
  background: var(--surface);
  border: var(--hairline) solid var(--border-strong);
  padding: 14px 20px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 3px;
  min-width: 200px;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.branch-opt:hover { background: var(--ia-gray-light); }
.branch-opt-label { font-size: 15px; font-weight: 500; }
.branch-opt-hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.branch-opt.is-active {
  background: var(--ia-yellow);
  border-color: var(--ia-charcoal);
}
.branch-opt.is-active .branch-opt-hint { color: var(--ia-charcoal); }

.branch-follow:not(:empty) {
  border-top: var(--hairline) solid var(--border);
  padding-top: 26px;
}

/* ===== Wizard footer ==================================================== */

.wizard-foot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border: var(--hairline) solid var(--border);
  border-top: 0;
  background: var(--surface);
  padding: 18px 30px 24px;
  flex-wrap: wrap;
}

/* ===== Footer =========================================================== */

.site-footer {
  border-top: var(--hairline) solid var(--border);
  padding-block: 44px 56px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-logo { height: 20px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 11px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* ===== Narrow screens =================================================== */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; min-height: 0; padding-block: 16px; }
  .site-nav { gap: 18px; }
  .nav-link:not(.nav-link-cta) { display: none; }
  .hero-title { max-width: none; }
  .btn { padding-inline: 20px; }
  #wizard-body { padding: 26px 20px 30px; }
  .wizard-foot { padding: 16px 20px 20px; }
  .wizard-foot .btn { flex: 1 1 auto; justify-content: center; }
  .branch-opt { min-width: 0; flex: 1 1 100%; }
  .progress-item { min-width: 0; flex: 1 1 100%; }
}

/* Honour reduced-motion preferences for the smooth-scroll and transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* ===== Link cards ========================================================
   External links get a card rather than an inline underline, so a
   non-technical reader can see at a glance that a step needs a download. */

.link-list {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  max-width: 72ch;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  background: var(--surface);
  border: var(--hairline) solid var(--border-strong);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.link-card:hover { background: var(--ia-gray-light); }

.link-card-main { display: grid; gap: 3px; }
.link-card-label { font-size: 15px; font-weight: 500; }
.link-card-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.link-card-go { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.link-card:hover .link-card-go { color: var(--text); }

/* The one link a step actually wants you to click. */
.link-card-primary {
  background: var(--ia-yellow);
  border-color: var(--ia-charcoal);
}
.link-card-primary .link-card-note,
.link-card-primary .link-card-go { color: var(--ia-charcoal); }
.link-card-primary:hover { background: var(--ia-charcoal); color: var(--ia-white); }
.link-card-primary:hover .link-card-note,
.link-card-primary:hover .link-card-go { color: rgba(255, 255, 255, 0.7); }

/* ===== Figures ===========================================================
   Schematic diagrams (inline SVG) or real screenshots. Both get the same
   frame and caption treatment so swapping one for the other is invisible
   to the layout. */

.step-figure {
  margin: 0 0 24px;
  max-width: 80ch;
}

.step-figure-svg,
.step-figure-img {
  display: block;
  width: 100%;
  border: var(--hairline) solid var(--border);
  background: var(--surface-sunken);
}
.step-figure-svg svg { display: block; width: 100%; height: auto; }

.step-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  border-left: 2px solid var(--ia-yellow);
  padding-left: 12px;
}
