/* =============================================================================
   components.css — OforTech extended component library
   -----------------------------------------------------------------------------
   Loaded AFTER shared.css and pages.css. This file does not redefine tokens;
   it only adds the components called out in the user story that the original
   design didn't ship:

      • Rich text blocks (.prose)
      • CTA sections (.cta-block, .cta-banner, .cta-inline)
      • Stats blocks (.stats-grid, .stat)
      • Logo strips (.logo-strip)
      • Testimonial cards (.testimonial)
      • Case study cards (.case-card)         [card variant of work-card]
      • Service cards (.service-card)
      • Admin dashboard cards (.admin-card)
      • Lead status badges (.badge--lead-…)
      • Form fields with the full state matrix
        (default · hover · focus · active · disabled · error · success)
      • A reusable button-loading pattern (data-loading)
      • Empty / loading / error placeholders for dynamic regions

   Tokens reused from shared.css:
      --bg-0/1/2, --fg-0/1/2/3, --line, --line-strong,
      --accent, --accent-2, --accent-deep, --accent-glow, --grad,
      --r-sm/md/lg/xl, --pad-x, --section-y

   Naming convention:
      .block        — top-level layout/region
      .block__elem  — internal element (BEM-ish)
      .block--mod   — variant
   Where the existing system uses flat classes (.h2, .lede), we keep that
   style for things that compose with existing utilities.
   ========================================================================== */


/* -----------------------------------------------------------------------------
   1. RICH TEXT BLOCKS — .prose
   -----------------------------------------------------------------------------
   The CMS renders markdown into a .prose container. Styles here govern every
   element type so editors can write naturally without escape hatches.
   -------------------------------------------------------------------------- */
.prose {
  max-width: 68ch;
  color: var(--fg-1);
  font-size: 17px;
  line-height: 1.7;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2,
.prose h3,
.prose h4 {
  color: var(--fg-0);
  letter-spacing: -0.02em;
  margin-top: 2.4em;
  text-wrap: balance;
}
.prose h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 500; }
.prose h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; font-weight: 500; }
.prose h4 { font-size: 18px; font-weight: 600; }
.prose p  { color: var(--fg-1); }
.prose a  {
  color: var(--fg-0);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--accent) 70%, transparent);
  text-underline-offset: 0.22em;
  transition: color .2s, text-decoration-color .2s;
}
.prose a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.prose ul,
.prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--fg-2); font-family: 'JetBrains Mono', monospace; }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  color: var(--fg-0);
}
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92em;
  background: color-mix(in oklab, var(--bg-1) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}
.prose pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 22px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose img,
.prose video,
.prose figure {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin: 2em 0;
}
.prose figure figcaption {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}
.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 2.4em 0;
}


/* -----------------------------------------------------------------------------
   2. CTA SECTIONS
   -----------------------------------------------------------------------------
   Three variants that all share the same conversion logic:
     .cta-block   full-bleed, big — used between sections to break rhythm
     .cta-banner  inline, single row — used at top/bottom of long pages
     .cta-inline  small, contextual — used inside an article
   -------------------------------------------------------------------------- */
.cta-block {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 80px);
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-0));
  border: 1px solid var(--line-strong);
  overflow: hidden;
  isolation: isolate;
}
.cta-block::after {
  /* faint diagonal grid for "premium technical" feel — no animation */
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 0% 100%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 0% 100%, #000 30%, transparent 75%);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}
.cta-block__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: end;
}
.cta-block__title { max-width: 18ch; }
.cta-block__sub   { color: var(--fg-1); max-width: 48ch; }
.cta-block__actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 28px;
}
@media (max-width: 760px) {
  .cta-block__layout { grid-template-columns: 1fr; }
}

/* Banner — single-line mode, used as a sticky/visible CTA */
.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 3vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--bg-1) 70%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.cta-banner__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.cta-banner__title { font-size: 18px; line-height: 1.3; color: var(--fg-0); margin-top: 4px; }

/* Inline — appears mid-article as a focused nudge */
.cta-inline {
  border-left: 2px solid var(--accent);
  padding: 16px 0 16px 22px;
  margin: 32px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}
.cta-inline p { color: var(--fg-1); margin: 0; max-width: 52ch; }


