/* ============================================================
   SLNext Academy — Design System
   Base: tokens, reset, typography, layout utilities
   ============================================================ */

:root {
  --bg: #F6F2EB;
  --bg-tint: #EFE8DB;
  --surface: #FFFFFF;
  --ink: #1B1813;
  --ink-2: #3A342C;
  --muted: #6F675B;
  --sand: #E8E0D0;
  --sand-2: #D9CDB6;
  --accent: #A0804A;
  --accent-strong: #85672F;
  --light: #F6F2EB;

  --line: rgba(27, 24, 19, 0.12);
  --line-strong: rgba(27, 24, 19, 0.3);
  --line-dark: rgba(246, 242, 235, 0.18);

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;

  --shadow-sm: 0 12px 32px -20px rgba(27, 24, 19, 0.28);
  --shadow-lg: 0 34px 80px -34px rgba(27, 24, 19, 0.38);

  --font-serif: "Fraunces", "Georgia", serif;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 44px);
  --section-pad: clamp(84px, 12vw, 150px);
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

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

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--light);
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

section { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Layout utilities ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--tint { background: var(--bg-tint); }

.section--dark {
  background: var(--ink);
  color: var(--light);
}

.section--dark .section-title { color: var(--light); }

/* ---------- Typography ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-strong);
  margin-bottom: 1.4rem;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.kicker--invert { color: var(--accent); }

.section-title {
  font-size: clamp(1.95rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  max-width: 20ch;
}

.section-title em,
.hero__title em,
.final-cta__title em {
  font-style: italic;
  color: var(--accent-strong);
}

.section--dark .section-title em { color: var(--accent); }

.section-sub {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
  max-width: 56ch;
}

.section--dark .section-sub { color: rgba(246, 242, 235, 0.72); }

.section-head {
  margin-bottom: clamp(42px, 6vw, 76px);
  max-width: 820px;
}

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: none;
}

.section-head--split .section-sub { margin-top: 0; max-width: 46ch; }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-reveal-delay="80"]  { transition-delay: 0.08s; }
.reveal[data-reveal-delay="90"]  { transition-delay: 0.09s; }
.reveal[data-reveal-delay="100"] { transition-delay: 0.10s; }
.reveal[data-reveal-delay="120"] { transition-delay: 0.12s; }
.reveal[data-reveal-delay="160"] { transition-delay: 0.16s; }
.reveal[data-reveal-delay="180"] { transition-delay: 0.18s; }
.reveal[data-reveal-delay="200"] { transition-delay: 0.20s; }
.reveal[data-reveal-delay="240"] { transition-delay: 0.24s; }
.reveal[data-reveal-delay="270"] { transition-delay: 0.27s; }
.reveal[data-reveal-delay="320"] { transition-delay: 0.32s; }
.reveal[data-reveal-delay="400"] { transition-delay: 0.40s; }

/* ---------- Accessibility helpers ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--light);
  border-radius: 999px;
  font-weight: 600;
  transition: top 0.25s var(--ease);
}

.skip-link:focus-visible {
  top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
