/**
 * 42ostriches — Base layer
 * Reset + global element defaults. No component-specific rules here.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The off-canvas mobile nav panel (translated fully off-screen via
     transform) would otherwise widen the page's scrollable area on
     phones, causing a stray horizontal scroll that clips right-aligned
     fixed content like the WhatsApp button. Standard fix for that
     off-canvas-drawer bug — keep this on <html> only, not <body>, or
     body becomes its own scroll container (breaks position: sticky). */
  overflow-x: hidden;
}

@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;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--color-ink-900);
  background: var(--color-paper-000);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-900);
  line-height: var(--lh-tight);
}
h2 {
  font-size: var(--fs-800);
}
h3 {
  font-size: var(--fs-700);
}
h4 {
  font-size: var(--fs-600);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: normal;
}

p {
  max-width: 65ch;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.15em;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ---- Accessibility helpers ---- */

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  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;
  top: -100%;
  left: var(--space-4);
  z-index: 1200;
  background: var(--color-ink-900);
  color: var(--color-paper-000);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  top: var(--space-4);
}

/* ---- Layout utilities ---- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

.section--alt {
  background: var(--color-paper-050);
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-8);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-200);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-red-600);
  margin-bottom: var(--space-3);
}

.eyebrow::before {
  content: "";
  width: 0.85em;
  height: 2px;
  background: currentColor;
}

.lead {
  font-size: var(--fs-500);
  color: var(--color-ink-700);
  max-width: 60ch;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ---- Mobile spacing overrides ----
   Tightens the global rhythm (section padding, heading gaps) on small
   screens only, so the page feels compact without changing desktop at all. */
@media (max-width: 640px) {
  :root {
    --section-pad-y: 2.25rem;
    --space-8: 2.5rem;
    --space-9: 3rem;
  }
  .section-head {
    margin-bottom: var(--space-6);
  }
}
