/* ==========================================================================
   Base: design tokens, global resets and utilities
   Colors are sampled from res/logo-transparent.png
   (forest green drape, linen drape, brushed gold ring, cream badge).
   Keep these in sync with js/tailwind.config.js.
   ========================================================================== */

:root {
  /* Brand palette */
  --c-green: #1f3a30;       /* deep forest green */
  --c-green-deep: #142820;  /* footer / darkest */
  --c-sage: #4f6e5c;        /* soft green from the inner drape */
  --c-gold: #c49a5a;        /* brushed gold ring */
  --c-gold-light: #e8cf9c;
  --c-gold-dark: #9a7038;
  --c-cream: #fbf7ef;       /* badge background */
  --c-linen: #ecdcc0;       /* linen drape */
  --c-tan: #e6ded3;
  --c-ink: #17201c;

  /* Layout */
  --nav-h: 72px;
  --radius: 2px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --nav-h: 88px; }
}

html {
  scroll-padding-top: var(--nav-h);
  -webkit-tap-highlight-color: transparent;
}

body {
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--c-gold);
  color: var(--c-cream);
}

/* Visible, on-brand keyboard focus */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-cream); }
::-webkit-scrollbar-thumb { background: var(--c-gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-green); }

/* Lock page scroll (used by the mobile menu, and later by the gallery lightbox) */
body.is-locked { overflow: hidden; }

/* Smooth scrolling (Lenis) - see js/core/scroll.js */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* ==========================================================================
   Reveal-on-scroll (subtle fade + rise, no parallax)
   Add class="reveal" to any element; js/components/reveal.js toggles .is-visible
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* If JS is unavailable, never hide content */
.no-js .reveal { opacity: 1; transform: none; }

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

/* Feature switches (js/config.js -> features). Hidden by default so nothing flashes
   on load; js/main.js adds html.has-<feature> when a feature is switched on. */
html:not(.has-stories) [data-feature="stories"] { display: none !important; }
