@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ---- Design tokens ---------------------------------------------------- */
:root {
  --ink: #111111;
  --ink-soft: #2b2b28;
  --paper: #ffffff;
  --panel: #f5f5f3;
  --panel-deep: #ececea;
  --line: #dededa;
  --muted: #6b6b65;
  --muted-soft: #93938c;

  --font-display: 'Oswald', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --container: 1180px;
  --gap: clamp(1.25rem, 2.5vw, 2.5rem);

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(17,17,17,0.04), 0 8px 24px -12px rgba(17,17,17,0.12);
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.overflow-x {
  overflow-x: auto;
}

/* ---- Type scale --------------------------------------------------------*/
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 700; letter-spacing: 0.002em; line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 700; line-height: 1.16; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.01em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }
.body-copy { max-width: 62ch; color: var(--ink-soft); }
.body-copy + .body-copy { margin-top: 1rem; }

/* ---- Buttons ------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.95rem 1.75rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---- Header -------------------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}
.logo-link svg { height: 40px; width: auto; max-width: 100%; }
@media (max-width: 480px) {
  .logo-link svg { height: 32px; }
  .header-actions .btn-solid { display: none; }
}
.nav-desktop {
  display: none;
}
.nav-desktop ul { display: flex; gap: clamp(1rem, 1.8vw, 1.85rem); }
.nav-desktop a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
  transition: right 0.18s ease;
}
.nav-desktop a:hover::after, .nav-desktop a.active::after { right: 0; }
.nav-desktop a.active { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }
.header-phone {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  gap: 0.5rem;
  align-items: center;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  inset: 0;
  top: 65px;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 39;
  overflow-y: auto;
}
.nav-mobile.is-open { transform: translateX(0); }
.nav-mobile ul { padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem); display: flex; flex-direction: column; }
.nav-mobile li { border-bottom: 1px solid var(--line); }
.nav-mobile a { display: block; padding: 1.1rem 0; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.nav-mobile .nav-mobile-contact { padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 0; font-family: var(--font-body); font-size: 0.95rem; color: var(--muted); }
.nav-mobile .nav-mobile-cta-wrap { padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem; }
.nav-mobile .nav-mobile-cta { display: flex; justify-content: center; width: 100%; }

@media (min-width: 1040px) {
  .nav-desktop { display: block; }
  .nav-toggle, .nav-mobile { display: none; }
}
@media (min-width: 1240px) {
  .header-phone { display: inline-flex; }
}

/* ---- Waveform hero graphic ----------------------------------------------*/
.waveform {
  width: 100%;
  height: auto;
  display: block;
}
.waveform path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.waveform-animated path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  /* Draws the full line in once, then hands off to an infinite "signal flowing along the
     wire" loop — a small repeating dash/gap pattern sliding along the path forever, rather
     than the one-shot reveal just sitting still afterward. */
  animation: draw 2.4s cubic-bezier(0.65, 0, 0.35, 1) forwards,
             flow 4s linear infinite 2.4s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow {
  0%   { stroke-dasharray: 18 12; stroke-dashoffset: 0; }
  100% { stroke-dasharray: 18 12; stroke-dashoffset: -300; }
}
@media (prefers-reduced-motion: reduce) {
  .waveform-animated path { stroke-dashoffset: 0; animation: none; }
}

