/* ==========================================================================
   Atvesto — Design System (v1.0)
   Implements: docs/blueprints/02-design-direction.md
   Mobile-first · vanilla CSS · no frameworks
   Fonts: pages must link Google Fonts (Manrope + Inter) — never @import here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a { color: inherit; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #0A0A0A; }

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color roles — 02-design-direction §1.1 */
  --bg:            #F7F7F5;  /* page background (default) */
  --bg-dark:       #0A0A0A;  /* dark sections, footer, dark cards */
  --surface:       #FFFFFF;  /* cards, dropdowns, inputs, panels on light bg */
  --surface-warm:  #F1EFE9;  /* subtle inset panels, table headers, code blocks */
  --ink:           #0A0A0A;  /* primary text */
  --text-2:        #55534E;  /* secondary text on light */
  --text-3:        #8A877F;  /* tertiary — never for body copy */
  --text-on-dark:  #F7F7F5;  /* primary text on dark surfaces */
  --text-2-on-dark:#B9B6AD;  /* secondary text on dark surfaces */
  --border:        #E7E3D9;  /* hairline borders on light */
  --border-dark:   #2A2926;  /* hairline borders on dark */
  --border-input:  #D8D3C6;  /* form field borders */
  --accent:        #FF5500;  /* signature orange — CTAs/highlights only */
  --accent-deep:   #D94800;  /* orange hover (fills only) */
  --gold:          #FBB625;  /* sparing ornament on dark surfaces only */
  --error:         #C0392B;  /* form errors / destructive only */

  /* Radii — §1.4 */
  --r-sm: 4px;    /* tags, tiny badges, table thumbnails */
  --r-md: 8px;    /* buttons, inputs, dropdown items */
  --r-lg: 12px;   /* cards, panels, large images, chatbot panel */
  --r-pill: 999px;/* status pills, chatbot launcher */

  /* Shadows — §1.5 (warm-neutral, subtle) */
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow-md: 0 2px 8px rgba(10, 10, 10, 0.05), 0 16px 40px rgba(10, 10, 10, 0.08);
  --shadow-header: 0 8px 24px rgba(10, 10, 10, 0.06);

  /* Header heights */
  --header-h: 64px;
}

@media (min-width: 1024px) {
  :root { --header-h: 76px; }
}

/* --------------------------------------------------------------------------
   3. Type scale — §1.2 (Manrope headings / Inter body)
   -------------------------------------------------------------------------- */
.display {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 44px; line-height: 1.04; letter-spacing: -0.03em;
}
@media (min-width: 1024px) {
  .display { font-size: clamp(44px, 6vw, 76px); }
}

