/* ==========================================================================
   71 McLean Road — single stylesheet, no build step.
   Theme lives in :root. Palette: Blue Ridge forest green, warm paper, copper.
   All text/background pairs below were chosen to meet WCAG AA (4.5:1+).
   ========================================================================== */
:root {
  --forest-900: #142a22;
  --forest-800: #1f3d32;
  --forest-600: #2f5a4a;
  --paper: #faf6ee;
  --paper-alt: #f1ebdf;
  --card: #ffffff;
  --ink: #1d2420;
  --ink-muted: #4d5a53;
  --copper: #9a4a20;       /* text/links on paper: ~6:1 */
  --copper-fill: #a8521f;  /* button fill behind white text: ~5:1 */
  --copper-fill-hover: #8a3f15;
  --cream: #f4ecdc;
  --line: #ddd3c2;
  --focus: #1a5fb4;

  --maxw: 1160px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 42, 34, 0.08);
  --shadow-md: 0 10px 30px rgba(20, 42, 34, 0.12);
  --shadow-lg: 0 24px 60px rgba(20, 42, 34, 0.22);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --header-h: 64px;
  --section-space: clamp(3rem, 7vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
picture { display: contents; }
a { color: var(--copper); text-underline-offset: 0.18em; }
a:hover { color: var(--copper-fill-hover); }
h1, h2, h3 { font-family: var(--font-display); color: var(--forest-900); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--forest-900); color: #fff; padding: 0.7rem 1.1rem; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top 0.15s;
}
.skip-link:focus { top: 0.75rem; color: #fff; }

/* ------------------------------ Buttons ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.7rem 1.35rem; border-radius: 999px;
  background: var(--copper-fill); color: #fff; border: 2px solid var(--copper-fill);
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--copper-fill-hover); border-color: var(--copper-fill-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-small { min-height: 40px; padding: 0.45rem 1rem; font-size: 0.95rem; }
.btn-large { min-height: 52px; padding: 0.9rem 1.8rem; font-size: 1.1rem; }
.btn-ghost { background: rgba(20, 42, 34, 0.35); border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn-ghost:hover { background: #fff; border-color: #fff; color: var(--forest-900); }
.btn-ghost-dark { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn-ghost-dark:hover { background: var(--cream); border-color: var(--cream); color: var(--forest-900); }

/* ------------------------------ Header -------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--forest-800); text-decoration: none; margin-right: auto; }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--forest-900); }
.site-nav { display: none; }
.site-nav ul { display: flex; gap: 0.25rem; }
.site-nav a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.site-nav a:hover { background: var(--paper-alt); color: var(--forest-900); }
@media (min-width: 820px) { .site-nav { display: block; } }

/* ------------------------------- Hero --------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 820px); display: flex; align-items: flex-end;
  background: var(--forest-900); color: #fff;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.hero-slide.is-active img { animation: drift 9s ease-out both; }
@keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); } }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(12, 24, 19, 0.92) 0%, rgba(12, 24, 19, 0.7) 35%, rgba(12, 24, 19, 0.15) 70%, rgba(12, 24, 19, 0.25) 100%);
}
.hero-content { padding-block: 7rem clamp(2.5rem, 7vw, 4.5rem); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 600; color: var(--cream); margin-bottom: 0.75rem; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 8vw, 5.25rem); letter-spacing: -0.02em; margin-bottom: 0.15em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.hero-sub { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: #f3efe6; margin-bottom: 0.9rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; font-weight: 600; font-size: 1.05rem; color: #fff; margin-bottom: 1.6rem; }
.hero-price { font-family: var(--font-display); font-size: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-toggle {
  position: absolute; right: 1rem; bottom: 1rem; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8); background: rgba(12, 24, 19, 0.55); color: #fff; cursor: pointer;
}
.hero-toggle:hover { background: rgba(12, 24, 19, 0.85); }
.hero-toggle .i-play { display: none; }
.hero-toggle[aria-pressed="true"] .i-play { display: inline; }
.hero-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ------------------------------- Facts -------------------------------- */
.facts { background: var(--forest-800); color: var(--cream); }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.facts-grid > div { padding: 1.3rem 0.5rem; text-align: center; border-bottom: 1px solid rgba(244, 236, 220, 0.15); }
.facts-grid dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: #d9cfbb; }
.facts-grid dd { margin: 0.15rem 0 0; font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: #fff; }
.facts-grid small { font-size: 1rem; font-weight: 400; color: #e6dcc8; }
@media (min-width: 700px) {
  .facts-grid { grid-template-columns: repeat(4, 1fr); }
  .facts-grid > div { border-bottom: 0; border-left: 1px solid rgba(244, 236, 220, 0.15); }
  .facts-grid > div:first-child { border-left: 0; }
}

/* ------------------------------ Sections ------------------------------ */
.section { padding-block: var(--section-space); }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; font-weight: 700; color: var(--copper); margin-bottom: 0.4rem; }
.lede { font-size: 1.15rem; color: var(--ink-muted); }

/* ------------------------------ Gallery ------------------------------- */
.gallery-group + .gallery-group { margin-top: 2.5rem; }
.gallery-group h3 { display: flex; align-items: baseline; gap: 0.75rem; font-size: 1.35rem; }
.gallery-group .count { font: 500 0.85rem var(--font-body); color: var(--ink-muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; } }
@media (min-width: 960px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.thumb {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden; background: var(--line);
  aspect-ratio: 4 / 3; box-shadow: var(--shadow-sm);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s; }
.thumb:hover img, .thumb:focus-visible img { transform: scale(1.05); filter: brightness(1.05); }
.thumb:focus-visible { outline-offset: 2px; }
@media (min-width: 960px) {
  /* Feature the first photo of each group at double size. */
  .gallery-grid li:first-child { grid-column: span 2; grid-row: span 2; }
}

/* ----------------------------- Highlights ----------------------------- */
.highlights { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .highlights { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .highlights { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.1rem; box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--forest-600);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.card p { color: var(--ink-muted); font-size: 0.99rem; margin: 0; }

/* ------------------------------ 3D tour ------------------------------- */
.tour-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--forest-900); box-shadow: var(--shadow-lg);
}
@media (max-width: 600px) { .tour-frame { aspect-ratio: 4 / 5; } }
.tour-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; }
.tour-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) saturate(0.8); transform: scale(1.08); opacity: 0.55; }
.tour-placeholder-inner {
  position: relative; max-width: 30rem; margin: 1.25rem; padding: 2rem 1.75rem;
  background: rgba(12, 24, 19, 0.82); border: 1px solid rgba(244, 236, 220, 0.25);
  border-radius: var(--radius-lg); backdrop-filter: blur(4px);
}
.tour-placeholder-inner svg { margin: 0 auto 0.75rem; color: var(--cream); }
.tour-title { font-family: var(--font-display); font-size: 1.6rem; color: #fff; margin-bottom: 0.4rem; }
.tour-placeholder-inner p:last-child { margin: 0; color: #ece5d6; }
.tour-placeholder a { color: #ffd3ac; }
.tour-placeholder a:hover { color: #fff; }

/* ------------------------------ Location ------------------------------ */
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1.1fr; gap: 3.5rem; } }
.drive-list { margin: 0 0 1.75rem !important; }
.drive-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.drive-list li:first-child { border-top: 1px solid var(--line); }
.drive-list strong { color: var(--forest-800); }
.location-photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; }
.location-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------- Visit -------------------------------- */
.visit { background: var(--forest-800); color: var(--cream); text-align: center; }
.visit-inner { max-width: 44rem; }
.visit h2 { color: #fff; }
.visit .kicker { color: #f0c39d; }
.visit .lede { color: #e6dcc8; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; margin-top: 1.5rem; }
.visit-note { margin: 1.1rem 0 0; min-height: 1.6em; color: #f3ead8; }
.visit-note a { color: #ffd3ac; }

/* ------------------------------- Footer ------------------------------- */
.site-footer { background: var(--forest-900); color: #d9d1c1; font-size: 0.92rem; padding-block: 2.75rem; }
.site-footer a { color: #ffd3ac; }
.footer-inner { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1fr 2fr; gap: 3rem; } }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-bottom: 0.25rem; }
.eho { display: flex; gap: 0.75rem; align-items: flex-start; }
.eho svg { flex: none; color: #fff; margin-top: 0.15rem; }

/* ------------------------------ Lightbox ------------------------------ */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8, 14, 11, 0.97); color: #fff; overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lightbox::backdrop { background: rgba(8, 14, 11, 0.9); }
.lb-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.75rem 0.6rem 1.25rem; }
.lb-counter { margin: 0; font-variant-numeric: tabular-nums; color: #e8e2d6; font-weight: 600; }
.lb-figure { margin: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 0.75rem 1rem; }
.lb-figure img { align-self: center; max-width: min(100%, 1200px); max-height: calc(100dvh - 11rem); width: auto; height: auto; object-fit: contain; border-radius: 6px; min-height: 0; transition: opacity 0.25s; }
.lb-figure img.is-loading { opacity: 0.35; }
.lb-figure figcaption { max-width: 52rem; text-align: center; padding: 0.75rem 3.5rem 0; color: #ece6da; font-size: 0.98rem; }
.lb-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; }
.lb-btn:focus-visible { outline-color: #8ab4ff; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 0.75rem; }
.lb-next { right: 0.75rem; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 0.75rem; transform: none; }
  .lb-figure { padding-bottom: 4.5rem; }
  .lb-figure img { max-height: calc(100dvh - 16rem); }
  .lb-figure figcaption { padding-inline: 0.5rem; }
}
body.lb-open { overflow: hidden; }

/* -------------------------- Reduced motion ---------------------------- */
@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; }
  .hero-slide.is-active img { animation: none; transform: none; }
}
@media print {
  .site-header, .hero-toggle, .lightbox, .visit-actions { display: none !important; }
  .hero { min-height: 0; color: #000; }
}

/* ---------------------------- Price + stats (v3) ---------------------------- */
.hero-price { font-family: var(--font-display); font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 600; color: #fff; line-height: 1.1; margin: 0.2rem 0 0.7rem; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4); }
.hero-price-label { display: block; font-family: var(--font-body, inherit); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: #f0c9a4; text-shadow: none; margin-bottom: 0.15rem; }
.hero-facts { font-size: 1.15rem; }
.hero-facts strong { font-size: 1.3rem; }
.facts-grid .fact-price { grid-column: 1 / -1; }
.facts-grid .fact-price dd { font-size: 2.4rem; color: #f0c9a4; }
.facts-more { list-style: none; margin: 0; padding: 0.9rem 0 1.3rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem 0.55rem; }
.facts-more li { font-size: 0.88rem; color: #e6dcc8; border: 1px solid rgba(244, 236, 220, 0.28); border-radius: 999px; padding: 0.28rem 0.8rem; }
@media (min-width: 700px) {
  .facts-grid { grid-template-columns: repeat(5, 1fr); }
  .facts-grid .fact-price { grid-column: auto; }
  .facts-grid .fact-price dd { font-size: 2.2rem; }
  .facts-more { border-top: 1px solid rgba(244, 236, 220, 0.15); }
}

/* Front-of-house hero (2026 photo): keep the house and the "71" post in frame on wide and narrow screens. */
.hero-slide img.hero-img-front { object-position: 52% 58%; }
/* Outside group (8 photos): widen the last tile so rows end evenly at 3 and 4 columns. */
@media (min-width: 600px) {
  .gallery-grid li.thumb-wide { grid-column: span 2; }
  .gallery-grid li.thumb-wide .thumb { aspect-ratio: auto; height: 100%; min-height: 100%; position: relative; }
  .gallery-grid li.thumb-wide .thumb img { position: absolute; inset: 0; }
}
