/* ============================================
   Damside Highlands — Design System
   Palette, type, and components per strategy/01-brand-positioning.md
   Contrast rules per strategy/10-mobile-accessibility.md
   ============================================ */

:root {
  --cream: #F6F1E7;
  --charcoal: #2B2622;
  --amber: #B9791E;
  --amber-dark: #8F5D16;
  --forest: #37473A;
  --stone: #9B9186;
  --mist: #6E7A80;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --container: 1180px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;

  --radius: 2px;
}

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

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

html, body { overflow-x: hidden; }
a, p, li { overflow-wrap: anywhere; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Focus states — Charcoal, never Amber (contrast) */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--charcoal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--cream);
  padding: 1em 1.5em;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 400; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  display: inline-block;
  margin-bottom: var(--space-sm);
}

p.lede {
  font-size: 1.2rem;
  color: var(--charcoal);
  max-width: 42em;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--forest);
  letter-spacing: 0.04em;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
@media (max-width: 640px) {
  .container { padding: 0 var(--space-sm); }
}

section { padding: var(--space-xl) 0; }
@media (max-width: 640px) {
  section { padding: var(--space-lg) 0; }
}

.section-tight { padding: var(--space-lg) 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(43, 38, 34, 0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand img { height: 52px; width: auto; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

nav.primary-nav { display: flex; align-items: center; gap: var(--space-md); }
nav.primary-nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}
nav.primary-nav a {
  font-size: 0.95rem;
  padding: 0.4em 0.1em;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
  white-space: nowrap;
}
nav.primary-nav a:hover, nav.primary-nav a.active {
  border-color: var(--amber);
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.7em;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: var(--charcoal); /* charcoal-on-amber = 4.1:1, safest pairing at this size */
}
.btn-primary:hover { background: var(--amber-dark); color: var(--cream); }
.btn-ghost {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-ghost:hover { background: var(--charcoal); color: var(--cream); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--charcoal);
}

@media (max-width: 760px) {
  nav.primary-nav ul { display: none; }
  nav.primary-nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid rgba(43,38,34,0.08);
  }
  .nav-toggle { display: block; }
  .site-header .container { position: relative; }
  nav.primary-nav a { white-space: normal; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-start;
  background-size: cover;
  background-position: center 85%;
  color: var(--cream);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(43,38,34,0.62) 0%, rgba(43,38,34,0.18) 45%, rgba(43,38,34,0.05) 100%);
}
/* Blurred background layer — for source photos whose orientation/crop
   doesn't suit a direct cover-fit hero (e.g. portrait photos used in a
   wide hero band). Keeps the hero text sharp; only the photo is blurred.
   Real element (not a pseudo-element + CSS variable), so it uses the
   exact same background-image mechanism as every other hero on the
   site — set background-image and background-position via inline style
   directly on this div. */
.hero-blur-layer {
  position: absolute;
  inset: -20px;
  z-index: 0;
  background-size: cover;
  filter: blur(4px);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0.25rem var(--space-md) var(--space-lg);
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero .eyebrow { color: var(--cream); opacity: 0.9; }
.hero h1 { color: var(--cream); max-width: 16em; }
.scroll-cue {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.85;
  animation: bob 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Breathing text block ---------- */
.breathing {
  max-width: 34em;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-xl) 0;
}
.breathing p { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.5; color: var(--charcoal); }

/* ---------- Teaser sections ---------- */
.teaser {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: var(--space-lg);
  align-items: center;
}
.teaser.reverse { direction: rtl; }
.teaser.reverse > * { direction: ltr; }
@media (max-width: 780px) {
  .teaser { grid-template-columns: 1fr; gap: var(--space-md); }
}
.teaser img { border-radius: var(--radius); width: 100%; height: 460px; object-fit: cover; }
.teaser-copy a.link-arrow { display: inline-block; margin-top: var(--space-sm); }

.link-arrow {
  font-weight: 600;
  border-bottom: 1px solid var(--amber-dark);
  padding-bottom: 0.15em;
}
.link-arrow:hover { border-color: var(--charcoal); }

/* ---------- Full-bleed atmosphere ---------- */
.atmosphere {
  position: relative;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--cream);
}
.atmosphere::after { content:''; position:absolute; inset:0; background: rgba(43,38,34,0.38); }
.atmosphere-copy { position: relative; z-index: 2; max-width: 30em; padding: 0 var(--space-md); }
.atmosphere-copy p { font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 2rem); color: var(--cream); }