h1, .h1 {
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 32px; line-height: 1.10; letter-spacing: -0.02em;
}
h2, .h2 {
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 26px; line-height: 1.15; letter-spacing: -0.015em;
}
h3, .h3 {
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 20px; line-height: 1.30; letter-spacing: -0.01em;
}
@media (min-width: 1024px) {
  h1, .h1 { font-size: 40px; }
  h2, .h2 { font-size: 32px; }
  h3, .h3 { font-size: 22px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 13px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
}
.eyebrow::before { content: ""; width: 24px; height: 3px; background: var(--accent); flex: none; }
.eyebrow--plain::before { content: none; }
.eyebrow--on-dark { color: var(--text-on-dark); }

.body-sm { font-size: 15px; line-height: 1.60; }
.caption {
  font-size: 13px; line-height: 1.50; font-weight: 500;
}
.stat {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 36px; line-height: 1; letter-spacing: -0.02em;
}
@media (min-width: 1024px) {
  body { font-size: 17px; }
  .stat { font-size: 48px; }
}

/* --------------------------------------------------------------------------
   4. Layout — §3 (grid, section rhythm)
   -------------------------------------------------------------------------- */
.container {
  width: 100%; max-width: 1200px;
  margin-inline: auto; padding-inline: 24px;
}

.section { padding-block: 64px; }
@media (min-width: 1024px) {
  .section { padding-block: 96px; }
}
/* Extra air before the final CTA band */
.section--final-cta { padding-top: 96px; }
@media (min-width: 1024px) {
  .section--final-cta { padding-top: 128px; }
}

.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3,
.section--dark .h1, .section--dark .h2, .section--dark .h3 { color: var(--text-on-dark); }

.section-head { max-width: 720px; }
.section-head > * + * { margin-top: 24px; }
.section-body { margin-top: 48px; }

/* Editorial rhythm: eyebrow → H2 → 24px → body (≤68ch) → 48px → content */
.measure { max-width: 68ch; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* 7/5 text + image split */
.split { display: grid; gap: 48px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) {
  .split { grid-template-columns: 7fr 5fr; }
}

/* --------------------------------------------------------------------------
   5. Buttons — §2 (one primary/orange CTA per viewport)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 16px 32px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 15px;
  line-height: 1; letter-spacing: 0.02em; text-decoration: none; text-align: center;
  cursor: pointer; user-select: none;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease,
              transform 200ms ease, box-shadow 200ms ease;
}
.btn--sm { min-height: 44px; padding: 12px 24px; }
.btn--block { width: 100%; }

.btn-primary { background: var(--accent); color: #0A0A0A; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--text-on-dark); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }

.btn-ghost { color: var(--ink); min-height: 44px; padding: 12px 4px; }
.btn-ghost:hover {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* On dark surfaces */
.btn--on-dark.btn-primary { background: var(--accent); color: #0A0A0A; }
.btn--on-dark.btn-primary:hover { background: var(--accent-deep); }
.btn--on-dark.btn-secondary { border-color: var(--text-on-dark); color: var(--text-on-dark); }
.btn--on-dark.btn-secondary:hover { background: var(--text-on-dark); color: #0A0A0A; }
.btn--on-dark.btn-ghost { color: var(--text-on-dark); }

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none;
}
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { transform: none; box-shadow: none; }

/* --------------------------------------------------------------------------
   6. Cards — §2
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
@media (min-width: 1024px) { .card { padding: 32px; } }

.card--clickable { transition: transform 200ms ease, box-shadow 200ms ease; }
.card--clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.card > * + * { margin-top: 16px; }
.card-title { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* --------------------------------------------------------------------------
   7. Forms / inputs — §2
   -------------------------------------------------------------------------- */
.field { margin-bottom: 24px; }
.field-label {
  display: block; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.field-label .req { color: var(--accent); font-weight: 700; }
.field-hint { margin-top: 8px; }

.input, .select, textarea.input {
  width: 100%; min-height: 52px;
  background: var(--surface); border: 1px solid var(--border-input);
  border-radius: var(--r-md); padding: 14px 16px;
  font-size: 16px; line-height: 1.5; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
textarea.input { min-height: 156px; resize: vertical; }
.input::placeholder, textarea.input::placeholder { color: var(--text-3); }

.input:focus-visible, .select:focus-visible, textarea.input:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 44px;
}

.field--error .input, .field--error .select, .field--error textarea.input { border-color: var(--error); }
.field-error {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 8px; color: var(--error);
  font-size: 13px; font-weight: 500; line-height: 1.5;
}
.field-error::before { content: "●"; font-size: 10px; line-height: 2; flex: none; }

/* Custom checkbox — 24px, 2px ink border, orange fill + black check when on */
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; min-height: 44px; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 24px; height: 24px; margin: 2px 0 0;
  border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--surface);
  cursor: pointer; position: relative;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.check input:checked {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2.5 7.5l3.5 3.5 5.5-7' stroke='%230A0A0A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-label { font-size: 15px; line-height: 1.6; color: var(--ink); padding-top: 3px; }

/* --------------------------------------------------------------------------
   8. Header — §2 (+ UX blueprint §2)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.site-header.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-header);
}
/* Transparent over a light hero until scrolled */
body.has-light-hero .site-header { background: transparent; }
body.has-light-hero .site-header.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-header);
}
/* Pull the hero under the transparent header */
body.has-light-hero .hero { margin-top: calc(-1 * var(--header-h)); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.logo-chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  background: #0A0A0A; border-radius: var(--r-md);
  flex: none; text-decoration: none;
}
.logo-chip img { height: 30px; width: auto; }

.site-nav { display: none; }
@media (min-width: 1024px) {
  .site-nav { display: block; }
}
.nav-list { display: flex; align-items: center; gap: 32px; }
.nav-item { position: relative; }

.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--ink);
  padding: 12px 0; text-decoration: none; min-height: 44px;
}
.nav-link .chevron { transition: transform 200ms ease; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px;
  height: 2px; background: var(--accent);
}
.nav-link[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
@media (min-width: 1024px) { .header-actions { margin-left: 0; } }
.header-cta { display: none; }
@media (min-width: 1024px) { .header-cta { display: inline-flex; } }

/* Hamburger — mobile only */
.hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-md);
}
.hamburger svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .hamburger { display: none; } }

/* Dropdown menus */
.dropdown-panel {
  position: absolute; top: calc(100% + 4px); left: -16px; z-index: 61;
  min-width: 280px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}
.has-dropdown.is-open .dropdown-panel { opacity: 1; visibility: visible; transform: none; }

.dropdown-item {
  display: block; padding: 12px 16px; border-radius: var(--r-md);
  text-decoration: none; min-height: 48px;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.dropdown-item:hover { background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.dropdown-item-title { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.dropdown-item-desc { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); }
.dropdown-item.is-active .dropdown-item-title { font-weight: 700; }

/* --------------------------------------------------------------------------
   9. Mobile drawer — §2
   -------------------------------------------------------------------------- */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(10, 10, 10, 0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}
body.drawer-open .drawer-scrim { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; z-index: 71;
  width: min(340px, 92vw); height: 100dvh;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms ease-out;
  visibility: hidden;
}
body.drawer-open .drawer { transform: none; visibility: visible; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 12px 24px; min-height: 64px;
  border-bottom: 1px solid var(--border);
}
.drawer-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-md);
}
.drawer-close svg { width: 22px; height: 22px; }

.drawer-nav { flex: 1; overflow-y: auto; padding: 12px 24px; }
.drawer-item {
  border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(8px);
  transition: opacity 250ms ease, transform 250ms ease;
}
body.drawer-open .drawer-item { opacity: 1; transform: none; }
body.drawer-open .drawer-item:nth-child(1) { transition-delay: 40ms; }
body.drawer-open .drawer-item:nth-child(2) { transition-delay: 80ms; }
body.drawer-open .drawer-item:nth-child(3) { transition-delay: 120ms; }
body.drawer-open .drawer-item:nth-child(4) { transition-delay: 160ms; }
body.drawer-open .drawer-item:nth-child(5) { transition-delay: 200ms; }
body.drawer-open .drawer-item:nth-child(6) { transition-delay: 240ms; }

