/* ============================================================
   LITHORA — base.css
   Design tokens, reset, typography, utilities
   ============================================================ */

/* ---------- Fonts ---------- */
/* fonts are loaded via <link> in index.html (faster than @import) */

/* ---------- Tokens ---------- */
:root {
  /* Brand greens (from the Lithora logo) */
  --green-100: #E8F8E0;
  --green-200: #C4EFAF;
  --green-300: #8FE06A;
  --green-400: #57C520;
  --green-500: #3FA815;
  --green-600: #2F8B10;
  --green-700: #1F6B0C;

  /* Deep forest base (cinematic dark) */
  --ink-950: #060D07;
  --ink-900: #0A130B;
  --ink-850: #0D1A0F;
  --ink-800: #122315;
  --ink-700: #1B3320;

  /* Calcined clay / limestone warmth */
  --clay-300: #F4C9A8;
  --clay-400: #E8A876;
  --clay-500: #D98548;
  --clay-600: #C26A2E;
  --heat: #FF7A3D;
  --limestone: #EDE8DD;
  --limestone-dim: #C9C3B4;

  /* Semantic */
  --bg: var(--ink-950);
  --bg-elevated: rgba(255, 255, 255, 0.035);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #F2F7EE;
  --text-dim: #A9B8A4;
  --text-faint: #6E7F6A;
  --accent: var(--green-400);
  --accent-soft: rgba(87, 197, 32, 0.14);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', 'SF Mono', monospace;

  /* Rhythm */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --space-7: 144px;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1200px;
  --container-wide: 1400px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
  --dur-slow: 700ms;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--green-500); color: #fff; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--green-300);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography helpers ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-300);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-400));
}

.lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  color: var(--text-dim);
  font-weight: 300;
}

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}
.container-wide {
  width: min(var(--container-wide), 100% - 48px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(80px, 12vw, 150px);
  position: relative;
}

/* ---------- Reveal-on-scroll primitives ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-scale.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
