/* ============================================
   Base typography & layout helpers
   ============================================ */

html, body {
  font-feature-settings: "ss01", "cv11";
}

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

.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  position: relative;
}

.section--ink { background: var(--ink); color: var(--paper); }
.section--ink-soft { background: var(--ink-soft); color: var(--paper); }
.section--paper-soft { background: var(--paper-soft); }

.section__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin-bottom: var(--s-9);
}

@media (min-width: 900px) {
  .section__head {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
    gap: var(--s-10);
  }
  .section__head--center {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-overline);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
}

.section--ink .eyebrow,
.section--ink-soft .eyebrow { color: var(--accent-bright); }

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.section__head--center .eyebrow {
  justify-self: center;
}

.lede {
  font-size: var(--fs-lead);
  line-height: var(--lh-loose);
  color: var(--ink-muted);
  max-width: 56ch;
}

.section--ink .lede,
.section--ink-soft .lede { color: var(--ink-faint); }

/* Type scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: inherit;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: var(--ls-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); letter-spacing: var(--ls-snug); font-weight: 700; }
h5 { font-size: var(--fs-h5); line-height: var(--lh-snug); letter-spacing: var(--ls-snug); font-weight: 700; }

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-overline);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section--ink .text-mono,
.section--ink-soft .text-mono { color: var(--ink-faint); }

/* Utilities */
.flow > * + * { margin-top: var(--s-4); }
.flow-lg > * + * { margin-top: var(--s-6); }
.flow-xl > * + * { margin-top: var(--s-8); }

.muted { color: var(--ink-muted); }
.section--ink .muted,
.section--ink-soft .muted { color: var(--ink-faint); }

.accent-text { color: var(--accent); }
.section--ink .accent-text { color: var(--accent-bright); }

.divider {
  width: 100%;
  height: 1px;
  background: var(--paper-line);
  border: 0;
}

.section--ink .divider,
.section--ink-soft .divider { background: var(--ink-line); }

.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;
}

/* Scroll reveal (initial state) */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
