@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   HAPPIEST MINDS — "Engineering Broadsheet"
   A technical-editorial layer. Loads last; overrides styles.css.

   Rules of this system:
   · Zero border-radius. Corners are cut, never rounded.
   · Hairline ink rules do the work soft shadows used to do.
   · Display serif for voice, grotesque for substance, mono for fact.
   · One acid signal colour. Used as a block, not as a tint.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Surfaces — warm newsprint, not blue-grey SaaS */
  --paper:      #F2EFE7;
  --paper-2:    #E9E5DA;
  --paper-3:    #DED9CB;

  /* Ink */
  --ink:        #14150F;
  --ink-2:      #3A3B33;
  --ink-3:      #5F6057;          /* 4.8:1 on paper */

  /* Signal */
  --lime:       #CDF564;          /* block fills only — ink sits on top */
  --forest:     #0C5C42;          /* accent text, 6.4:1 on paper */
  --vermillion: #C63A24;          /* rare; white text 5.4:1 */

  /* Rules */
  --rule:       #14150F;
  --rule-soft:  rgba(20, 21, 15, 0.16);
  --hair:       1px solid var(--rule);
  --hair-soft:  1px solid var(--rule-soft);

  /* Legacy token remap — re-skins the 552 inline styles for free */
  --navy:       #14150F;
  --navy-light: #24251D;
  --navy-dark:  #0B0C08;
  --green:      #0C5C42;
  --green-dark: #084430;
  --green-glow: rgba(205, 245, 100, 0.35);
  --orange:     #C63A24;
  --orange-dark:#A32E1B;
  --white:      #F2EFE7;
  --off-white:  #E9E5DA;
  --light-gray: #DED9CB;
  --border:     rgba(20, 21, 15, 0.16);
  --text:       #14150F;
  --text-muted: #5F6057;
  --text-light: #7A7B70;

  /* Type */
  --font:       'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', Times, serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Geometry — everything is square */
  --radius: 0px;
  --radius-sm: 0px;
  --radius-lg: 0px;

  /* Hard offsets replace soft shadows */
  --shadow:     4px 4px 0 var(--ink);
  --shadow-md:  6px 6px 0 var(--ink);
  --shadow-lg:  10px 10px 0 var(--ink);

  --transition: 0.18s cubic-bezier(0.2, 0, 0, 1);
}

/* ── Base ─────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}

/* Square everything. The old sheet rounds ~60 selectors individually. */
*, *::before, *::after { border-radius: 0 !important; }

::selection { background: var(--lime); color: var(--ink); }

/* Visible focus — the old sheet shipped none. Non-negotiable. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.bg-dark :focus-visible, .bg-navy :focus-visible,
.nav :focus-visible, .footer :focus-visible {
  outline-color: var(--lime);
}

/* ── Typographic voice ────────────────────────────────────────── */
.section-title, .hero-title, .ph-title, h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.98;
}
.section-title {
  font-size: clamp(34px, 5.2vw, 62px);
  color: var(--ink);
  text-wrap: balance;
}
/* Emphasis is italic serif, not a colour swap */
.section-title span, .hero-title span {
  color: inherit;
  font-style: italic;
}
.section-title span::after { content: none; }

h3, h4 { font-family: var(--font); font-weight: 700; letter-spacing: -0.01em; }

.section-subtitle {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-3);
  max-width: 58ch;
}

/* ── Labels become filed references: "— 01 / SERVICES" ────────── */
.label, .ph-label, .hero-cap-label, .breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--ink);
  border-radius: 0;
  display: block;
}
.bg-dark .label, .bg-navy .label, .hero .label { color: var(--paper); }
.bg-dark .label::before, .bg-navy .label::before, .hero .label::before { background: var(--lime); }

/* ── Sections divided by real rules ───────────────────────────── */
.section { padding: 104px 0; border-top: var(--hair); }
.section.bg-light { background: var(--paper-2); }
.section.bg-white { background: var(--paper); }
.bg-dark, .bg-navy { background: var(--ink); color: var(--paper); }
.bg-dark .section-title, .bg-navy .section-title { color: var(--paper); }
.bg-dark .section-subtitle, .bg-navy .section-subtitle { color: rgba(242, 239, 231, 0.66); }

