/* ==========================================================================
   base.css — reset, fonts, element defaults, layout primitives, a11y
   Every value references a token from tokens.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Self-hosted Inter (variable, v20 from Google Fonts — SIL Open Font License).
   Two subsets: latin covers the site; latin-ext is a fallback for accented
   client names. Weight axis 100-900 — one file serves every weight token.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* offset in-page anchor targets so they clear the fixed header */
  scroll-padding-top: calc(var(--header-h) + var(--space-3));
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background: var(--surface-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--header-h); /* clears the fixed header */
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: var(--hover-underline);
}

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typography — headings use the fluid sizes; one h1 per page
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1-fluid);
  font-weight: var(--weight-bold);
}

h2 {
  font-size: var(--text-h2-fluid);
  font-weight: var(--weight-semibold);
}

h3 {
  font-size: var(--text-h3-fluid);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
}

p {
  max-width: 68ch;
}

strong,
b {
  font-weight: var(--weight-semibold);
}

small {
  font-size: var(--text-small);
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Shared eyebrow: the "SERVICES" above "What We Bring to the Table" pattern.
   One treatment, site-wide. */
.eyebrow {
  display: block;
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-2);
}

.lead {
  font-size: var(--text-h4);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--section-y-sm);
}

.section--tint {
  background: var(--surface-2);
}

.section--accent {
  background: var(--surface-accent);
}

.section--inverse {
  background: var(--surface-inverse);
  color: #ffffff;
}

.section__head {
  max-width: 60ch;
  margin-bottom: var(--space-5);
}

.section__head p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

.stack > * + * {
  margin-top: var(--space-3);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--gutter-lg);
  }

  .section {
    padding-block: var(--section-y);
  }
}

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; /* screen-reader-only utility; standard pattern, must not affect layout */
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: var(--space-2);
  top: 0;
  z-index: calc(var(--z-offcanvas) + 1);
  padding: var(--space-1) var(--space-3);
  background: var(--surface-1);
  color: var(--color-primary);
  border: var(--border-width) solid var(--color-border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transform: translateY(-120%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Visible focus for keyboard users only */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Reduced motion — pauses the aurora rotation (colours/blur retained,
   see aurora.css), disables transitions and smooth scroll.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important; /* neutralise looping animations without removing final state */
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