.drawer-link, .drawer-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 56px; padding: 12px 0;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 22px;
  color: var(--ink); text-decoration: none; text-align: left;
}
.drawer-toggle .chevron { transition: transform 200ms ease; }
.drawer-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.drawer-submenu {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 250ms ease;
}
.drawer-submenu > div { overflow: hidden; }
.drawer-submenu.is-open { grid-template-rows: 1fr; }
.drawer-sub {
  display: flex; align-items: center;
  min-height: 48px; padding: 8px 0 8px 16px;
  font-size: 16px; font-weight: 500; color: var(--text-2); text-decoration: none;
}
.drawer-sub:hover, .drawer-sub.is-active { color: var(--ink); }

.drawer-foot { padding: 24px; border-top: 1px solid var(--border); }
.drawer-foot .btn { margin-bottom: 16px; }
.drawer-email {
  display: block; text-align: center;
  font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none;
}
.drawer-email:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   10. Stepper — §2 (configurator)
   -------------------------------------------------------------------------- */
.stepper {
  display: flex; flex-direction: column; gap: 16px;
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 1024px) {
  .stepper { flex-direction: row; align-items: center; gap: 0; }
}
.step { display: flex; align-items: center; gap: 12px; }
.step-dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 14px;
  color: var(--text-3);
}
.step-label { font-size: 14px; color: var(--text-2); }
.step-connector { display: none; }
@media (min-width: 1024px) {
  .step-connector { display: block; flex: 1; height: 2px; background: var(--border); margin: 0 16px; min-width: 24px; }
}
@media (max-width: 1023px) {
  .step-connector { display: block; width: 2px; height: 16px; background: var(--border); margin-left: 15px; }
  .step { flex-wrap: wrap; }
}

.step.is-current .step-dot { background: var(--accent); border-color: var(--accent); color: #0A0A0A; }
.step.is-current .step-label { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 14px; color: var(--ink); }
.step.is-done .step-dot { background: var(--ink); border-color: var(--ink); color: var(--text-on-dark); }
.step.is-done .step-label { color: var(--ink); }

/* --------------------------------------------------------------------------
   11. Pricing summary panel — §2
   -------------------------------------------------------------------------- */
.summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
@media (min-width: 1024px) {
  .summary { position: sticky; top: calc(var(--header-h) + 24px); }
}
.summary-title { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.summary-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 15px; padding: 6px 0; color: var(--ink);
}
.summary-row .amount { font-weight: 600; white-space: nowrap; }
.summary-note { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); }
.summary-divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.summary-total .label { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 15px; }
.summary-total .figure { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 28px; color: var(--ink); }
.summary .btn { margin-top: 20px; }
.summary-disclaimer { margin-top: 12px; text-align: center; }
.price-flash { transition: opacity 200ms ease; }
.price-flash.is-updating { opacity: 0.35; }

/* --------------------------------------------------------------------------
   12. Tables — §2
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
.data thead th {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; text-align: left;
  background: var(--surface-warm); color: var(--ink);
  padding: 16px; white-space: nowrap;
}
.data tbody td, .data tbody th {
  padding: 16px; border-top: 1px solid var(--border);
  font-size: 15px; line-height: 1.6; color: var(--ink); vertical-align: middle;
}
.data tbody tr:first-child td, .data tbody tr:first-child th { border-top: 0; }
.cell-check { color: var(--accent); font-size: 18px; font-weight: 700; }
.cell-dash { color: var(--text-3); font-size: 18px; }

/* --------------------------------------------------------------------------
   13. Badges / status pills — §2
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; white-space: nowrap;
}
.pill--not-started { border: 1px solid var(--text-3); color: var(--text-2); }
.pill--in-progress { background: var(--accent); color: #0A0A0A; }
.pill--awaiting { background: var(--gold); color: #0A0A0A; }
.pill--in-review, .pill--completed { background: var(--ink); color: var(--text-on-dark); }
.pill--completed .pill-glyph { color: var(--accent); font-weight: 700; }

/* --------------------------------------------------------------------------
   14. Chatbot widget — §2 (styles only; behavior wired per page)
   -------------------------------------------------------------------------- */
.chat-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 65;
  width: 56px; height: 56px; border-radius: var(--r-pill);
  background: var(--accent); color: #0A0A0A;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, background-color 200ms ease;
}
.chat-launcher:hover { transform: translateY(-2px); background: var(--accent-deep); }
.chat-launcher svg { width: 24px; height: 24px; }
.chat-unread {
  position: absolute; top: 4px; right: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 2px #0A0A0A;
}

.chat-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 66;
  width: 380px; max-width: calc(100vw - 48px);
  height: 520px; max-height: calc(100dvh - 140px);
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  animation: chat-in 250ms ease-out;
}
@media (max-width: 639px) {
  .chat-panel { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
}
@keyframes chat-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.chat-header { background: var(--bg-dark); color: var(--text-on-dark); padding: 16px 20px; }
.chat-header .title { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px; }
.chat-header .sub { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2-on-dark); margin-top: 2px; }

