/* =========================================================================
   Neve — design system (single external stylesheet)
   Sections: 1 Tokens · 2 Base · 3 Layout · 4 Buttons · 5 Header/Footer
             6 Hero · 7 Sections & type · 8 Cards/grids · 9 Demo
             10 Case study · 11 Calculator · 12 Responsive
   Light-only by constraint (see notes/design.md).
   ========================================================================= */

/* ---- 0. Fonts ----------------------------------------------------------- */
/* Self-hosted IBM Plex — Sans variable (100–700 in one file), Mono static 500/600.
   No third-party font requests. Convert to woff2 before launch (see notes/design.md). */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-Variable.ttf") format("truetype-variations");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-Italic-Variable.ttf") format("truetype-variations");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  color-scheme: only light;

  --ink: #14213d;
  --ink-soft: #3b4a66;
  --paper: #f5f4ef;
  --panel: #ffffff;
  --panel-slate: #eaeef3;
  --line: #d9d5cb;
  --brass: #a87a22;
  --brass-deep: #8a6419;
  --brass-tint: #f3e7d2;
  --disabled: #b9b4a8;

  --sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 880px;      /* single content measure — every box shares this width */
  --wrap-narrow: 620px; /* reading measure for intros/closing band */

  --sp-1: 6px;  --sp-2: 12px; --sp-3: 18px; --sp-4: 24px;
  --sp-5: 36px; --sp-6: 56px; --sp-7: 88px;

  --radius: 2px;
  --focus: 2px solid var(--brass);
}

/* ---- 2. Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: var(--focus); outline-offset: 2px; }

.skip-link {
  position: absolute; left: var(--sp-2); top: -60px; z-index: 20;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  transition: top .15s;
}
.skip-link:focus { top: var(--sp-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- 3. Layout ---------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--sp-4); }
.section { padding-block: var(--sp-7); border-top: 1px solid var(--line); }
.section--slate { background: var(--panel-slate); }

/* ---- 4. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 15px/1 var(--sans);
  padding: 13px 22px; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--ink-soft); }
.btn--primary:disabled { background: var(--disabled); cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--block { width: 100%; margin-top: var(--sp-3); }

/* ---- 5. Header / Footer ------------------------------------------------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: var(--sp-3); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; }
.brand__mark { display: block; flex: none; width: 30px; height: 30px; }
.brand__name { font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.brand__sep { color: var(--line); }
.brand__tag { font-size: 14px; color: var(--ink-soft); }
.site-nav { display: flex; align-items: center; gap: var(--sp-4); }
.site-nav a { text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--brass-deep); }

.site-footer { border-top: 1px solid var(--line); padding-block: var(--sp-5); }
.site-footer__brand { font-weight: 600; display: flex; align-items: center; gap: var(--sp-2); }
.site-footer__brand .brand__mark { width: 22px; height: 22px; display: block; flex: none; }
.site-footer__note { font-size: 13px; color: var(--ink-soft); margin-top: var(--sp-1); }

/* ---- 6. Hero ------------------------------------------------------------ */
.hero { padding-block: var(--sp-7); }
.eyebrow, .section-label {
  font-size: 13px; font-weight: 600; color: var(--brass-deep);
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--sp-2);
}
.hero__title { font-size: clamp(32px, 5.2vw, 50px); line-height: 1.1; font-weight: 600; max-width: 16ch; margin-bottom: var(--sp-3); }
.hero__lede { font-size: 18px; color: var(--ink-soft); max-width: 54ch; margin-bottom: var(--sp-4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.hero__meta { font-size: 14px; color: var(--ink-soft); }

/* ---- 7. Section type ---------------------------------------------------- */
.section-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; line-height: 1.2; max-width: 22ch; margin-bottom: var(--sp-3); }
.section-intro { font-size: 17px; color: var(--ink-soft); max-width: 58ch; margin-bottom: var(--sp-5); }
.reassure { margin-top: var(--sp-5); font-size: 15px; color: var(--ink-soft); max-width: 56ch; border-left: 2px solid var(--brass); padding-left: var(--sp-3); }

/* ---- 8. Cards & grids --------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); padding: var(--sp-4); }
.card--accent { border-left: 3px solid var(--brass); }
.grid { display: grid; gap: var(--sp-3); list-style: none; margin: 0; padding: 0; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.pain__title, .mode__title { font-size: 17px; font-weight: 600; margin-bottom: var(--sp-1); }
.pain p, .mode p { font-size: 15px; color: var(--ink-soft); }

.lifecycle { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0 0 var(--sp-5); padding: 0; counter-reset: step; }
.lifecycle__step { display: flex; align-items: center; gap: var(--sp-1); font-size: 14px; font-weight: 500; background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; }
.lifecycle__num { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--brass-deep); }

/* ---- 9. Demo ------------------------------------------------------------ */
.demo { position: relative; }
.demo__logo { position: absolute; top: var(--sp-4); right: var(--sp-4); width: 60px; height: 60px; opacity: .9; pointer-events: none; }
.demo__stage { display: flex; align-items: center; gap: var(--sp-3); padding-right: 72px; }
.demo__orb { width: 44px; height: 44px; border-radius: 50%; background: var(--brass-tint); display: grid; place-items: center; flex: none; }
.demo__orb span { width: 14px; height: 14px; border-radius: 50%; background: var(--brass); transition: transform .2s; }
.demo--active .demo__orb span { background: var(--brass-deep); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
.demo__status { font-size: 15px; color: var(--ink-soft); }
.demo__transcript { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); max-height: 320px; overflow-y: auto; }
.demo__line { font-size: 15px; padding: 10px 14px; border: 1px solid var(--line); max-width: 85%; }
.demo__line--agent { background: var(--panel-slate); align-self: flex-start; }
.demo__line--caller { background: var(--paper); align-self: flex-end; }
.demo__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.demo__note { font-size: 13px; color: var(--ink-soft); margin-top: var(--sp-3); }

/* ---- 10. Case study ----------------------------------------------------- */
.case { margin-bottom: var(--sp-5); }
.case__headline { font-size: 19px; font-weight: 600; line-height: 1.4; margin-bottom: var(--sp-2); }
.case__meta { font-size: 14px; color: var(--ink-soft); margin-bottom: var(--sp-4); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: var(--sp-4); }
.stat { background: var(--panel); padding: var(--sp-3); }
.stat__num { display: block; font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--brass-deep); }
.stat__label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: var(--sp-1); }
.pull-quote { font-style: italic; border-left: 2px solid var(--line); padding-left: var(--sp-3); margin: var(--sp-3) 0 0; font-size: 15px; }
.pull-quote cite { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-soft); margin-top: var(--sp-1); }
.flag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--brass-deep); background: var(--brass-tint); padding: 3px 9px; margin-top: var(--sp-3); }

