/* ============================================================
   Autumn Air — Base: reset, elements, typography, primitives
   ============================================================ */

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

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

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

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

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Gold ring is invisible on warm-white sections: use deep copper there */
.section--light :focus-visible { outline-color: var(--copper-deep); }

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

/* ---------- Headings ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--text);
  text-wrap: balance;
}
h4, h5 { font-family: var(--font-body); font-weight: 600; color: var(--text); }

p { text-wrap: pretty; }
p.lead {
  font-size: var(--text-lg);
  color: var(--paper-dim);
  max-width: 60ch;
}

strong { font-weight: 600; color: var(--text); }

/* ---------- 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(--space-section); position: relative; }
:where(section[id], [id].svc-row, main [id]) { scroll-margin-top: 6rem; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--light { background: var(--paper); color: var(--ink-on-light); }
.section--light h1, .section--light h2, .section--light h3 { color: var(--ink-on-light); }
.section--deep { background: var(--ink-850); }

/* section header block */
.section-head { max-width: 62ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--text-3xl); }
.section-head p { margin-top: 1.1rem; color: var(--text-mute); font-size: var(--text-lg); }
.section--light .section-head p { color: var(--mute-on-light); }

/* Eyebrow / kicker — deliberate brand system: maple glyph + word.
   Used as section lead-in, not repeated above every heading. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--copper-bright);
  margin-bottom: 1.1rem;
}
.section--light .kicker { color: var(--copper-deep); }
.kicker::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--copper-btn);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 1.05em 1.8em;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out-quart),
              box-shadow var(--dur) var(--ease-out-expo),
              background-color var(--dur-fast) ease;
  will-change: transform;
}
.btn:hover { background: var(--copper-btn-hover); transform: translateY(-2px); box-shadow: var(--shadow-copper); }
.btn:active { transform: translateY(0); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: #20170a; }
.btn--gold:hover { background: var(--gold-soft); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--ink-500);
}
.btn--ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--copper); transform: translateY(-2px); box-shadow: none; }

.section--light .btn--ghost { color: var(--ink-on-light); border-color: var(--line-on-light); }
.section--light .btn--ghost:hover { background: rgba(0,0,0,0.04); border-color: var(--copper); }

.btn--lg { padding: 1.2em 2.2em; font-size: 1rem; }
.btn--sm { padding: 0.78em 1.3em; font-size: 0.86rem; }
.btn svg { width: 1.05em; height: 1.05em; }

/* inline icon wrapper */
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex-shrink: 0; }
.ico svg { width: 1.2em; height: 1.2em; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* text link with arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 600; color: var(--copper-bright);
  transition: gap var(--dur) var(--ease-out-expo), color var(--dur-fast);
}
.tlink:hover { gap: 0.8em; color: var(--gold); }
.section--light .tlink { color: var(--copper-deep); }
.section--light .tlink:hover { color: var(--copper); }

/* ---------- Utilities ---------- */
.text-gold { color: var(--gold); }
.text-copper { color: var(--copper-bright); }
.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;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem;
  background: var(--gold); color: var(--ink-on-light); padding: 0.7em 1.2em;
  border-radius: var(--r-sm); z-index: var(--z-toast); font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease-out-expo);
}
.skip-link:focus { transform: translateY(0); }

.hr-rule { height: 1px; background: var(--border); border: 0; }

/* ---------- Reveal motion ----------
   Hidden state only applies once JS confirms support (.reveal-js on <html>).
   Without JS, content is fully visible: reveals enhance, never gate. */
.reveal-js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .tlink { transition: none; }
  * { scroll-behavior: auto !important; }
}
