/* ============================================================
   base.css — reset, design tokens, typography
   ============================================================ */

:root {
  /* Palette — winter in the Blue Ridge (deep teal, cream, olive, walnut, gold) */
  /* Brand colors */
  --teal:     #1b4257;  /* signature deep teal-blue */
  --cream:    #efefc9;  /* brand cream */
  --olive:    #7a8615;  /* olive green accent */
  --walnut:   #372713;  /* dark walnut brown */
  --gold:     #bc9c22;  /* muted gold — warm brass accent, use sparingly */
  --wine:     #7c2233;  /* deep burgundy — editorial label accent */
  --espresso: #1c140d;  /* near-black walnut — moody, candlelit sections */

  /* Surfaces (light → deep): --paper, --ivory, then --cream above */
  --paper:    #f8f6e6;  /* lightest warm cream — cards, nav, surfaces */
  --ivory:    #f1efda;  /* body background — warm cream */

  /* Text */
  --ink:      var(--walnut);  /* headings, strong text */
  --charcoal: #4a3a26;        /* softer walnut — body text */
  --brown:    #6b5333;        /* warm mid-brown — small-caps labels */

  /* Tints */
  --teal-deep:#143340;  /* darker teal — button hover, focus, CTA strip */
  --teal-night:#0f2a38; /* deepest teal — hero sky, candlelit sections */
  --olive-deep:#54600c; /* darker olive — small-caps labels & text accents (AA on light surfaces) */

  /* Legacy aliases — keep older rules/branches working; prefer the names above */
  --pine:     var(--teal);
  --moss:     var(--olive);
  --mahogany: var(--walnut);
  --maroon:   var(--wine);
  --rust:     var(--teal);
  --persimmon:var(--olive);
  --ochre:    var(--gold);
  --bark:     var(--brown);

  --rule:     rgba(55, 39, 19, 0.16);
  --rule-soft:rgba(55, 39, 19, 0.09);

  /* Soft elevation for cards */
  --shadow-sm: 0 1px 2px rgba(28, 20, 13, 0.04), 0 8px 24px rgba(28, 20, 13, 0.05);
  --shadow-md: 0 2px 6px rgba(28, 20, 13, 0.06), 0 18px 48px rgba(28, 20, 13, 0.10);

  /* Type */
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.86rem);
  --step-0:  clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --step-1:  clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --step-2:  clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  --step-3:  clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
  --step-5:  clamp(3.2rem, 2rem + 5vw, 5.5rem);

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 8vw, 7rem);
  --radius: 3px;
}

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

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* The hidden attribute always wins, even over display: flex/grid rules */
[hidden] { display: none !important; }

/* Skip link — hidden until keyboard-focused */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  background: var(--walnut);
  color: var(--paper);
  padding: 0.7rem 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  transform: translateY(-250%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Headings — editorial serif */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}

h1 { font-size: var(--step-5); font-weight: 400; }
h2 { font-size: var(--step-4); font-weight: 400; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; }

/* Eyebrow label — small caps, tracked out */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-deep);
  display: inline-block;
  margin-bottom: 1.25rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 0.8em;
  opacity: 0.7;
}

/* Centered eyebrow — flanked by two rules */
.eyebrow--center {
  display: block;
  text-align: center;
}
.eyebrow--center::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-left: 0.8em;
  opacity: 0.7;
}

/* Light eyebrow — for dark/photographic sections */
.eyebrow--light { color: var(--gold); }

/* Lede paragraph */
.lede {
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.45;
  color: var(--charcoal);
  font-weight: 400;
  font-style: italic;
}

/* Selection */
::selection { background: var(--teal); color: var(--paper); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 720ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 720ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

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