/* ── Buttons: square, mono, hard-shadow ───────────────────────── */
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 15px 24px;
  border: var(--hair);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), color var(--transition);
}
.btn-primary {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-primary:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); background: var(--lime); }
.btn-secondary, .btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover, .btn-outline:hover { background: var(--ink); color: var(--paper); transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.btn-orange { background: var(--vermillion); color: #fff; border-color: var(--ink); }
.btn-orange:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }

.bg-dark .btn-secondary, .bg-navy .btn-secondary,
.bg-dark .btn-outline, .footer .btn-outline,
.cta-section .btn-secondary, .cta-section .btn-outline {
  color: var(--paper); border-color: var(--paper);
}
.bg-dark .btn-secondary:hover, .bg-navy .btn-secondary:hover,
.cta-section .btn-secondary:hover {
  background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--lime);
}
.cta-section .btn-primary:hover, .bg-dark .btn-primary:hover { box-shadow: 5px 5px 0 var(--paper); }

/* ── Navigation: a masthead, not a floating pill bar ──────────── */
.nav {
  background: var(--paper);
  border-bottom: var(--hair);
  backdrop-filter: none;
  box-shadow: none;
}
.nav.scrolled { background: var(--paper); box-shadow: none; border-bottom: var(--hair); }
.nav-inner { height: 72px; }
.logo-mark {
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-display);
  font-weight: 400;
  border: none;
}
.logo-text { font-family: var(--font); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.logo-text span { color: var(--ink); font-style: normal; opacity: 0.45; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--ink); }
.nav-cta { padding: 12px 20px; }
.nav-hamburger span { background: var(--ink); }
.nav-mobile { background: var(--paper); border-top: var(--hair); }
.nav-mobile a { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; border-bottom: var(--hair-soft); }

/* ── Cards: a shared grid of hairlines, not floating rounded boxes ── */
.service-card, .value-card, .team-card, .award-card, .testimonial-card,
.tech-item, .feature-item, .accordion-item, .contact-form, .timeline-item,
.hero-float-card, .process-step, .contact-item {
  background: var(--paper);
  border: var(--hair);
  box-shadow: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.service-card:hover, .value-card:hover, .team-card:hover,
.award-card:hover, .testimonial-card:hover, .tech-item:hover {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0 var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}
.bg-dark .service-card, .bg-navy .service-card,
.bg-dark .tech-item, .bg-navy .tech-item,
.bg-dark .award-card, .bg-navy .award-card {
  background: var(--ink); border-color: rgba(242,239,231,0.3); color: var(--paper);
}
.bg-dark .service-card:hover, .bg-navy .service-card:hover,
.bg-dark .tech-item:hover, .bg-navy .tech-item:hover,
.bg-dark .award-card:hover, .bg-navy .award-card:hover {
  box-shadow: 6px 6px 0 var(--lime); border-color: var(--lime);
}

/* Icons: square ink plates with the acid signal */
.service-icon, .value-icon, .award-icon, .icon-box, .icon-box-sm, .icon-box-lg,
.step-circle, .float-icon, .ci-icon, .hmc-icon {
  background: var(--ink) !important;
  color: var(--lime) !important;
  border: none;
  box-shadow: none;
}
.service-icon svg, .value-icon svg, .award-icon svg, .icon-box svg,
.icon-box-sm svg, .icon-box-lg svg, .ci-icon svg { stroke: var(--lime); color: var(--lime); }

/* ── Tags / chips / pills: mono, square, outlined ─────────────── */
.tag, .sd-chip, .ttag, .ttag-dark, .svc-pill, .outcome-pill,
.hchip, .office-tag, .service-tags span, .hero-badge, .hero-img-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: var(--hair);
  background: transparent;
  color: var(--ink);
  padding: 7px 11px;
  box-shadow: none;
}
.ttag-dark, .hero-badge, .hero-img-badge {
  border-color: rgba(242,239,231,0.4); color: var(--paper); background: transparent;
}
.svc-pill:hover, .ttag:hover, .sd-chip:hover { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.ttag-dark:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }

/* ── Imagery: duotone so photos read art-directed, not stock-grab ── */
.hero-img-wrap img, .hero-mosaic img, .team-avatar img,
.hm-main img, .hm-right img, .sd-visual img, .award-card img {
  filter: grayscale(1) contrast(1.06) sepia(0.14);
  transition: filter 0.4s ease;
}
.team-card:hover .team-avatar img,
.hero-img-wrap:hover img, .hm-main:hover img { filter: grayscale(0.55) contrast(1.02) sepia(0.05); }
img { border: none; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-2);
}
.form-group input, .form-group textarea, .form-group select {
  background: var(--paper);
  border: var(--hair);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  padding: 13px 14px;
  box-shadow: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); background: var(--paper);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-light); }

