/* ============================================================================
   BASE — reset, type, primitives
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, 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: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ── Type ─────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--weight-bold);   /* Non-negotiable from 23px up. */
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

.t-hero {
  font-size: var(--text-hero);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}
.t-display-xl {
  font-size: var(--text-display-xl);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}
.t-display {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}
.t-heading-lg { font-size: var(--text-heading-lg); }
.t-heading    { font-size: var(--text-heading); }
.t-heading-sm { font-size: var(--text-heading-sm); }

.t-subheading {
  font-size: var(--text-subheading);
  font-weight: var(--weight-bold);
  line-height: 1.25;
  letter-spacing: var(--tracking-heading);
}

.t-lede {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0;
}

.t-caption {
  font-size: var(--text-caption);
  line-height: 1.45;
  color: var(--text-muted);
}

.t-eyebrow {
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

p { margin: 0 0 var(--space-md); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

/* Preserve authored line breaks in display copy from config. */
.t-prewrap { white-space: pre-line; }

/* ── Layout primitives ────────────────────────────────────────────────── */

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

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

.section--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}
.section--dark .t-lede,
.section--dark .t-caption,
.section--dark .t-eyebrow { color: rgba(255, 255, 255, 0.66); }

.section--deck {
  background: var(--surface-deck);
  color: var(--text-on-dark);
}
.section--deck .t-lede,
.section--deck .t-caption,
.section--deck .t-eyebrow { color: rgba(255, 255, 255, 0.66); }

.stack   { display: flex; flex-direction: column; gap: var(--element-gap); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-lg); }

.hairline {
  border: 0;
  border-top: 1px solid var(--border-hairline);
  margin: 0;
}
.section--dark .hairline,
.section--deck .hairline { border-top-color: rgba(255, 255, 255, 0.16); }

/* ── Buttons — always a pill. No square buttons anywhere. ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 22px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
  min-height: 48px; /* touch target */
}

.btn--filled {
  background: var(--color-deep-ink);
  color: var(--color-pure-white);
}
.btn--filled:hover { background: #17262a; }

.btn--ghost {
  background: transparent;
  color: var(--color-deep-ink);
  border-color: var(--color-deep-ink);
}
.btn--ghost:hover { background: var(--color-deep-ink); color: var(--color-pure-white); }

/* Ghost on dark surfaces */
.section--dark .btn--ghost,
.section--deck .btn--ghost,
.footer .btn--ghost {
  color: var(--color-pure-white);
  border-color: rgba(255, 255, 255, 0.5);
}
.section--dark .btn--ghost:hover,
.section--deck .btn--ghost:hover,
.footer .btn--ghost:hover {
  background: var(--color-pure-white);
  color: var(--color-deep-ink);
}

.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Utilities ────────────────────────────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Interactive-only chrome. Hidden until the inline head script sets .js,
   so a no-JS visitor never sees a control that cannot work. */
html:not(.js) [data-requires-js] { display: none !important; }

[hidden] { display: none !important; }