/* ---- 11. Calculator ----------------------------------------------------- */
.calc__title { font-size: 19px; font-weight: 600; margin-bottom: var(--sp-4); }
.field { margin-bottom: var(--sp-4); }
.field__label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); font-size: 14px; font-weight: 500; margin-bottom: var(--sp-1); }
.field__val { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--brass-deep); }
.field__range { width: 100%; accent-color: var(--brass); height: 4px; }
.field__hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }
.input { width: 100%; font: 15px var(--sans); padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.input:focus-visible { outline: var(--focus); outline-offset: 1px; }

.teaser { padding: var(--sp-4); background: var(--panel-slate); border: 1px solid var(--line); border-left: 3px solid var(--brass); }
.teaser__label { font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.teaser__num { font-family: var(--mono); font-size: 34px; font-weight: 600; color: var(--ink); }
.teaser__cpi { font-family: var(--mono); font-size: 13px; color: var(--brass-deep); margin-top: 4px; }
.teaser__sub { font-size: 13px; color: var(--ink-soft); margin-top: var(--sp-1); max-width: 46ch; }

.gate { margin-top: var(--sp-3); padding-top: var(--sp-4); border-top: 1px dashed var(--line); }
.gate__title { font-size: 15px; font-weight: 600; }
.gate__sub { font-size: 13.5px; color: var(--ink-soft); margin-bottom: var(--sp-3); }
.gate__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.gate__consent { display: flex; align-items: center; gap: var(--sp-1); font-size: 13px; color: var(--ink-soft); margin: var(--sp-2) 0; }

.results { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.results__title { font-size: 15px; font-weight: 600; color: var(--brass-deep); margin-bottom: var(--sp-3); }
.results__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: var(--sp-3); }
.result { background: var(--panel); padding: var(--sp-3); }
.result--hero { background: var(--ink); }
.result__num { display: block; font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--ink); }
.result--hero .result__num { color: var(--brass-tint); }
.result__label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.result--hero .result__label { color: #c9cfdb; }
.results__disclaimer { font-size: 12.5px; color: var(--ink-soft); }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band__inner { max-width: var(--wrap-narrow); margin: 0 auto; }
.cta-band .section-title, .cta-band .section-intro { margin-inline: auto; }

/* ---- Booking form ------------------------------------------------------- */
.book { text-align: left; margin-top: var(--sp-2); }
.book__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.book__message { display: block; width: 100%; margin-bottom: var(--sp-2); font-family: var(--sans); resize: vertical; }
.book__consent { display: flex; align-items: center; gap: var(--sp-1); font-size: 13px; color: var(--ink-soft); margin-bottom: var(--sp-2); }
.book__status { font-size: 14px; color: var(--ink-soft); margin-top: var(--sp-2); text-align: center; }
.book__status--error { color: var(--brass-deep); }
@media (max-width: 760px) {
  .book__row { grid-template-columns: 1fr; }
}

/* ---- 12. Responsive ----------------------------------------------------- */
@media (max-width: 760px) {
  .grid--3, .stat-grid { grid-template-columns: 1fr; }
  .results__grid, .gate__row { grid-template-columns: 1fr; }
  .site-nav { gap: var(--sp-2); }
  .brand__tag { display: none; }
  .section { padding-block: var(--sp-6); }
  .demo__logo { width: 44px; height: 44px; top: var(--sp-3); right: var(--sp-3); }
  .demo__stage { padding-right: 52px; }
}
