/*
 * base.css — CSS custom properties, reset, typography
 * Design system: editorial Hill Country aesthetic
 * Color tokens are HCLR defaults; brand.css files override per brand.
 */

/* ── Custom Properties ───────────────────────────────────────────── */
:root {
  /* Color tokens — HCLR defaults; overridden in brand.css */
  --color-text:          #2E2A35;  /* nightfall */
  --color-text-muted:    #7A7370;  /* warm gray */
  --color-bg:            #F4F0E6;  /* linen */
  --color-bg-light:      #EDE8DC;  /* linen-dark */
  --color-bg-dark:       #2E2A35;  /* nightfall */
  --color-primary:       #C4956A;  /* warm-flint */
  --color-primary-dark:  #A87850;
  --color-secondary:     #5E7E8A;  /* lake-dusk */
  --color-border:        #D4C9B0;  /* caliche */
  --color-white:         #ffffff;

  /* Typography */
  --font-serif:  'Lora', Georgia, 'Times New Roman', serif;
  --font-sans:   'Outfit', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-base: 1rem;
  --line-height: 1.7;

  /* Spacing (matches guide page gap scale) */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-2xl: 8rem;

  /* Layout */
  --container-max: 75rem;
  --radius:        1.25rem;
  --radius-lg:     1.25rem;

  /* Shadows — subtle, editorial */
  --shadow-sm: 0 1px 4px rgba(46,42,53,0.08);
  --shadow-md: 0 4px 16px rgba(46,42,53,0.10);
  --shadow-lg: 0 8px 32px rgba(46,42,53,0.14);

  /* Transitions */
  --transition: 0.2s ease;
}

/* ── 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-weight: 300;
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: underline; }
a:hover { color: var(--color-primary-dark); }

ul, ol { padding-left: 1.5em; }
ul[role="list"], ol[role="list"] { padding-left: 0; list-style: none; }
ul.nav-list { list-style: none; padding: 0; }

/* ── Container ───────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-sm);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-md); }
}

/* ── Typography ──────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: var(--space-sm); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: var(--space-xs); }
h4 { font-size: 1.1rem; margin-bottom: var(--space-xs); }

p { margin-bottom: var(--space-sm); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 500; }

/* ── Utility: label (small-caps uppercase tag) ───────────────────── */
.label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ── Section header pattern ──────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-md);
}
.section-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 16px;
}
.section-lead {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 65ch;
  line-height: 1.75;
}

/* ── Section divider ─────────────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-bg-light);
  margin: 0;
}

/* ── Sections ────────────────────────────────────────────────────── */
.section { padding-block: var(--space-lg); }
@media (min-width: 768px) { .section { padding-block: var(--space-xl); } }
.bg-light { background: var(--color-bg-light); }
.bg-dark { background: var(--color-bg-dark); color: var(--color-white); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--color-white); }

/* ── Prose (rendered Markdown) ───────────────────────────────────── */
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--space-md); margin-bottom: var(--space-xs); }
.prose h3 { margin-top: var(--space-sm); margin-bottom: var(--space-xs); }
.prose ul, .prose ol { margin-bottom: var(--space-sm); }
.prose li { margin-bottom: var(--space-xs); }
.prose blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-sm);
  color: var(--color-text-muted);
  margin: var(--space-sm) 0;
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}
.prose th, .prose td {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  text-align: left;
}
.prose th { background: var(--color-bg-light); font-weight: 500; }

/* ── Scroll reveal animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed,
.reveal-left.revealed {
  opacity: 1;
  transform: none;
}
/* Stagger children via data-delay */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb { padding: var(--space-xs) 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; padding: 0; font-size: 0.82rem; font-weight: 300; }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: var(--space-xs); color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }

/* ── Address ─────────────────────────────────────────────────────── */
address { font-style: normal; }

/* ── Hidden (honeypot) ───────────────────────────────────────────── */
.hidden { display: none; }

/* ── Accessibility ───────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.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;
}
