/* ==========================================================================
   BASE.CSS — design tokens, reset, and global element styles
   Edit color/type tokens here to reskin the entire site from one place.
   ========================================================================== */

:root {
  /* ---- Color tokens ---- */
  --color-ink:        #12253E; /* primary text / dark sections */
  --color-ink-70:     rgba(18, 37, 62, 0.7);
  --color-paper:      #F7F8FA; /* page background */
  --color-white:      #FFFFFF;
  --color-teal:       #1F8A70; /* primary accent — links, CTAs, "live" state */
  --color-teal-dark:  #166B57;
  --color-slate:      #5B6B7C; /* secondary / muted text */
  --color-line:       #DCE1E6; /* hairline rules & grid borders */
  --color-amber:      #E8A33D; /* sparing highlight, used once or twice */

  /* ---- Type tokens ---- */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --fs-h1: clamp(2.5rem, 4.5vw + 1rem, 4.25rem);
  --fs-h2: clamp(1.9rem, 2.4vw + 1rem, 2.75rem);
  --fs-h3: clamp(1.25rem, 1vw + 1rem, 1.6rem);
  --fs-body-lg: 1.25rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;

  --lh-tight: 1.1;
  --lh-normal: 1.6;

  /* ---- Layout tokens ---- */
  --content-max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 6px;
  --section-pad: clamp(4rem, 8vw, 7rem);

  /* ---- Motion tokens ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-med: 400ms;
}

/*
 * Breakpoints used across layout.css / components.css / pages-services.css:
 *   1000px  minor hero/diagram spacing tweaks
 *    900px  two-column sections collapse to one
 *    820px  mobile nav takes over from the inline links
 *    720px  grids drop to a single column
 *  560/500px  final small-phone tightening
 * (Not stored as custom properties — @media conditions can't consume
 * var() without a preprocessor — just keep new breakpoints on this scale.)
 */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; color: var(--color-ink-70); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-teal);
  text-decoration: none;
}
a:hover { color: var(--color-teal-dark); }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 3px;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--tight { padding-block: calc(var(--section-pad) * 0.6); }

.section--dark {
  background: var(--color-ink);
  color: var(--color-white);
}
.section--dark p { color: rgba(255, 255, 255, 0.72); }
.section--dark h2, .section--dark h3 { color: var(--color-white); }

.section--bordered {
  border-top: 1px solid var(--color-line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 0.9em;
  height: 1px;
  background: currentColor;
}
.section--dark .eyebrow { color: #6FD3B8; }

.lead {
  font-size: var(--fs-body-lg);
  color: var(--color-slate);
  max-width: 46ch;
}
.section--dark .lead { color: rgba(255,255,255,0.72); }

.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(--color-ink);
  color: var(--color-white);
  padding: 0.6em 1em;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }