/* ==========================================================================
   Ag360 — base: reset, typography, layout primitives
   ========================================================================== */

*, *::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(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ---- Headings -------------------------------------------------------------
   Newsreader is variable with an optical-size axis. Setting `opsz` high at
   display sizes gives the tighter, higher-contrast display cut rather than a
   scaled-up text face; body-adjacent headings sit lower on the axis. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: -0.012em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--t-h1);
  line-height: var(--lh-display);
  font-variation-settings: 'opsz' 60;
  letter-spacing: -0.021em;
}
h2 {
  font-size: var(--t-h2);
  font-variation-settings: 'opsz' 40;
  letter-spacing: -0.016em;
}
h3 {
  font-size: var(--t-h3);
  font-variation-settings: 'opsz' 20;
  font-weight: 500;
}

p { margin: 0 0 var(--s-4); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--ag-blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15em; }
li { margin-bottom: var(--s-2); }

/* ---- Focus ----------------------------------------------------------------
   One visible focus treatment everywhere, including over photography. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-invert :focus-visible,
.invert :focus-visible { outline-color: var(--ag-green-light); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  font-size: var(--t-small);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* ---- Layout primitives ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--text { max-width: calc(var(--wrap-text) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.62); }
.section--alt { background: var(--bg-alt); }

/* Inverted band. Only one per page — it is the page's second focal point. */
.invert {
  background: var(--bg-invert);
  color: var(--text-on-invert);
}
.invert h1, .invert h2, .invert h3 { color: var(--text-on-invert); }
.invert p { color: var(--text-muted-invert); }
.invert a { color: var(--ag-green-light); }

/* Hairline. The site's only divider — the ring motif is deliberately not
   used as a section divider (see the aperture, one per page). */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.invert .rule { border-top-color: var(--rule-invert); }

/* ---- Utility text --------------------------------------------------------- */
.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
}
.invert .lead { color: var(--text-muted-invert); }

/* Mono is data only: dates, prices, seat counts, the countdown. */
.data {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--text-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- Scroll reveal --------------------------------------------------------
   One shared reveal, applied to section blocks only, never to individual
   words or decorative elements. Falls back to visible with no JS. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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