/* ============================================================
   base.css — reset, typography, layout primitives, utilities
   Depends only on tokens.css.
   ============================================================ */

*, *::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(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  margin: 0;
  font-feature-settings: "liga" 1, "dlig" 1;
}

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

button { font: inherit; cursor: pointer; }

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

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

.section { padding-block: var(--section-space); }
.section--surface-low { background: var(--surface-low); }
.section--surface { background: var(--surface); }

/* ---- Shared section heading ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.section__heading {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  text-align: center;
  margin: 0;
}

.section__head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* thin centered divider, 40-60% feel (fixed short width) */
.rule {
  width: 80px;
  height: var(--hairline);
  background: var(--line);
  border: 0;
  margin: 1.5rem auto 0;
}

/* ---- Buttons (sharp, editorial) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.1rem 2.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-on);
  border-radius: var(--radius);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), opacity 0.35s var(--ease);
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--btn-bg); color: var(--btn-on); border-color: var(--btn-bg); }

.btn[disabled] { opacity: 0.5; cursor: default; }

/* ---- Scroll reveal (driven by js/reveal.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--reveal-duration) var(--ease),
              transform var(--reveal-duration) var(--ease);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }

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

/* ---- Utilities ---- */
.is-hidden { display: none !important; }
.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;
}