.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble {
  max-width: 85%; padding: 12px 16px; border-radius: var(--r-lg);
  font-size: 15px; line-height: 1.6;
}
.chat-bubble--bot { background: var(--surface-warm); color: var(--ink); align-self: flex-start; }
.chat-bubble--user { background: var(--ink); color: var(--text-on-dark); align-self: flex-end; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 12px; }
.chat-chip {
  border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 8px 16px; min-height: 44px;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.chat-chip:hover { background: var(--bg); border-color: var(--ink); }

.chat-typing { display: inline-flex; gap: 5px; padding: 14px 16px; background: var(--surface-warm); border-radius: var(--r-lg); align-self: flex-start; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: chat-blink 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-input-row .input { min-height: 48px; }

/* --------------------------------------------------------------------------
   15. Footer — dark band
   -------------------------------------------------------------------------- */
.site-footer { background: var(--bg-dark); color: var(--text-on-dark); margin-top: 0; }
.footer-main { padding: 64px 0 48px; }
.footer-grid { display: grid; gap: 40px 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-brand .logo-chip { margin-bottom: 20px; }
.footer-tagline {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; color: var(--text-2-on-dark);
}
.footer-heading {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2-on-dark); margin-bottom: 20px;
}
.footer-list { display: flex; flex-direction: column; gap: 4px; }
.footer-link {
  display: inline-flex; align-items: center; min-height: 40px;
  font-size: 15px; color: var(--text-2-on-dark); text-decoration: none;
  transition: color 200ms ease;
}
.footer-link:hover, .footer-link.is-active { color: var(--text-on-dark); text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding: 24px 0;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 1024px) {
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-legal { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2-on-dark); }
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.footer-contact a { color: var(--text-on-dark); text-decoration: none; font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-flag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2-on-dark); border: 1px solid var(--border-dark);
  border-radius: var(--r-sm); padding: 2px 6px; margin-left: 8px; vertical-align: middle;
}

/* --------------------------------------------------------------------------
   16. Editorial devices — §3
   -------------------------------------------------------------------------- */
.ghost-wrap { position: relative; }
.ghost-numeral {
  position: absolute; top: -32px; right: 0; z-index: 0;
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 120px; line-height: 1; color: var(--border);
  user-select: none; pointer-events: none;
}
.ghost-wrap > :not(.ghost-numeral) { position: relative; z-index: 1; }

.pull-quote {
  border-left: 3px solid var(--accent); padding-left: 24px;
  font-family: "Manrope", sans-serif; font-weight: 600; font-size: 24px; line-height: 1.4;
  color: var(--ink); max-width: 32ch;
}

.def-list { border-top: 1px solid var(--border); }
.def-row {
  display: grid; gap: 8px;
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) {
  .def-row { grid-template-columns: 220px 1fr; gap: 24px; }
}
.def-term { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 15px; color: var(--ink); }
.def-desc { font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* Generic accordion (FAQ pages etc.) — grid-template-rows technique, 250ms */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:first-child { border-top: 1px solid var(--border); }
.accordion-button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 64px; padding: 16px 0; text-align: left;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 17px; color: var(--ink);
}
.accordion-button .chevron { flex: none; transition: transform 200ms ease; }
.accordion-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.accordion-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 250ms ease; }
.accordion-panel > div { overflow: hidden; }
.accordion-panel.is-open { grid-template-rows: 1fr; }
.accordion-panel .accordion-body { padding: 0 0 24px; max-width: 68ch; }

/* Images — §5: no treatments, 4:3 with 12px radius in splits */
.img-frame { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-warm); }
.img-frame img { width: 100%; height: 100%; object-fit: cover; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-16-10 { aspect-ratio: 16 / 10; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.img-caption { margin-top: 12px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); }

/* Check / marker lists — orange accents allowed */
.tick-list { display: flex; flex-direction: column; gap: 12px; }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.tick-list .tick { flex: none; color: var(--accent); font-weight: 700; line-height: 1.6; }

/* --------------------------------------------------------------------------
   17. Scroll reveal — §4
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 60ms; }
[data-reveal][data-delay="2"] { transition-delay: 120ms; }
[data-reveal][data-delay="3"] { transition-delay: 180ms; }
[data-reveal][data-delay="4"] { transition-delay: 240ms; }
[data-reveal][data-delay="5"] { transition-delay: 300ms; }

/* --------------------------------------------------------------------------
   18. Accessibility — §6
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 100;
  background: var(--ink); color: var(--text-on-dark);
  padding: 12px 20px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: top 200ms ease;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap;
}

.no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   19. Reduced motion — §4 (no exceptions)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .drawer { transform: none; }
  body:not(.drawer-open) .drawer { visibility: hidden; }
  .chat-panel { animation: none; }
}

/* --------------------------------------------------------------------------
   20. Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.stack > * + * { margin-top: 16px; }
.stack--lg > * + * { margin-top: 24px; }

/* === Page-markup compatibility layer (Phase 1 build) ===
   Classes the page builders used that the v1.0 system did not define.
   Mobile-first; tokens only from §1 (no new colors, fonts, or radii).
   Transitions are covered by the global prefers-reduced-motion block in §19. */

/* --------------------------------------------------------------------------
   C1. Layout & page scaffolding
   -------------------------------------------------------------------------- */
.container-narrow { max-width: 800px; }

/* Page hero (interior pages + 404) */
.page-hero { padding: 64px 0 56px; }
@media (min-width: 1024px) { .page-hero { padding: 96px 0 80px; } }
.page-hero h1 { margin-top: 24px; }
.page-hero .lead, .page-hero .lede { margin-top: 16px; }

.lead, .lede {
  font-size: 18px; line-height: 1.6; color: var(--text-2);
  max-width: 68ch;
}
@media (min-width: 1024px) { .lead, .lede { font-size: 19px; } }

/* Homepage + solution heroes */
.hero { padding: 64px 0; }
@media (min-width: 1024px) { .hero { padding: 96px 0; } }
.hero-grid, .hero-split-grid {
  display: grid; gap: 48px; grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid, .hero-split-grid { grid-template-columns: 7fr 5fr; }
}
.hero-copy > * + * { margin-top: 24px; }
.hero-sub {
  font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 56ch;
}
@media (min-width: 1024px) { .hero-sub { font-size: 20px; } }
.hero-ctas, .hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.hero-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--r-lg);
}

