/* ============================================================
   base.css — Lux Summit Estates
   Reset, typography, layout utilities. Swiss editorial baseline.
   ============================================================ */

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

img, svg, video { display: block; max-width: 100%; height: auto; }
img { filter: saturate(0.55) contrast(1.02); } /* desaturated editorial grade */
picture { display: block; }

a { color: var(--data-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-xs);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  line-height: var(--lh-head);
  letter-spacing: var(--track-tight);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-head); }
h4 { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; letter-spacing: var(--track-cap); text-transform: uppercase; color: var(--ink); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0 0 0.4em; }
li:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--rule-strong); margin: var(--s-7) 0; }

small { font-size: var(--fs-sm); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--bg); }

/* ---------- Layout containers ---------- */
.container { width: var(--maxw); margin: 0 auto; }
.container-wide { width: var(--maxw-wide); margin: 0 auto; }
.container-narrow { width: var(--maxw-narrow); margin: 0 auto; }

.page-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  width: var(--maxw-wide);
  margin: 0 auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

/* ---------- Numbered label / eyebrow ---------- */
.label, .num {
  font-family: var(--font-sans);
  font-size: var(--fs-cap);
  font-weight: 600;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  color: var(--ink);
}
.num { color: var(--accent); }
.label-data { color: var(--data-ink); }

/* ---------- Editorial caption / cutline ---------- */
.cutline {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-muted);
}
.cutline .src { color: var(--text-faint); display: block; margin-top: 4px; font-size: var(--fs-cap); letter-spacing: 0.04em; }

/* ---------- Utility ---------- */
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.rule-top { border-top: 1px solid var(--rule-strong); }
.rule-bottom { border-bottom: 1px solid var(--rule-strong); }
.ink { color: var(--ink); }
.red { color: var(--accent-ink); }
.blue { color: var(--data-ink); }

/* ---------- Reading progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 80ms linear;
}

/* ---------- Reveal (kinetic headline) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Kinetic headline: words rise into place */
.kinetic .line { display: block; overflow: hidden; }
.kinetic .line > span {
  display: block;
  transform: translateY(110%);
  transition: transform var(--dur-slow) var(--ease);
}
.kinetic.is-visible .line > span { transform: none; }
.kinetic .line:nth-child(2) > span { transition-delay: 80ms; }
.kinetic .line:nth-child(3) > span { transition-delay: 160ms; }
.kinetic .line:nth-child(4) > span { transition-delay: 240ms; }

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

/* ---------- Section number (reading progress fill) ---------- */
.sec-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1;
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.sec-num::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  height: 2px;
  width: var(--fill, 0%);
  background: var(--accent);
  transition: width 120ms linear;
}

/* ---------- Disclosure bar ---------- */
.disclosure {
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-cap);
  letter-spacing: 0.04em;
}
.disclosure .row {
  width: var(--maxw-wide);
  margin: 0 auto;
  padding: 8px clamp(16px, 3vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}
.disclosure a { color: var(--bg); text-decoration: underline; text-underline-offset: 2px; opacity: 0.9; }
.disclosure a:hover { opacity: 1; color: var(--accent-soft); }
.disclosure .sep { opacity: 0.5; padding: 0 2px; }
.disclosure .age {
  font-weight: 600;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  border: 1px solid var(--bg);
  padding: 2px 6px;
  margin-right: 8px;
}

/* ---------- Screen reader ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
