/* ============================================================
   AGRAMON PERFORMANCE — Base / Reset / Layout primitives
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }

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

/* Lenis smooth-scroll wiring */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }

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

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }

/* One-page site: when an in-page #anchor is the scroll target, stop clear of the
   fixed nav instead of tucking the section heading under it. Mirrors NAV_OFFSET
   in main.js (used for the Lenis path on desktop). */
section[id] { scroll-margin-top: 90px; }

/* --- Type helpers --- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--orange);
  opacity: 0.8;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: var(--lh-snug); letter-spacing: var(--track-display); text-transform: uppercase; }
.display { font-size: var(--fs-hero); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.35rem); color: var(--text-dim); max-width: 52ch; }
.muted { color: var(--text-dim); }
.accent { color: var(--orange); }

/* --- Scroll-reveal (driven by JS / IntersectionObserver fallback) --- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
[data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