/* ---- Hero ----------------------------------------------------------------*/
.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}
.hero-copy .eyebrow { margin-bottom: 1rem; display: block; }
.hero-copy h1 { margin-bottom: 1.4rem; }
.hero-copy .lede { margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.hero-wave-wrap { border: 1px solid var(--line); background: var(--panel); padding: 1.5rem; }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
}
.hero-stats div { padding: 1.1rem 0.5rem 0; }
.hero-stats dt { font-family: var(--font-display); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.hero-stats dd { margin: 0.35rem 0 0; font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; }
@media (min-width: 500px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}

/* ---- Section shell --------------------------------------------------------*/
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-border-top { border-top: 1px solid var(--line); }
.section-panel { background: var(--panel); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head .eyebrow { display: block; margin-bottom: 0.9rem; }
.section-head h2 { margin-bottom: 0.9rem; }

/* ---- Service grid (home) --------------------------------------------------*/
.service-grid {
  display: grid;
  gap: 1.25rem;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.service-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 4px 8px rgba(17,17,17,0.06), 0 16px 32px -14px rgba(17,17,17,0.18); }
.service-icon {
  width: 60px;
  height: 60px;
  padding: 15px;
  border-radius: 50%;
  background: var(--panel);
  flex-shrink: 0;
  transition: background 0.18s ease;
}
.service-card:hover .service-icon { background: var(--ink); }
.service-card:hover .service-icon svg { stroke: var(--paper); }
.service-icon svg { width: 100%; height: 100%; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.18s ease; }
.service-card h3 { margin-bottom: 0.15rem; }
.service-card p { color: var(--muted); font-size: 0.95rem; }
.service-card .card-link { margin-top: auto; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.03em; display: inline-flex; align-items: center; gap: 0.4rem; padding-top: 0.5rem; }
.service-card .card-link .btn-arrow { transition: transform 0.15s ease; }
.service-card:hover .card-link .btn-arrow { transform: translateX(3px); }

@media (min-width: 700px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .service-grid.grid-5 { grid-template-columns: repeat(5, 1fr); }
}

/* ---- Category page: scope list -------------------------------------------*/
.scope-list { display: grid; gap: 1.25rem; }
.scope-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem 1.25rem;
  align-items: start;
}
.scope-item .num {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.scope-item h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.scope-item p { color: var(--muted); font-size: 0.92rem; }

@media (min-width: 760px) {
  .scope-list { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Process strip ---------------------------------------------------------*/
.process-strip { display: grid; gap: 1.25rem; counter-reset: step; }
.process-step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  padding-top: 3.25rem;
}
.process-step .service-icon { margin-bottom: 1rem; }
.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  right: clamp(1.75rem, 3vw, 2.25rem); top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted-soft);
}
@media (min-width: 800px) {
  .process-strip { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Callout / CTA band ------------------------------------------------------*/
.cta-band {
  background: var(--ink);
  color: var(--paper);
}
.cta-band .eyebrow { color: var(--muted-soft); }
.cta-band h2 { color: var(--paper); }
.cta-band .lede { color: #d8d8d3; }
.cta-band .btn-outline { border-color: var(--paper); color: var(--paper); }
.cta-band .btn-outline:hover { background: var(--paper); color: var(--ink); }
.cta-band .btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-band .btn-solid:hover { background: #ececea; }

/* ---- Trust strip (logos/badges/stat row) --------------------------------------*/
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  justify-content: space-between;
}
.trust-item { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }
.trust-item svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.6; }

/* ---- Category cross-links (bottom of category pages) ---------------------------*/
.related-grid { display: grid; gap: 1rem; }
.related-card {
  border: 1px solid var(--line);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.related-card:hover { background: var(--panel); }
@media (min-width: 700px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Contact page --------------------------------------------------------------*/
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3rem); }
.contact-card {
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.contact-method { display: flex; gap: 1rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.contact-method:last-child { border-bottom: none; }
.contact-method .icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.contact-method .icon svg { width: 100%; height: 100%; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.contact-method dt { font-family: var(--font-display); font-weight: 500; font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.contact-method dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.hours-table td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.hours-table td:last-child { text-align: right; font-family: var(--font-mono); color: var(--muted); }
.hours-table tr:last-child td { border-bottom: none; }
.service-area-map { border: 1px solid var(--line); background: var(--panel); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }

@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Footer ----------------------------------------------------------------------*/
.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-top { padding-block: clamp(2.5rem, 6vw, 4rem); display: grid; gap: 2.5rem; }
.footer-brand svg { height: 36px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 500; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted-soft);
}

@media (min-width: 700px) {
  .footer-top { grid-template-columns: 1.3fr repeat(3, 1fr); }
}

/* ---- Page header (category/contact pages) ------------------------------------------*/
.page-hero { padding-block: clamp(2.5rem, 6vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { display: block; margin-bottom: 1rem; }
.page-hero h1 { margin-bottom: 1.1rem; }
.breadcrumb { font-family: var(--font-display); font-weight: 500; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; display: flex; gap: 0.5rem; align-items: center; }
.breadcrumb a:hover { color: var(--ink); }

/* ---- Utility ------------------------------------------------------------------------*/
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; z-index: 100;
  transition: top 0.15s ease;
  font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { top: 1rem; }

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