/* Section variants */
.section-alt { background: var(--surface); }
.section-inset .container {
  background: var(--surface-warm); border-radius: var(--r-lg);
  padding: 32px 24px;
}
@media (min-width: 1024px) {
  .section-inset .container { padding: 64px; }
}
.section-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark .h1, .section-dark .h2, .section-dark .h3 { color: var(--text-on-dark); }
.section-cta { text-align: center; margin-top: 48px; }
.section-lead {
  font-size: 18px; line-height: 1.6; color: var(--text-2);
  max-width: 68ch; margin-top: 24px;
}
@media (min-width: 1024px) { .section-lead { font-size: 19px; } }
.section-intro { font-size: 17px; line-height: 1.65; color: var(--text-2); max-width: 68ch; margin-top: 24px; }

/* Builder grid helpers (used alongside .grid) */
.grid-2, .grid-2x2 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2, .grid-2x2 { grid-template-columns: repeat(2, 1fr); }
}
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Split companions */
.split-text { min-width: 0; }
.split-text > * + * { margin-top: 24px; }
.split-media img { width: 100%; border-radius: var(--r-lg); }
.split-form { min-width: 0; }

/* --------------------------------------------------------------------------
   C2. Eyebrow rule + badges
   -------------------------------------------------------------------------- */
/* Standalone 24px orange kicker rule used inside .eyebrow; suppresses the
   ::before rule so pages that include the span don't render it twice. */
.eyebrow-rule {
  display: inline-block; width: 24px; height: 3px;
  background: var(--accent); flex: none;
}
.eyebrow:has(> .eyebrow-rule)::before { content: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; white-space: nowrap;
}
.badge-concept { background: var(--gold); color: #0A0A0A; }
.badge-soon { border: 1px solid var(--text-3); color: var(--text-2); }

/* --------------------------------------------------------------------------
   C3. Buttons & links
   -------------------------------------------------------------------------- */
/* Secondary-on-dark (builder's non-BEM name for the §2 "on dark" recipe) */
.btn-secondary.btn-on-dark { border-color: var(--text-on-dark); color: var(--text-on-dark); }
.btn-secondary.btn-on-dark:hover { background: var(--text-on-dark); color: #0A0A0A; }

/* Ghost / text link (same language as .btn-ghost) */
.link-ghost {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none;
}
.link-ghost:hover {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   C4. CTA bands
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--bg-dark); color: var(--text-on-dark);
  padding: 64px 0; text-align: center;
}
@media (min-width: 1024px) { .cta-band { padding: 96px 0; } }
.cta-band h1, .cta-band h2, .cta-band h3 { color: var(--text-on-dark); }
.cta-band p { color: var(--text-2-on-dark); max-width: 60ch; margin: 16px auto 0; }
.cta-band .btn { margin-top: 32px; }

.final-cta { text-align: center; }
.final-cta-sub { color: var(--text-2-on-dark); max-width: 60ch; margin: 16px auto 32px; }

/* --------------------------------------------------------------------------
   C5. Cards
   -------------------------------------------------------------------------- */
.card-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
/* card-grid-3: same responsive behavior, explicit about the 3-column intent */
.card-grid-3 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card-body > * + * { margin-top: 12px; }
.card-eyebrow {
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 13px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
}
.card-text { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.card-link { display: block; text-decoration: none; color: inherit; }

/* Media-bleed card variants: image runs to the card edge, body re-padded */
.card-media {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  aspect-ratio: 4 / 3; background: var(--surface-warm);
}
.card-media-wide { aspect-ratio: 16 / 9; }
.card-media img, .work-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .badge, .work-media .badge { position: absolute; top: 16px; left: 16px; }

.work-card, .resource-card, .path-card { padding: 0; overflow: hidden; }
.work-card > .card-body, .resource-card > .card-body, .path-card > .card-body {
  margin-top: 0; padding: 24px;
}
@media (min-width: 1024px) {
  .work-card > .card-body, .resource-card > .card-body, .path-card > .card-body { padding: 32px; }
}
.work-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-warm); }
.work-industry {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2);
}
.work-tags, .tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.work-tags li, .tag-list li {
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 4px 10px; font-size: 13px; font-weight: 500; color: var(--text-2);
}
.work-overview { font-size: 15px; line-height: 1.6; color: var(--text-2); }

.resource-featured .card-link { display: flex; flex-direction: column; height: 100%; }
/* Honest placeholder cards: dashed hairline signals "not yet published" */
.resource-soon { border-style: dashed; }
.path-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* --------------------------------------------------------------------------
   C6. Capability list (index "What We Handle")
   -------------------------------------------------------------------------- */
.capability-list { border-top: 1px solid var(--border); }
.capability-list li { border-bottom: 1px solid var(--border); }
.capability-list a {
  display: grid; gap: 8px; padding: 24px 0; text-decoration: none;
}
@media (min-width: 640px) {
  .capability-list a { grid-template-columns: 1fr 1fr; gap: 24px; align-items: baseline; }
}
.capability-name {
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 18px; line-height: 1.3; color: var(--ink);
}
.capability-desc { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.capability-list a:hover .capability-name {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   C7. Steps (homepage "How It Works" + solution step cards)
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: 40px; }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.steps .step { display: block; } /* the generic .step flex row doesn't fit this markup */
.step-number {
  display: block; margin-bottom: 16px;
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 48px; line-height: 1; color: var(--border);
}
.step-body h3 { margin-bottom: 8px; }
.step-body p { font-size: 15px; line-height: 1.6; color: var(--text-2); }

.steps-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
@media (min-width: 1024px) { .step-card { padding: 32px; } }
.step-card > * + * { margin-top: 12px; }
.step-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* Solution editorial lists */
.process-strip { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .process-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .process-strip { grid-template-columns: repeat(5, 1fr); } }
.process-strip li { border-top: 2px solid var(--border); padding-top: 16px; }
.process-strip strong {
  display: block; font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 16px; color: var(--ink);
}
.process-strip span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text-2); }