/* ── Footer: a colophon ───────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper); border-top: var(--hair); }
.footer-main { border-bottom: 1px solid rgba(242,239,231,0.18); }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--lime);
}
.footer-links a, .footer-desc, .footer-copy { color: rgba(242,239,231,0.66); }
.footer-links a:hover { color: var(--lime); }
.footer .logo-mark { background: var(--lime); color: var(--ink); }
.footer .logo-text, .footer .logo-text span { color: var(--paper); opacity: 1; }
.social-btn {
  border: 1px solid rgba(242,239,231,0.35);
  background: transparent; color: var(--paper);
  font-family: var(--font-mono); font-size: 11px;
  width: 40px; height: 40px;
}
.social-btn:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--paper); }
.footer-bottom { border-top: 1px solid rgba(242,239,231,0.18); }
.footer-bottom a { color: rgba(242,239,231,0.66); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-bottom a:hover { color: var(--lime); }
.footer-copy { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }

/* ── Misc components realigned to the system ──────────────────── */
.stats-bar, .cta-section { background: var(--ink); color: var(--paper); border-top: var(--hair); }
.stats-bar-item { border-right: 1px solid rgba(242,239,231,0.18); }
.stats-bar-item:last-child { border-right: none; }
.scroll-top {
  background: var(--ink); color: var(--lime);
  border: var(--hair); box-shadow: none;
}
.scroll-top:hover { background: var(--lime); color: var(--ink); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.accordion-header { font-family: var(--font); font-weight: 700; }
.accordion-item { border-bottom: var(--hair); }
.services-subnav { background: var(--paper); border-bottom: var(--hair); box-shadow: none; }
.subnav-scroll a {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-2); border: 1px solid transparent;
}
.subnav-scroll a:hover { color: var(--ink); border-color: var(--ink); }
.practice-header { border-top: var(--hair); border-bottom: var(--hair); background: var(--paper-2); }
.ph-num { font-family: var(--font-display); color: var(--ink); opacity: 0.18; }
.sd-visual-number { font-family: var(--font-display); color: var(--ink); opacity: 0.16; }
.check-dot { background: var(--lime); border: 1px solid var(--ink); }
.check-dot svg { stroke: var(--ink); }
.sd-check { color: var(--ink-2); }
.timeline-year, .ci-label, .hero-stat-item span, .team-role, .award-org {
  font-family: var(--font-mono); letter-spacing: 0.06em;
}
.testimonial-text { font-family: var(--font-display); font-size: 21px; line-height: 1.35; color: var(--ink); }
.star { color: var(--ink); }
.author-name { font-weight: 700; }
.author-title, .team-role { color: var(--ink-3); font-size: 12px; text-transform: uppercase; }
.breadcrumb { color: var(--ink-3); }

/* Kill the AI-tell decorations outright */
.hero-orb, .hero-orb-1, .hero-orb-2, .page-hero-orb, .hero-grid-bg { display: none !important; }

/* ── Reduced motion ───────────────────────────────────────────── */
@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;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   SIGNATURE COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Nav spacing (mono is wider than Inter at the same size) ───── */
.nav-links { gap: 34px; }
.nav-links a::before { content: none !important; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero-ed {
  background: var(--paper);
  padding: 56px 0 0;
  border-bottom: var(--hair);
  position: relative;
}

/* Dateline */
.issue-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 14px;
  border-bottom: var(--hair);
}
.issue-line .il-brand { font-weight: 700; color: var(--ink); }
.issue-line .il-sep { opacity: 0.4; }
.issue-line .il-rule { flex: 1 1 40px; height: 1px; background: var(--rule-soft); }
.issue-line .il-live { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); }
.issue-line .il-live i {
  width: 6px; height: 6px; background: var(--forest);
  display: block; animation: blip 2.4s ease-in-out infinite;
}
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Asymmetric split — 7/5, not a symmetric 50/50 template */
.hero-ed-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0;
  align-items: stretch;
}
.hero-ed-main { padding: 64px 56px 72px 0; border-right: var(--hair); }

.hero-ed-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 6.4vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 30px;
}
/* The emphasis: italic serif on an acid block — one gesture, used once */
.hero-ed-title em {
  font-style: italic;
  background: var(--lime);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.12em;
}

.hero-ed-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 34px;
}
.hero-ed-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-ed-actions .btn { display: inline-flex; align-items: center; gap: 9px; }

