/* ============================================================
   Swan Creek Stables — swancreekstables.com
   Palette: barn navy + warm arena sand
   All text/background pairs verified WCAG 2.1 AA (4.5:1 body, 3:1 large)
   ============================================================ */

:root {
  /* Navy — sampled from the barn roof */
  --navy-900: #0C2338;
  --navy-800: #12314C;
  --navy-700: #1A4066;
  --navy-600: #235685;

  /* Sand — arena footing + hay */
  --sand-100: #FBF8F2;
  --sand-200: #F2EADC;
  --sand-300: #E4D7BF;
  --sand-400: #CDB894;

  /* Accent — saddle leather. 5.9:1 on --sand-100 */
  --accent: #8A5220;
  --accent-dark: #6E4019;

  /* Ink */
  --ink: #1A1D21;      /* 15.8:1 on sand-100 */
  --ink-muted: #4C535B; /* 7.4:1 on sand-100 */
  --ink-onDark: #FFFFFF;
  --ink-onDark-muted: #D6DEE7; /* 11.4:1 on navy-900 */

  --line: #D8CDB8;
  --white: #FFFFFF;

  --font-display: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
  --shadow: 0 1px 3px rgba(12, 35, 56, 0.09), 0 8px 24px rgba(12, 35, 56, 0.07);
  --shadow-lg: 0 2px 6px rgba(12, 35, 56, 0.11), 0 18px 44px rgba(12, 35, 56, 0.13);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; 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;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand-100);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--navy-900);
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.7vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
p { margin: 0 0 1.1em; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

/* ---------- Focus + skip link ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  left: 0; top: 0;
  transform: translateY(-120%);
  background: var(--navy-900);
  color: var(--ink-onDark);
  padding: 0.85rem 1.35rem;
  z-index: 999;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); color: var(--ink-onDark); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.section--sand { background: var(--sand-200); }
.section--navy { background: var(--navy-900); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--ink-onDark); }
.section--navy p, .section--navy li { color: var(--ink-onDark-muted); }
.lede { font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem); color: var(--ink-muted); max-width: 60ch; }
.section--navy .lede { color: var(--ink-onDark-muted); }
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section--navy .eyebrow { color: var(--sand-400); }
.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); color: var(--white); }
.btn--navy { background: var(--navy-900); color: var(--white); }
.btn--navy:hover { background: var(--navy-700); color: var(--white); }
.btn--outline { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn--outline:hover { background: var(--navy-900); color: var(--white); }
.btn--onDark { background: var(--white); color: var(--navy-900); }
.btn--onDark:hover { background: var(--sand-200); color: var(--navy-900); }
.btn--ghostDark { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.65); }
.btn--ghostDark:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }
.center .btn-row { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy-900);
  flex-shrink: 0;
}
.brand svg { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-900);
  cursor: pointer;
}
.nav-toggle svg { display: block; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: block;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-800);
  text-decoration: none;
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { background: var(--sand-200); color: var(--navy-900); }
.primary-nav a[aria-current="page"] {
  color: var(--navy-900);
  border-bottom-color: var(--accent);
}
.header-cta { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-900);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent-dark); text-decoration: underline; }
.header-cta .btn { min-height: 44px; padding: 0.6rem 1.15rem; font-size: 0.94rem; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .primary-nav {
    display: none;
    order: 4;
    width: 100%;
    padding-bottom: 1rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav a {
    padding: 0.95rem 0.6rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .primary-nav a[aria-current="page"] {
    background: var(--sand-200);
    border-bottom-color: var(--line);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
  .header-cta .btn { display: none; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .header-phone span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(430px, 68vh, 640px);
  background: var(--navy-900);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 20, 33, 0.92) 0%,
    rgba(6, 20, 33, 0.74) 38%,
    rgba(6, 20, 33, 0.42) 70%,
    rgba(6, 20, 33, 0.3) 100%
  );
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { color: var(--white); max-width: 17ch; text-shadow: 0 2px 18px rgba(0,0,0,0.4); }
.hero .lede { color: #EAF0F6; max-width: 52ch; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.hero .eyebrow { color: var(--sand-400); }

/* page banner (interior pages) */
.page-banner {
  position: relative;
  background: var(--navy-900);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  overflow: hidden;
}
.page-banner-media { position: absolute; inset: 0; }
.page-banner-media img { width: 100%; height: 100%; object-fit: cover; }
.page-banner-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(6,20,33,0.94), rgba(6,20,33,0.72));
}
.page-banner .wrap { position: relative; z-index: 1; }
.page-banner h1 { color: var(--white); margin-bottom: 0.35em; }
.page-banner p { color: #EAF0F6; max-width: 56ch; margin: 0; font-size: 1.08rem; }

/* ---------- Stat bar ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.stat { background: var(--sand-100); padding: 1.6rem 1.25rem; text-align: center; }
.stat dt {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.1;
}

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sand-200);
  color: var(--navy-800);
  margin-bottom: 1rem;
}

/* Board tier cards */
.tier {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tier--featured { border-color: var(--navy-700); border-width: 2px; box-shadow: var(--shadow-lg); }
.tier-head { padding: 1.5rem 1.6rem 1.25rem; background: var(--navy-900); color: var(--white); }
.tier--featured .tier-head { background: var(--navy-700); }
.tier-head h3 { color: var(--white); margin-bottom: 0.25rem; }
.tier-price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}
.tier-price small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand-400);
  margin-top: 0.2rem;
}
.tier-body { padding: 1.5rem 1.6rem; flex: 1; }
.tier-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--sand-300);
  color: var(--navy-900);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.section--navy .check-list li::before { border-color: var(--sand-400); }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.split--reverse .split-media { order: 2; }
