/* ==========================================================================
   Base – reset, typography, layout primitives
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-lg); line-height: var(--lh-snug); }

ul,
ol {
  margin: 0;
  padding: 0;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--orange-400);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--pink-200);
  color: var(--ink-900);
}

.sr-only {
  position: absolute !important;
  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: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--white);
  font-weight: 600;
  transition: top var(--dur-fast);
}

.skip-link:focus {
  top: 1rem;
}

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

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, var(--container-narrow));
}

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

.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

.section--sand { background: var(--sand); }
.section--white { background: var(--white); }
.section--soft { background: var(--gradient-soft); }
.section--ink {
  background: var(--ink-900);
  color: var(--white);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

@media (min-width: 960px) {
  .split { grid-template-columns: 1.05fr 1fr; }
  .split--reverse > :first-child { order: 2; }
  .split--top { align-items: start; }
}

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

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

/* Type helpers -------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-600);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

.section--ink .eyebrow { color: var(--pink-200); }

.lead {
  font-size: var(--fs-lg);
  color: var(--ink-700);
}

.section--ink .lead { color: var(--ink-300); }

.muted { color: var(--color-muted); }

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.highlight {
  position: relative;
  white-space: nowrap;
}

.highlight::after {
  content: "";
  position: absolute;
  left: -0.1em;
  right: -0.1em;
  bottom: 0.06em;
  height: 0.32em;
  z-index: -1;
  border-radius: 0.2em;
  background: var(--sun-400);
  opacity: 0.55;
  transform-origin: left;
  animation: highlight-in 1s 0.6s var(--ease-out) both;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

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

.section-head .eyebrow {
  justify-content: inherit;
}

.prose {
  max-width: 72ch;
}

.prose p,
.prose li {
  color: var(--ink-700);
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
}

/* Default size for inline icons (component styles override this) */
.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}
