/* ===========================================================
   Corofy — Reset + base typography
   =========================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  overflow-x: hidden;
}

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

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

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

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.12; font-weight: 700; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { text-wrap: pretty; }

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

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

::selection { background: var(--brand-600); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---------- Layout primitives ---------- */

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

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

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

.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }

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

.section--dark {
  background: var(--ink-900);
  color: var(--on-dark-muted);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--on-dark); }

/* ---------- Typographic helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.55;
}
.section--dark .eyebrow, .eyebrow--light { color: var(--accent-400); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  line-height: 1.68;
}
.section--dark .lead { color: var(--on-dark-muted); }

.section-head { max-width: 720px; margin-bottom: var(--s-9); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: var(--s-4); }

.text-gradient {
  background: linear-gradient(100deg, var(--brand-500) 0%, var(--accent-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose p + p { margin-top: var(--s-4); }
.prose p { color: var(--text-muted); }
.section--dark .prose p { color: var(--on-dark-muted); }

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

.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: var(--s-4);
  top: -100px;
  z-index: 200;
  background: var(--brand-600);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: var(--s-4); }