.sequence-list { border-top: 1px solid var(--border); }
.sequence-list li {
  display: grid; gap: 8px; padding: 20px 0; border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) {
  .sequence-list li { grid-template-columns: 240px 1fr; gap: 24px; }
}
.sequence-list strong {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px; color: var(--ink);
}
.sequence-list span { font-size: 15px; line-height: 1.6; color: var(--text-2); }

.fork-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fork-grid { grid-template-columns: repeat(2, 1fr); } }
.fork-card { display: flex; flex-direction: column; }
.fork-card .btn { align-self: flex-start; }

/* Why Atvesto items */
.why-list { align-items: start; }
.why-item > * + * { margin-top: 8px; }
.why-item p { font-size: 15px; line-height: 1.65; color: var(--text-2); }

/* Path tiles: 4 configurator entry points */
.path-tile { display: flex; flex-direction: column; }
.path-tile .link-ghost { margin-top: auto; padding-top: 8px; align-self: flex-start; }
/* Path-card modifiers — visual treatment comes from .path-card; these are
   semantic hooks for the two solution paths. */
.path-card-dropshipping { /* see .path-card */ }
.path-card-brandbuilding { /* see .path-card */ }

/* Solution hero variant — spacing comes from .hero, grid from .hero-split-grid */
.hero-split { /* see .hero */ }

/* --------------------------------------------------------------------------
   C8. Configurator stepper (get-started uses li > button, not .step)
   -------------------------------------------------------------------------- */
ol.stepper { margin-top: 32px; }
ol.stepper > li { display: flex; align-items: center; }
ol.stepper > li > button {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 4px 8px; border-radius: var(--r-md); text-align: left;
}
.stepper-circle {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 14px;
  color: var(--text-3);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.stepper-label { font-size: 14px; color: var(--text-2); }
ol.stepper > li > button:hover .stepper-label { color: var(--ink); }
ol.stepper > li.is-current .stepper-circle {
  background: var(--accent); border-color: var(--accent); color: #0A0A0A;
}
ol.stepper > li.is-current .stepper-label {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 14px; color: var(--ink);
}
ol.stepper > li.is-done .stepper-circle {
  background: var(--ink); border-color: var(--ink); color: var(--text-on-dark);
  font-size: 0;
}
ol.stepper > li.is-done .stepper-circle::after { content: "✓"; font-size: 14px; }
ol.stepper > li.is-done .stepper-label { color: var(--ink); }
/* Connectors between the li steps */
@media (min-width: 1024px) {
  ol.stepper > li { flex: 1; }
  ol.stepper > li:not(:last-child)::after {
    content: ""; flex: 1; height: 2px; min-width: 24px;
    background: var(--border); margin: 0 16px;
  }
}
@media (max-width: 1023px) {
  ol.stepper > li { flex-direction: column; align-items: flex-start; }
  ol.stepper > li:not(:last-child)::after {
    content: ""; width: 2px; height: 12px;
    background: var(--border); margin: 4px 0 4px 23px;
  }
}

/* --------------------------------------------------------------------------
   C9. Configurator — panels, choice cards, summary rail
   -------------------------------------------------------------------------- */
.config-panel { margin-top: 48px; }
.config-panel h2 { margin-bottom: 24px; }
.path-explainer { margin-top: 24px; max-width: 68ch; }
.path-explainer > * + * { margin-top: 12px; }
.path-explainer p { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.path-explainer strong { color: var(--ink); }

.hint { margin-top: 16px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-3); }

/* Selectable cards — selected state is the 2px orange marker (§1.1) */
.choice-cards { display: grid; gap: 16px; grid-template-columns: 1fr; border: 0; padding: 0; margin: 0; }
@media (min-width: 640px) { .choice-cards { grid-template-columns: repeat(2, 1fr); } }
.choice-card {
  display: block; position: relative; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  transition: border-color 200ms ease, box-shadow 200ms ease,
              transform 200ms ease;
}
.choice-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.choice-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-card input[type="radio"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
.choice-card-title {
  display: block; margin-bottom: 8px;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 18px; color: var(--ink);
}
.choice-card-desc { display: block; margin-bottom: 12px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.choice-card-best { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.choice-card-caveat { display: block; margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-3); }

/* Grow layout: main column + sticky summary rail */
.grow-layout { display: grid; gap: 32px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 1024px) {
  .grow-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}
.grow-main { min-width: 0; }
.summary-rail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
@media (min-width: 1024px) {
  .summary-rail { position: sticky; top: calc(var(--header-h) + 24px); }
}
.summary-rail summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  cursor: pointer; list-style: none;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px; color: var(--ink);
  padding: 4px 0; min-height: 44px;
}
.summary-rail summary::-webkit-details-marker { display: none; }
.summary-meta { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); margin: 12px 0; }
.summary-empty { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); margin: 12px 0; }
.summary-lines { margin: 12px 0; }
.summary-lines li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 6px 0; font-size: 15px; color: var(--ink);
}
.line-name { font-weight: 500; }
.line-detail { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-3); }
.line-amount { font-weight: 600; white-space: nowrap; }
.summary-totals { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.summary-totals > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 6px 0; font-size: 15px;
}
.summary-totals dt { color: var(--text-2); }
.summary-totals dd { margin: 0; font-weight: 600; white-space: nowrap; }
.summary-timeline { margin-top: 12px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); }

