/* ============================================================
   Claudiu Moldovan — theme foundation
   3 design directions, switchable via [data-direction] on <html>
   ============================================================ */

:root {
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --section-pad: clamp(72px, 11vh, 150px);
  --font-impact: "Anton", "Archivo", system-ui, sans-serif;
}

/* ---------- DIRECTION 1 · EDITORIAL (warm paper, serif) ---------- */
html[data-direction="editorial"] {
  --bg: #f3ede2;
  --bg-alt: #eae1d2;
  --surface: #fffdf8;
  --ink: #1c1813;
  --ink-soft: #443c33;
  --muted: #847868;
  --line: #d8cebd;
  --accent: #9c1f2c;
  --accent-ink: #fffdf8;
  --on-dark: #f3ede2;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --display-weight: 500;
  --display-spacing: -0.02em;
  --display-transform: none;
  --display-line: 1.02;
  --eyebrow-transform: uppercase;
  --eyebrow-spacing: 0.22em;
  --eyebrow-font: var(--font-body);
}

/* ---------- DIRECTION 2 · BOLD (dark, impactful sans) ---------- */
html[data-direction="bold"] {
  --bg: #0d0d0f;
  --bg-alt: #161618;
  --surface: #17171a;
  --ink: #f4f1ec;
  --ink-soft: #cdc8c0;
  --muted: #8d8881;
  --line: #2a2a2e;
  --accent: #c12c39;
  --accent-ink: #ffffff;
  --on-dark: #f4f1ec;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --display-weight: 900;
  --display-spacing: -0.035em;
  --display-transform: uppercase;
  --display-line: 0.94;
  --eyebrow-transform: uppercase;
  --eyebrow-spacing: 0.28em;
  --eyebrow-font: var(--font-body);
}

/* ---------- DIRECTION 3 · MINIMAL (bright, airy sans) ---------- */
html[data-direction="minimal"] {
  --bg: #ffffff;
  --bg-alt: #f6f4f1;
  --surface: #ffffff;
  --ink: #15110d;
  --ink-soft: #4a443d;
  --muted: #8b857c;
  --line: #e7e3dd;
  --accent: #9c1f2c;
  --accent-ink: #ffffff;
  --on-dark: #ffffff;

  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", system-ui, sans-serif;
  --display-weight: 700;
  --display-spacing: -0.03em;
  --display-transform: none;
  --display-line: 1.0;
  --eyebrow-transform: uppercase;
  --eyebrow-spacing: 0.2em;
  --eyebrow-font: var(--font-body);
}

/* ---------- base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-spacing);
  text-transform: var(--display-transform);
  line-height: var(--display-line);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---------- shared primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-pad); position: relative; }
/* offset anchored jumps so the sticky header doesn't cover section tops */
section[id], .cat[id] { scroll-margin-top: 92px; }
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: #0d0d0f;
  --ink: #f4f1ec; --ink-soft: #cdc8c0; --muted: #8d8881; --line: #2a2a2e; --surface: #17171a;
  --accent: #c12c39;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--eyebrow-font);
  text-transform: var(--eyebrow-transform);
  letter-spacing: var(--eyebrow-spacing);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.eyebrow--center { justify-content: center; }

.display-1 { font-size: clamp(2.7rem, 8vw, 6.2rem); }
.display-2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.display-3 { font-size: clamp(1.5rem, 3vw, 2.3rem); }

.lede {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 40ch;
}

/* ---------- buttons ---------- */
.btn {
  --pad-y: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad-y) 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  position: relative;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px var(--accent); }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; background: transparent; }

.btn--block { width: 100%; }
.btn--lg { --pad-y: 19px; font-size: 14px; padding-inline: 38px; }
.btn--sm { --pad-y: 12px; padding-inline: 22px; font-size: 11px; letter-spacing: 0.1em; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
