/* ============================================================
   TNE — The New Era
   Design tokens, reset, base typography
   ============================================================ */

:root {
  /* — Color — */
  --bg: #F4F1EB;
  --bg-elev: #FFFFFF;
  --bg-soft: #ECE6D8;
  --bg-deep: #EAE5DC;
  --ink: #14130F;
  --ink-soft: #2B2A26;
  --muted: #6C6862;
  --line: rgba(20, 19, 15, 0.12);
  --line-strong: rgba(20, 19, 15, 0.22);
  --accent: #FF3D00;
  --accent-ink: #FFFFFF;

  /* — Type — */
  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* — Spacing scale (8pt) — */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 192px;

  /* — Layout — */
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 56px);

  /* — Motion — */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-power: cubic-bezier(0.77, 0, 0.18, 1);
  --d-fast: 220ms;
  --d-med: 420ms;
  --d-slow: 800ms;

  /* — Radius — */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 24px;
  --r-pill: 999px;
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* — Type scale — */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { color: var(--accent); }

.h-mega {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(80px, 16vw, 280px);
  line-height: 0.88;
  letter-spacing: -0.03em;
}
.h-xl {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.h-lg {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.h-md {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.h-sm {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.italic { font-style: normal; color: var(--accent); }
em { font-style: normal; color: var(--accent); }

.body-lg {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.body { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.body-sm { font-size: 14px; line-height: 1.55; color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em; }
.mono-sm { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* — Layout — */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: var(--s-10) 0; }
.section-sm { padding: var(--s-9) 0; }
@media (max-width: 720px) {
  .section { padding: var(--s-9) 0; }
  .section-sm { padding: var(--s-8) 0; }
}

/* — Grid — */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
@media (max-width: 720px) { .grid-12 { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* — Utilities — */
.flex { display: flex; }
.between { display: flex; justify-content: space-between; align-items: center; }
.center { display: flex; justify-content: center; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 24px; } .gap-6 { gap: 32px; } .gap-7 { gap: 48px; } .gap-8 { gap: 64px; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); width: 100%; }

/* — Reveal — */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
.reveal[data-delay="5"] { transition-delay: 400ms; }

/* Mask reveal for headings (line by line) */
.mask-line { display: block; overflow: hidden; padding-bottom: 0.12em; }
.mask-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1100ms var(--ease-power);
}
.mask-line.in > span { transform: none; }
.mask-line[data-delay="1"] > span { transition-delay: 80ms; }
.mask-line[data-delay="2"] > span { transition-delay: 160ms; }
.mask-line[data-delay="3"] > span { transition-delay: 240ms; }
.mask-line[data-delay="4"] > span { transition-delay: 320ms; }
.mask-line[data-delay="5"] > span { transition-delay: 400ms; }

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .mask-line > span { transform: none; }
}