/* --------------------------------------------------------------------------
   C10. Configurator — services, extras, add-ons, bundle
   -------------------------------------------------------------------------- */
.service-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.service-fieldset > legend {
  padding: 0; margin-bottom: 16px;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 18px; color: var(--ink);
}
.service-list { display: grid; gap: 16px; }
.service-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 24px;
}
.service-check { display: flex; align-items: flex-start; gap: 16px; cursor: pointer; min-height: 44px; }
.service-name {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px; color: var(--ink);
}
.service-price { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.service-blurb { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.service-details { margin-top: 12px; }
.service-details summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); min-height: 44px;
  display: inline-flex; align-items: center;
}
.service-details ul { margin-top: 4px; }
.service-details ul li {
  position: relative; padding: 4px 0 4px 16px;
  font-size: 14px; line-height: 1.6; color: var(--text-2);
}
.service-details ul li::before { content: "–"; position: absolute; left: 0; color: var(--text-3); }
.service-duration { margin-top: 16px; }
.service-duration label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.service-duration select {
  margin-top: 8px; width: 100%; max-width: 320px; min-height: 48px;
  background-color: var(--surface); border: 1px solid var(--border-input);
  border-radius: var(--r-md); padding: 12px 44px 12px 16px;
  font-size: 15px; color: var(--ink);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.service-duration select:focus-visible { border-color: var(--ink); outline: 2px solid var(--accent); outline-offset: 2px; }
.service-rule { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-3); }

/* 24px custom checkboxes for configurator rows (§2 checkbox language) */
.service-check input[type="checkbox"],
.addon-row input[type="checkbox"],
.extra-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 24px; height: 24px; margin: 2px 0 0;
  border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--surface);
  cursor: pointer; position: relative;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.service-check input[type="checkbox"]:checked,
.addon-row input[type="checkbox"]:checked,
.extra-check input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2.5 7.5l3.5 3.5 5.5-7' stroke='%230A0A0A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.service-check input[type="checkbox"]:focus-visible,
.addon-row input[type="checkbox"]:focus-visible,
.extra-check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.extras-block { margin-top: 48px; }
.extras-block h3 { margin-bottom: 16px; }
.extras-list { display: grid; gap: 12px; }
.extras-list > li { margin: 0; }
.extra-check {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px; cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.extra-check:hover { border-color: var(--ink); }
.extra-name { grid-column: 2; font-size: 15px; font-weight: 700; color: var(--ink); }
.extra-desc { grid-column: 2; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); }
.extra-price { grid-column: 3; grid-row: 1 / span 2; font-size: 15px; font-weight: 600; white-space: nowrap; }

/* Build-path bundle */
.bundle-head > * + * { margin-top: 12px; }
.model-tag {
  display: inline-block; vertical-align: middle;
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  padding: 2px 8px; font-family: "Inter", sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.bundle-price { font-size: 16px; color: var(--text-2); }
.bundle-price strong {
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 22px; color: var(--ink);
}
.bundle-blocks { margin-top: 8px; }
.bundle-blocks section, .bundle-addons { margin-top: 32px; }
.bundle-blocks h4, .bundle-addons h4 {
  margin-bottom: 16px;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 18px; color: var(--ink);
}
.bundle-total { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.bundle-total .caption { margin-top: 12px; }

.addon-row {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px; cursor: pointer; margin-top: 12px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.addon-row:hover { border-color: var(--ink); }
.addon-name { grid-column: 2; font-size: 15px; font-weight: 700; color: var(--ink); }
.addon-desc { grid-column: 2; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-2); }
.addon-price { grid-column: 3; grid-row: 1 / span 2; font-size: 15px; font-weight: 600; white-space: nowrap; }

.placeholder-badge {
  display: inline-block; vertical-align: middle; white-space: nowrap;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 2px 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
}

.pricing-honesty { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); text-align: center; }
.pricing-honesty p { font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 68ch; margin-inline: auto; }
.pricing-honesty p + p { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--text-3); }