@media (max-width: 700px) { .split--reverse .split-media { order: 0; } }
figure { margin: 0; }
figcaption {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-top: 0.7rem;
  font-style: italic;
}

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.6rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin-bottom: 0; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand-200);
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  padding: 0.75rem 1rem;
  background: var(--white);
  font-style: normal;
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 0.75rem;
}
.faq summary {
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  font-size: 1.03rem;
  color: var(--navy-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq-answer { padding: 1.1rem 1.35rem; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Testimonials ---------- */
.quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin: 0;
  box-shadow: var(--shadow);
}
.quote blockquote { margin: 0 0 1rem; font-size: 1.05rem; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption {
  font-style: normal;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0;
}
.quote figcaption span { display: block; font-weight: 400; font-size: 0.9rem; color: var(--ink-muted); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}
.field .req { color: var(--accent-dark); }
.field .hint { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-muted); margin-top: 0.15rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--sand-100);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--white);
  border-color: var(--navy-700);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #A32020; background: #FDF4F4; }
.field-error { display: none; color: #8E1B1B; font-size: 0.88rem; font-weight: 600; margin-top: 0.35rem; }
.field-error.is-visible { display: block; }
.field-row { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.9rem; color: var(--ink-muted); }
.form-status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.form-status--ok { background: #EAF4EC; border: 1px solid #A9CDB2; color: #1C4A28; }
.form-status--err { background: #FCF0F0; border: 1px solid #E0B0B0; color: #8E1B1B; }

/* ---------- Contact detail list ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex;
  gap: 0.9rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { flex-shrink: 0; color: var(--accent); margin-top: 0.2rem; }
.contact-list strong { display: block; color: var(--navy-900); }
.contact-list a { font-weight: 600; }

.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--sand-200);
}
.map-embed iframe { display: block; width: 100%; height: 400px; border: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy-900); color: var(--ink-onDark); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--ink-onDark-muted); margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: var(--ink-onDark-muted);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  margin-bottom: 2.25rem;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sand-400);
  margin-bottom: 0.9rem;
}
.site-footer p { color: var(--ink-onDark-muted); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--sand-300); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.footer-brand .brand-name { color: var(--white); font-size: 1.2rem; display: block; }
.footer-brand .brand-sub { color: var(--sand-400); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Utilities ---------- */
.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;
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media print {
  .site-header, .cta-band, .btn, .map-embed { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Lightbox (injected by main.js) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  background: rgba(6, 20, 33, 0.94);
}
.lightbox[hidden] { display: none; }
.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
  margin-inline: auto;
}
.lightbox-figure figcaption {
  color: #EAF0F6;
  text-align: center;
  font-style: normal;
  font-size: 0.95rem;
  margin: 0;
}
.lightbox-close,
.lightbox-nav {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.75rem);
  right: clamp(0.75rem, 3vw, 1.75rem);
  font-size: 1.6rem;
}
@media (max-width: 620px) {
  .lightbox-nav { position: absolute; bottom: 1rem; }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  .lightbox-figure figcaption { padding-bottom: 3.5rem; }
}

/* Gallery items become buttons when JS is on */
.gallery-item[data-full] { cursor: zoom-in; display: block; width: 100%; text-align: left; padding: 0; border: 1px solid var(--line); font: inherit; color: inherit; background: var(--white); }

/* ---------- TBD markers (remove this block once every value is filled in) ---------- */
mark.tbd {
  background: #FFF1C2;
  color: #6B4C00;
  border: 1px dashed #C79A19;
  border-radius: 3px;
  padding: 0 0.3em;
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- Touch targets ----------
   WCAG 2.2 SC 2.5.8 exempts links inline in a sentence, but standalone
   navigation links in a list are real targets and get a full-size hit area. */
.site-footer a,
.contact-list a {
  display: inline-block;
  padding-block: 0.55rem;
}
.site-footer li { margin-bottom: 0.15rem; }

@media (pointer: coarse) {
  .site-footer li a { padding-block: 0.7rem; }
}

/* Honeypot: keep it out of the layout and off the accessibility tree entirely */
.hp, .hp input, .hp label {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0;
}

/* ---------- Header fit on small phones ----------
   Keeps brand, phone and Menu on one row down to 320px. */
@media (max-width: 620px) {
  .header-inner { gap: 0.5rem; }
  .brand-name { font-size: 1.02rem; }
  .brand { gap: 0.5rem; }
  .brand svg { width: 32px; height: 32px; }
  .nav-toggle { padding: 0.5rem 0.7rem; }
}
@media (max-width: 620px) {
  .brand-sub { display: none; }
  .header-phone span { display: none; }
}

/* Hero crop: favour the lower part of the frame so the barn stays in view
   rather than filling the banner with sky. */
.hero-media img { object-position: center 62%; }
.page-banner-media img { object-position: center 55%; }

/* Contact page: give the form a little more room than the sidebar */
@media (min-width: 900px) {
  .split--form { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
}