.now-shipping {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-top: var(--hair); padding-top: 18px;
}
.ns-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
}
.ns-word {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(24px, 3vw, 34px); color: var(--ink); line-height: 1;
}
.ns-word::after {
  content: ''; display: inline-block; width: 2px; height: 0.82em;
  background: var(--forest); margin-left: 4px; vertical-align: baseline;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Capability index — the filed list */
.hero-ed-index { display: flex; flex-direction: column; padding-left: 0; }
.hei-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 22px 0 14px 28px; border-bottom: var(--hair);
}
.hei-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 15px 0 15px 28px;
  border-bottom: var(--hair-soft);
  color: var(--ink);
  transition: background var(--transition), padding-left var(--transition);
}
.hei-row:hover { background: var(--lime); padding-left: 36px; }
.hei-n {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.06em;
}
.hei-row:hover .hei-n, .hei-row:hover .hei-m { color: var(--ink); }
.hei-t { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.hei-m {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.hei-figs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: auto; border-top: var(--hair); padding-left: 28px;
}
.hei-figs div { padding: 20px 8px 22px 0; }
.hei-figs b {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 34px; line-height: 1; color: var(--ink); letter-spacing: -0.02em;
}
.hei-figs span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ── Ticker ───────────────────────────────────────────────────── */
.ticker {
  border-top: var(--hair);
  background: var(--ink);
  overflow: hidden;
  padding: 11px 0;
}
.ticker-track {
  display: flex; align-items: center; gap: 26px;
  width: max-content;
  animation: ticker 46s linear infinite;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper);
}
.ticker-track i { color: var(--lime); font-style: normal; font-size: 8px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-ed-grid { grid-template-columns: 1fr; }
  .hero-ed-main { border-right: none; border-bottom: var(--hair); padding: 44px 0 48px; }
  .hei-head, .hei-row, .hei-figs { padding-left: 0; }
  .hei-row:hover { padding-left: 8px; }
  .hero-ed-index { padding-bottom: 20px; }
}
@media (max-width: 640px) {
  .hero-ed { padding-top: 36px; }
  .section { padding: 68px 0; }
  .hero-ed-title { font-size: clamp(34px, 10vw, 52px); }
  .hei-row { grid-template-columns: 28px 1fr; }
  .hei-m { display: none; }
  .hei-figs b { font-size: 26px; }
  .nav-links { display: none; }
}

/* ── Specificity corrections against styles.css ───────────────── */

/* .nav is position:fixed (72px tall) — hero must clear it */
.hero-ed { padding-top: calc(72px + 42px); }

/* .nav-logo .logo-mark (0,2,0) outranks .logo-mark (0,1,0) */
.nav-logo .logo-mark {
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  width: 36px; height: 36px;
}
.nav-logo .logo-text { color: var(--ink); }
.nav-logo .logo-text span { color: var(--ink); opacity: 0.42; }
.footer .nav-logo .logo-mark { background: var(--lime); color: var(--ink); }
.footer .nav-logo .logo-text,
.footer .nav-logo .logo-text span { color: var(--paper); opacity: 1; }

/* Original inset the underline by 16px to match its old padding */
.nav-links a:hover::after,
.nav-links a.active::after { left: 0; right: 0; }

/* ── Dark-surface token rebinding ─────────────────────────────────
   Inline styles across the pages reference var(--green)/var(--navy).
   On ink, forest green fails contrast badly — so inside any dark
   container those tokens resolve to the acid signal and to paper.
   One block re-corrects every inline style nested beneath it.     */
.bg-dark, .bg-navy, .footer, .stats-bar, .cta-section, .ticker,
.hero-float-card, .practice-header.bg-dark {
  --green:      #CDF564;
  --green-dark: #B9E44A;
  --navy:       #F2EFE7;
  --navy-dark:  #F2EFE7;
  --text:       #F2EFE7;
  --text-muted: rgba(242, 239, 231, 0.66);
  --text-light: rgba(242, 239, 231, 0.48);
  --border:     rgba(242, 239, 231, 0.22);
  --white:      #F2EFE7;
  --orange:     #F0845F;
}
.bg-dark .text-green, .bg-navy .text-green,
.stats-bar .text-green, .cta-section .text-green,
.footer .text-green { color: var(--lime); }

/* Scroll-to-top: ink plate, acid arrow */
.scroll-top { color: var(--lime); }
.scroll-top svg { stroke: currentColor; color: inherit; }
.scroll-top:hover svg { stroke: var(--ink); }

/* Stats bar figures set in the display face */
.stats-bar .num, .stats-bar-item .num {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em;
}
.stats-bar .lbl, .stats-bar-item .lbl {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(242,239,231,0.62);
}