.placeholder-tag {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  background: rgba(43,38,34,0.75);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.3em 0.7em;
  border-radius: var(--radius);
  text-transform: uppercase;
}

/* ---------- Cards (Herd Records) ---------- */
.herd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.herd-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 780px) { .herd-grid { grid-template-columns: 1fr; } }
.herd-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(43,38,34,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.herd-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(43,38,34,0.12); }
.herd-grid-2 .herd-card img { height: 420px; }
.herd-card img { width: 100%; height: 320px; object-fit: cover; }
.herd-card-body { padding: var(--space-sm) var(--space-md) var(--space-md); }
.herd-card-body h3 { margin-bottom: 0.3em; }
.herd-card-future {
  border: 1px dashed var(--stone);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: var(--space-md);
}

/* ---------- Facts table ---------- */
.facts-table { width: 100%; border-collapse: collapse; margin: var(--space-md) 0; }
.facts-table td { padding: 0.9em 0; border-bottom: 1px solid rgba(43,38,34,0.1); }
.facts-table td:first-child { font-family: var(--font-mono); font-size: 0.85rem; color: var(--forest); width: 40%; }

/* ---------- Callout ---------- */
.callout {
  background: var(--forest);
  color: var(--cream);
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius);
}
.callout h3 { color: var(--cream); }
.callout p { color: var(--cream); opacity: 0.92; }

/* ---------- Pull quote ---------- */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.35;
  color: var(--charcoal);
  max-width: 26em;
  margin: var(--space-lg) auto;
  text-align: center;
}

/* ---------- FAQ accordion ---------- */
.faq-group h3.faq-group-title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--forest);
  margin: var(--space-lg) 0 var(--space-sm);
}
.faq-item { border-bottom: 1px solid rgba(43,38,34,0.12); }
.faq-item summary {
  cursor: pointer;
  padding: 1.1em 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-mono); font-size: 1.3rem; color: var(--amber-dark); }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { padding-bottom: 1.2em; max-width: 46em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--cream);
  padding: var(--space-lg) 0 var(--space-md);
}
.site-footer a { opacity: 0.85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(246,241,231,0.15);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
.footer-grid h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1em; opacity: 0.7; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 0.6em; font-size: 0.85rem; }
.footer-grid a { overflow-wrap: anywhere; word-break: break-word; }
.footer-bottom {
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  opacity: 0.7;
  flex-wrap: wrap;
  gap: 1em;
}

/* ---------- Forms (booking) ---------- */
.field { margin-bottom: var(--space-sm); }
.field label { display: block; font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 0.4em; color: var(--forest); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.8em 1em;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--charcoal);
}
.stepper { display: flex; align-items: center; gap: 1em; }
.stepper button {
  width: 40px; height: 40px;
  border: 1px solid var(--charcoal);
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: var(--radius);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.small-note { font-size: 0.9rem; color: var(--forest); }
.divider { border: none; border-top: 1px solid rgba(43,38,34,0.12); margin: var(--space-lg) 0; }
.legal-body h2 { margin-top: var(--space-lg); }
.legal-body p, .legal-body li { max-width: 60em; margin-bottom: 1em; }
.legal-body ul { padding-left: 1.4em; }
.legal-notice {
  background: #fff;
  border-left: 3px solid var(--amber);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}