/* -----------------------------------------------------------------------------
   3. STATS BLOCK
   -----------------------------------------------------------------------------
   A grid of credibility numbers. Designed so a CMS can render N stats and the
   layout reflows; minimum 180px keeps numbers readable at any viewport.
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stats-grid--bordered { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px); }

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat__value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg-0);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__value--plain { background: none; -webkit-background-clip: unset; background-clip: unset; color: var(--fg-0); }
.stat__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.stat__sub { font-size: 14px; color: var(--fg-1); max-width: 28ch; }


/* -----------------------------------------------------------------------------
   4. LOGO STRIP
   -----------------------------------------------------------------------------
   Names sit on a faint dotted rule. Names render as wordmarks until brand
   assets land via CMS — at which point swap children for <img alt="">.
   -------------------------------------------------------------------------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 36px clamp(36px, 6vw, 72px);
  padding: 28px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.logo-strip__item {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.01em;
  color: var(--fg-2);
  opacity: 0.85;
  transition: color .25s, opacity .25s;
}
.logo-strip__item:hover { color: var(--fg-0); opacity: 1; }


/* -----------------------------------------------------------------------------
   5. TESTIMONIAL CARD
   -------------------------------------------------------------------------- */
.testimonial {
  position: relative;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(140% 80% at 100% 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 50%),
    color-mix(in oklab, var(--bg-1) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.testimonial__quote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-0);
  text-wrap: balance;
}
.testimonial__quote::before {
  content: '“';
  display: block;
  font-size: 64px;
  line-height: 0.5;
  color: var(--accent);
  margin-bottom: 12px;
}
.testimonial__attr {
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.testimonial__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-1);
  letter-spacing: 0.08em;
}
.testimonial__name { font-weight: 600; color: var(--fg-0); font-size: 14px; }
.testimonial__role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}


/* -----------------------------------------------------------------------------
   6. SERVICE CARD
   -----------------------------------------------------------------------------
   Used on services index. Distinct from a service ROW (services.html) — the
   card is denser and pairs an icon with a teaser.
   -------------------------------------------------------------------------- */
.service-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--bg-1) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              border-color .35s, box-shadow .35s;
  display: flex;
  flex-direction: column;
  gap: 18px;
  isolation: isolate;
  overflow: hidden;
}
.service-card::before {
  /* hover glow accent */
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 20px 60px -20px var(--accent-glow); }
.service-card:hover::before { opacity: 1; }
.service-card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 30%, transparent), color-mix(in oklab, var(--accent-deep) 60%, transparent));
  border: 1px solid var(--line-strong);
  color: var(--fg-0);
}
.service-card__title { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; color: var(--fg-0); }
.service-card__desc  { color: var(--fg-1); font-size: 15px; line-height: 1.55; }
.service-card__meta {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.service-card__meta a { color: var(--fg-0); display: inline-flex; gap: 6px; align-items: center; }
.service-card__meta a:hover { color: var(--accent); }


/* -----------------------------------------------------------------------------
   7. CASE STUDY CARD
   -----------------------------------------------------------------------------
   Visually heavier than service-card; leads with imagery (or gradient stand-in
   while the CMS waits on hero shots).
   -------------------------------------------------------------------------- */
.case-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s;
}
.case-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.case-card__media {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 100% at 0% 0%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 60%),
    linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.case-card__media img { width: 100%; height: 100%; object-fit: cover; }