.onboarding-notice {
  margin-top: 32px; background: var(--surface-warm);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px;
}
.onboarding-notice > * + * { margin-top: 16px; }
.onboarding-notice p { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.onboarding-notice strong { color: var(--ink); }

/* Notice / alert panels */
.notice-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
@media (min-width: 1024px) { .notice-box { padding: 32px; } }
.notice-box > * + * { margin-top: 12px; }
.notice-box p { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.notice-box h2 { font-size: 22px; }
.notice-box.notice-error { border-color: var(--error); }
.notice-box.notice-error strong { color: var(--error); }
.notice-sub { font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* --------------------------------------------------------------------------
   C11. Checklists, dash lists, milestones
   -------------------------------------------------------------------------- */
.checklist { display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
/* Builders reuse .check as a glyph span in checklist contexts — reset the
   checkbox component styles there so it renders as an orange tick. */
.checklist .check, .checklist-grid .check {
  display: inline-flex; flex: none; min-height: 0; margin: 0; padding: 0;
  border: 0; background: none; cursor: default;
  color: var(--accent); font-weight: 700; line-height: 1.6;
}
.checklist-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .checklist-grid { grid-template-columns: repeat(2, 1fr); } }
.checklist-grid li { display: flex; gap: 16px; align-items: flex-start; }
.checklist-grid strong {
  display: block; font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 16px; color: var(--ink);
}
.checklist-grid li div span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--text-2); }

.dashlist { display: flex; flex-direction: column; gap: 12px; }
.dashlist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.dash { flex: none; color: var(--text-3); font-weight: 700; }

.milestones { border-top: 1px solid var(--border); }
.milestones li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.milestones strong {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px; color: var(--ink);
}
.milestones span { font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; }

/* --------------------------------------------------------------------------
   C12. FAQ accordion (250ms grid-rows animation, same technique as §16)
   -------------------------------------------------------------------------- */
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-heading { margin: 0; font-size: inherit; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 56px; padding: 16px 0; text-align: left;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 17px; line-height: 1.3;
  color: var(--ink);
}
.faq-question::after {
  content: "+"; flex: none; padding-left: 16px;
  font-size: 22px; font-weight: 400; line-height: 1; color: var(--text-2);
  transition: transform 200ms ease;
}
.faq-question[aria-expanded="true"]::after { content: "–"; color: var(--ink); }
.faq-answer {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 250ms ease;
}
.faq-answer > * { overflow: hidden; }
.faq-answer[hidden] { display: none; }
.faq-answer p { padding: 0 0 20px; max-width: 68ch; font-size: 16px; line-height: 1.65; color: var(--text-2); }
/* Static FAQ teaser variant (solutions pages): dt/dd pairs */
.faq-item dt {
  padding-top: 20px;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 17px; color: var(--ink);
}
.faq-item dd { margin: 8px 0 0; padding-bottom: 20px; font-size: 15px; line-height: 1.65; color: var(--text-2); max-width: 68ch; }

/* --------------------------------------------------------------------------
   C13. Forms (builder names aliasing the §7 form language)
   -------------------------------------------------------------------------- */
.field-input {
  width: 100%; min-height: 52px;
  background: var(--surface); border: 1px solid var(--border-input);
  border-radius: var(--r-md); padding: 14px 16px;
  font-size: 16px; line-height: 1.5; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
textarea.field-input { min-height: 156px; resize: vertical; }
.field-input::placeholder { color: var(--text-3); }
.field-input:focus-visible { border-color: var(--ink); outline: 2px solid var(--accent); outline-offset: 2px; }
select.field-input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 44px;
}
.field--error .field-input { border-color: var(--error); }
.required-mark { color: var(--accent); font-weight: 700; }

.form-success {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; margin-top: 24px;
}
.form-success > * + * { margin-top: 12px; }
.form-success p { font-size: 16px; line-height: 1.65; color: var(--ink); }

/* --------------------------------------------------------------------------
   C14. Filters & empty states
   -------------------------------------------------------------------------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.filter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 12px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.is-active, .filter-btn[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--text-on-dark);
}

.empty-state { padding: 48px 24px; text-align: center; font-size: 16px; line-height: 1.65; color: var(--text-2); }
.empty-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 48px 32px; text-align: center;
}
.empty-panel > * + * { margin-top: 12px; }
.empty-panel p { font-size: 15px; line-height: 1.65; color: var(--text-2); max-width: 60ch; margin-inline: auto; }
.empty-title {
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 20px; line-height: 1.3; color: var(--ink);
}

/* --------------------------------------------------------------------------
   C15. Article & legal pages
   -------------------------------------------------------------------------- */
.article { padding: 64px 0; }
@media (min-width: 1024px) { .article { padding: 96px 0; } }
.article-body { max-width: 68ch; margin-top: 32px; }
.article-body > * + * { margin-top: 24px; }
.article-body h2 { margin-top: 48px; }
.article-body h3 { margin-top: 32px; }
.article-body p { font-size: 17px; line-height: 1.65; }
.article-body ul { list-style: disc; padding-left: 24px; }
.article-body ol { list-style: decimal; padding-left: 24px; }
.article-body li + li { margin-top: 8px; }
.article-body li { font-size: 16px; line-height: 1.65; }
.article-body table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
.article-body thead th {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; text-align: left;
  background: var(--surface-warm); color: var(--ink); padding: 16px;
}
.article-body tbody td, .article-body tbody th {
  padding: 16px; border-top: 1px solid var(--border);
  font-size: 15px; line-height: 1.6; vertical-align: top;
}
.article-cta {
  margin-top: 64px; background: var(--bg-dark); color: var(--text-on-dark);
  border-radius: var(--r-lg); padding: 48px 32px; text-align: center;
}
.article-cta h2 { color: var(--text-on-dark); }
.article-cta > * + * { margin-top: 16px; }
.article-cta p { color: var(--text-2-on-dark); max-width: 60ch; margin-inline: auto; }
.article-cta > a { margin: 8px 8px 0; }
.article-cta .btn-ghost { color: var(--text-on-dark); }

.legal { padding: 64px 0; }
@media (min-width: 1024px) { .legal { padding: 96px 0; } }
.legal-body { max-width: 68ch; margin-top: 32px; }
.legal-body > * + * { margin-top: 24px; }
.legal-body h2 { margin-top: 48px; }
.legal-body h3 { margin-top: 32px; }
.legal-body p, .legal-body li { font-size: 16px; line-height: 1.65; }
.legal-body ul { list-style: disc; padding-left: 24px; }
.legal-body ol { list-style: decimal; padding-left: 24px; }
.legal-body li + li { margin-top: 8px; }
.legal-notice {
  margin-top: 24px; background: var(--surface-warm);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--text-2);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   C16. Error page + misc
   -------------------------------------------------------------------------- */
.error-hero { text-align: center; }
.error-links {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  margin-top: 32px;
}

/* Marker class for the dropdown buttons injected by site.js — visuals come
   from .nav-link, which is always present on the same element. */
.dropdown-toggle { /* intentionally unstyled; see .nav-link */ }