/* ── Icon plates: recolour the glyph itself ───────────────────────
   Icons carry inline stroke/fill attributes on their child nodes,
   which don't inherit from the <svg>. Target the descendants.
   Scoped to icon plates so brand/tech logos keep their own colours. */
.service-icon svg *, .value-icon svg *, .award-icon svg *,
.icon-box svg *, .icon-box-sm svg *, .icon-box-lg svg *,
.step-circle svg *, .ci-icon svg *, .float-icon svg *, .hmc-icon svg * {
  stroke: var(--lime);
}
.service-icon svg [fill]:not([fill="none"]), .icon-box svg [fill]:not([fill="none"]),
.value-icon svg [fill]:not([fill="none"]), .award-icon svg [fill]:not([fill="none"]) {
  fill: var(--lime);
}

/* Category rules above each service group */
.services-grid + .services-grid, .practice-header + .services-grid { margin-top: 0; }

/* ── Duotone, applied to all editorial imagery ────────────────────
   Excludes .tech-item (vendor logos must keep their brand colour). */
.section img, .hero-ed img, .page-hero img, main img,
.service-card img, .testimonial-card img, .value-card img {
  filter: grayscale(1) contrast(1.06) sepia(0.14);
  transition: filter 0.4s ease;
}
.tech-item img, .tech-item svg, .tech-item svg * { filter: none; }
.service-card:hover img, .testimonial-card:hover img, .value-card:hover img,
.section a:hover img {
  filter: grayscale(0.5) contrast(1.02) sepia(0.04);
}

/* Image frames get a rule, so photos sit in the grid rather than float */
.section img { border-bottom: var(--hair); }
.team-avatar img, .author-avatar img { border-bottom: none; }

/* Legal links wrap instead of clipping at the container edge */
.footer-bottom { flex-wrap: wrap; gap: 14px 22px; }
.footer-links-legal, .footer-bottom > div { flex-wrap: wrap; gap: 14px 22px; }

/* ── Inner-page mastheads are ink; rebind their tokens too ────── */
.page-hero {
  --green:      #CDF564;
  --green-dark: #B9E44A;
  --navy:       #F2EFE7;
  --navy-dark:  #F2EFE7;
  --text:       #F2EFE7;
  --text-muted: rgba(242, 239, 231, 0.66);
  --text-light: rgba(242, 239, 231, 0.48);
  --border:     rgba(242, 239, 231, 0.22);
  --white:      #F2EFE7;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--hair);
}
.page-hero .label { color: var(--paper); }
.page-hero .label::before { background: var(--lime); }
.page-hero h1, .page-hero .section-title {
  font-family: var(--font-display); font-weight: 400; color: var(--paper);
}
.page-hero h1 span, .page-hero .section-title span { font-style: italic; color: var(--lime); }
.page-hero .breadcrumb { color: rgba(242,239,231,0.6); }
.page-hero .breadcrumb a { color: var(--paper); }
.page-hero .breadcrumb a:hover { color: var(--lime); }

/* Pills on ink need light rules, not ink-on-ink */
.page-hero .svc-pill, .page-hero .tag, .page-hero .ttag {
  border-color: rgba(242, 239, 231, 0.38);
  color: var(--paper);
}
.page-hero .svc-pill:hover, .page-hero .ttag:hover {
  background: var(--lime); color: var(--ink); border-color: var(--lime);
}

/* Inline field errors */
.field-error {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--vermillion);
  margin: 7px 0 0;
}
.form-success:focus { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ── Reveal offsets must not create horizontal overflow ───────────
   .reveal-left/.reveal-right translate ±32px while un-revealed. On
   wide screens the container gutter absorbs that; at phone widths the
   elements are full-bleed, so the offset pushes the document wider
   than the viewport (masked only by body{overflow-x:hidden}).
   Below the tablet breakpoint, reveal vertically instead.          */
@media (max-width: 860px) {
  .reveal-left, .reveal-right { transform: translateY(26px); }
  .reveal-left.visible, .reveal-right.visible { transform: none; }
}

/* ── Inline grids must still collapse on small screens ────────────
   23 layouts across the pages declare grid-template-columns as an
   inline style, which no media query can reach. !important here is
   the only lever that works, and it is scoped to small viewports.  */
@media (max-width: 860px) {
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns:repeat(6"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (max-width: 600px) {
  [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Long unbroken strings (emails, URLs) must not push the layout wide */
body { overflow-wrap: break-word; }