.case-card__tag {
  position: absolute; top: 14px; left: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-0) 80%, transparent);
  border: 1px solid var(--line-strong);
  color: var(--fg-1);
}
.case-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.case-card__title { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; color: var(--fg-0); }
.case-card__client {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.case-card__excerpt { color: var(--fg-1); font-size: 14px; line-height: 1.55; }
.case-card__metrics {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.case-card__metrics b { color: var(--fg-0); font-family: 'Space Grotesk', sans-serif; font-weight: 500; }


/* -----------------------------------------------------------------------------
   8. ADMIN DASHBOARD CARD
   -----------------------------------------------------------------------------
   Quieter than marketing cards — admins look at these all day.
   -------------------------------------------------------------------------- */
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s;
}
.admin-card:hover { border-color: var(--line-strong); }
.admin-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.admin-card__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.admin-card__value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--fg-0);
}
.admin-card__delta {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}
.admin-card__delta--up   { color: #34d399; }
.admin-card__delta--down { color: #f87171; }
.admin-card__delta--flat { color: var(--fg-2); }
.admin-card__foot {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  text-transform: uppercase;
}


/* -----------------------------------------------------------------------------
   9. BADGES — generic + LEAD STATUS
   -----------------------------------------------------------------------------
   Lead status mirrors the admin lifecycle:
     new → contacted → qualified → won / lost / archived
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  color: var(--fg-1);
  background: color-mix(in oklab, var(--bg-1) 80%, transparent);
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
/* Variants — color is meaning. */
.badge--lead-new       { color: #5ec5ff; background: rgba(94, 197, 255, 0.10); border-color: rgba(94, 197, 255, 0.35); }
.badge--lead-contacted { color: #c4b5fd; background: rgba(196, 181, 253, 0.10); border-color: rgba(196, 181, 253, 0.35); }
.badge--lead-qualified { color: #fbbf24; background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.35); }
.badge--lead-won       { color: #34d399; background: rgba(52, 211, 153, 0.10); border-color: rgba(52, 211, 153, 0.35); }
.badge--lead-lost      { color: #f87171; background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.35); }
.badge--lead-archived  { color: var(--fg-3); background: transparent; border-color: var(--line-strong); }


/* -----------------------------------------------------------------------------
   10. FORMS — full state matrix
   -----------------------------------------------------------------------------
   Every field has the seven required states wired up. Errors are conveyed
   both visually AND via aria-invalid + role="alert" on the message element.
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 22px; }
.form__row { display: grid; gap: 22px; }
.form__row--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form__row--2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.field__label .req { color: var(--accent); }

.field__control {
  appearance: none;
  width: 100%;
  min-height: 48px;            /* >= 44 touch target */
  padding: 12px 16px;
  background: color-mix(in oklab, var(--bg-1) 70%, transparent);
  color: var(--fg-0);
  font: inherit;
  font-size: 16px;             /* >=16 prevents iOS zoom-on-focus */
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
textarea.field__control { min-height: 140px; resize: vertical; line-height: 1.5; }
.field__control::placeholder { color: var(--fg-3); }

/* default → hover → focus → active → disabled                               */
.field__control:hover                  { border-color: var(--fg-3); }
.field__control:focus,
.field__control:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 28%, transparent);
}
.field__control:active                 { background: color-mix(in oklab, var(--bg-1) 60%, transparent); }
.field__control:disabled,
.field__control[aria-disabled="true"]  {
  opacity: 0.55;
  cursor: not-allowed;
  background: color-mix(in oklab, var(--bg-1) 50%, transparent);
}
/* Browser autofill normalization (Chrome) */
.field__control:-webkit-autofill {
  -webkit-text-fill-color: var(--fg-0);
  box-shadow: 0 0 0 1000px var(--bg-1) inset;
  border-color: var(--line-strong);
}

/* Helper / error / success messages — all live in the same slot.            */
.field__help {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 8px;
}
.field__help svg { width: 12px; height: 12px; flex: none; }

.field[data-state="error"]   .field__control { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18); }
.field[data-state="error"]   .field__help    { color: #f87171; }
.field[data-state="success"] .field__control { border-color: #34d399; }
.field[data-state="success"] .field__help    { color: #34d399; }
.field[data-state="warning"] .field__control { border-color: #fbbf24; }
.field[data-state="warning"] .field__help    { color: #fbbf24; }

/* Loading state on inputs — used while async-validating */
.field[data-state="loading"] .field__control {
  background-image: linear-gradient(110deg, transparent 30%, color-mix(in oklab, var(--accent) 20%, transparent) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: field-shimmer 1.4s linear infinite;
}
@keyframes field-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Selection chips (used on contact form for project type) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-1);
  background: color-mix(in oklab, var(--bg-1) 60%, transparent);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
  /* WCAG 2.2 AA target size — 24px minimum, 44px AAA. We sit between
   * the two: 38px reads as a comfortable tap on touch surfaces while
   * preserving the tight chip aesthetic on desktop. */
  min-height: 38px;
}
.chip:hover { color: var(--fg-0); border-color: var(--fg-3); }
.chip[aria-pressed="true"] {
  color: var(--bg-0);
  background: var(--fg-0);
  border-color: var(--fg-0);
}
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* -----------------------------------------------------------------------------
   11. BUTTON — loading + disabled
   -----------------------------------------------------------------------------
   The base .btn already exists in shared.css. We layer on loading/disabled
   states so any existing button can opt in via a single attribute.
   -------------------------------------------------------------------------- */
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn[data-loading="true"] {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn[data-loading="true"]::after {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: inherit;
  animation: btn-spin 720ms linear infinite;
}
.btn-primary[data-loading="true"]::after { color: var(--bg-0); }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn[data-loading="true"]::after { animation-duration: 1.6s; }
}


/* -----------------------------------------------------------------------------
   12. EMPTY / LOADING / ERROR PLACEHOLDERS
   -----------------------------------------------------------------------------
   Mount these in any list/region that pulls dynamic data (lead inbox,
   transcript viewer, blog index when filtered to nothing, etc.)
   -------------------------------------------------------------------------- */
.placeholder {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: clamp(28px, 4vw, 56px);
  text-align: center;
  color: var(--fg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.placeholder__title { color: var(--fg-0); font-size: 18px; }
.placeholder__sub   { color: var(--fg-2); font-size: 14px; max-width: 44ch; }

.skeleton {
  background: linear-gradient(110deg,
    color-mix(in oklab, var(--bg-1) 70%, transparent) 30%,
    color-mix(in oklab, var(--bg-2) 90%, transparent) 50%,
    color-mix(in oklab, var(--bg-1) 70%, transparent) 70%);
  background-size: 200% 100%;
  animation: field-shimmer 1.4s linear infinite;
  border-radius: var(--r-sm);
  height: 16px;
}
.skeleton--lg { height: 28px; border-radius: var(--r-md); }
.skeleton--xl { height: 200px; border-radius: var(--r-md); }
@media (prefers-reduced-motion: reduce) {
  .skeleton, .field[data-state="loading"] .field__control { animation: none; background: var(--bg-1); }
}


/* -----------------------------------------------------------------------------
   13. FOCUS RING — global default
   -----------------------------------------------------------------------------
   Anything focusable that doesn't have its own focus style picks this up. We
   only target :focus-visible so mouse users don't see rings on click.
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}


/* -----------------------------------------------------------------------------
   14. UTILITIES — content widths and stacks
   -------------------------------------------------------------------------- */
.stack-2  { display: flex; flex-direction: column; gap: 8px; }
.stack-3  { display: flex; flex-direction: column; gap: 12px; }
.stack-4  { display: flex; flex-direction: column; gap: 16px; }
.stack-6  { display: flex; flex-direction: column; gap: 24px; }
.stack-8  { display: flex; flex-direction: column; gap: 32px; }
.row-3    { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-4    { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.measure  { max-width: 68ch; }
.measure-narrow { max-width: 52ch; }


/* -----------------------------------------------------------------------------
   COOKIE CONSENT BANNER — paired with assets/cookie-banner.js
   -----------------------------------------------------------------------------
   Sits along the bottom edge of the viewport, full-width on mobile and a
   centered, padded card on larger screens. Stays below the chatbot launcher
   (z-90) and above general page content. Does not lock scroll — the user can
   read the page while deciding.
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  margin-inline: auto;
  z-index: 80;
  width: min(720px, calc(100% - 24px));
  background: color-mix(in oklab, var(--bg-1) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
  padding: 14px 16px;
  /* Subtle entrance — respects reduced motion via the @media block at end. */
  animation: cookie-in .35s var(--ease-out, cubic-bezier(.2,.7,.2,1)) both;
}
.cookie-banner__inner {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}
.cookie-banner__msg {
  margin: 0;
  flex: 1 1 280px;
  font-size: 13px;
  color: var(--fg-1);
  line-height: 1.5;
}
.cookie-banner__msg a { color: var(--fg-0); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn--sm {
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  min-height: 36px;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { animation: none; }
}


/* -----------------------------------------------------------------------------
   15. RESPONSIVE — final tweaks for components above
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .cta-block { padding: 32px 24px; }
  .testimonial { padding: 24px; }
  .service-card, .admin-card { padding: 22px; }
}
