/* Mustang Valley Sanctuary — redesign prototype
   Palette and type follow the current site (charcoal, warm gold, olive; Lora / Montserrat / Open Sans). */

:root {
  --ink: #28262b;
  --ink-2: #1b1b1b;
  --text: #4a4a4a;
  --muted: #777;
  --gold: #c39f76;
  --gold-dark: #a8835a;
  --olive: #8a8f6a;
  --paper: #ffffff;
  --mist: #f7f9fb;
  --sand: #f4efe8;
  --line: #e5e5e5;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(20, 18, 22, .12);
  --wrap: 1200px;
  --head-h: 84px;
  --serif: "Lora", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --script: "Shadows Into Light", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; font: 400 17px/1.7 var(--body); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--gold-dark); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; }

.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dark); margin: 0 0 .9em; display: block; }
.lead { font-size: 1.12rem; }
.center { text-align: center; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .9em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font: 600 .86rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: .2s ease; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { border-color: rgba(255,255,255,.85); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row, .btn-row.center { justify-content: center; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink-2); color: #bdbdbd; font: 500 .78rem/1 var(--sans); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar a { color: #d8d8d8; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.social { display: flex; gap: 14px; align-items: center; }
.social svg { width: 16px; height: 16px; fill: currentColor; display: block; }

/* ---------- Header / navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); transition: background .25s, box-shadow .25s; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: var(--head-h); }
.logo img { height: 52px; width: auto; }
body.home .site-header { position: fixed; left: 0; right: 0; top: 38px; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); }
body.home .site-header.scrolled { top: 0; background: var(--ink); box-shadow: 0 4px 20px rgba(0,0,0,.25); }

.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.nav-top { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: none; border: 0; color: #fff; cursor: pointer;
  font: 600 .84rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-radius: 4px; }
.nav-top .chev { width: 10px; height: 10px; transition: transform .2s; opacity: .8; }
.nav-top:hover, .has-sub:hover > .nav-top, .has-sub.open > .nav-top { color: var(--gold); }
.has-sub.open > .nav-top .chev, .has-sub:hover > .nav-top .chev { transform: rotate(180deg); }
.nav-top[aria-current="page"], .nav-top.current { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

.sub { position: absolute; top: 100%; left: 50%; min-width: 300px; padding: 10px; margin: 0; list-style: none;
  background: #fff; border-radius: var(--radius); border-top: 3px solid var(--gold); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: .18s ease; }
.sub::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.has-sub:hover > .sub, .has-sub.open > .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sub a { display: block; padding: 10px 14px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.sub a strong { display: block; font: 600 .92rem/1.3 var(--sans); }
.sub a span { display: block; font-size: .8rem; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.sub a:hover, .sub a:focus-visible { background: var(--sand); }
.sub a:hover strong { color: var(--gold-dark); }
.sub .ext::after { content: " ↗"; font-weight: 400; color: var(--muted); }

.head-actions { display: flex; align-items: center; gap: 10px; }
.head-actions .btn { padding: .8em 1.35em; gap: .4em; }
.lbl-long { margin-left: -.1em; }
.menu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 6px; padding: 9px 12px;
  font: 600 .8rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; align-items: center; gap: 8px; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 18px; height: 2px; background: #fff; position: relative; transition: .2s; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -6px; } .menu-toggle .bars::after { top: 6px; }
.nav-open .menu-toggle .bars { background: transparent; }
.nav-open .menu-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-toggle .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-top { padding: 12px 10px; font-size: .78rem; }
}
@media (max-width: 980px) {
  :root { --head-h: 70px; }
  .topbar-info span.hide-sm { display: none; }
  .logo img { height: 42px; }
  .menu-toggle { display: inline-flex; }
  .head-actions { margin-left: auto; }
  .main-nav { position: fixed; inset: var(--head-h) 0 0 0; background: var(--ink); overflow-y: auto; margin: 0;
    padding: 8px 16px 40px; transform: translateX(100%); transition: transform .28s ease; }
  body.home .main-nav { top: var(--head-h); }
  .nav-open .main-nav { transform: none; }
  .nav-open { overflow: hidden; }
  .nav-open .site-header { background: var(--ink) !important; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav-top { width: 100%; justify-content: space-between; padding: 18px 4px; font-size: .95rem; }
  .nav-top[aria-current="page"], .nav-top.current { box-shadow: none; }
  .sub { position: static; transform: none; opacity: 1; visibility: visible; display: none; box-shadow: none; border: 0;
    background: rgba(255,255,255,.05); min-width: 0; margin: 0 0 14px; }
  .has-sub:hover > .sub { transform: none; }
  .has-sub.open > .sub { display: block; transform: none; }
  .has-sub:hover > .nav-top .chev { transform: none; }
  .has-sub.open > .nav-top .chev { transform: rotate(180deg); }
  .sub a { color: #fff; }
  .sub a span { color: #aaa; }
  .sub a:hover { background: rgba(255,255,255,.08); }
  .sub a:hover strong { color: var(--gold); }
}
@media (max-width: 520px) {
  .head-actions .btn-gold .lbl-long { display: none; }
  .menu-toggle .lbl { display: none; }
  .topbar .wrap { justify-content: center; }
  .topbar-info { display: none; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; isolation: isolate; min-height: min(100svh, 920px); display: grid; place-items: center; color: #fff; text-align: center; overflow: hidden;
  background: #333 url(../media/hero-poster.jpg) center / cover no-repeat; }
/* Own compositing layer: stops Safari dropping the video after it scrolls out of view and back */
.hero video, .hero .hero-img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; transform: translateZ(0); backface-visibility: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.25) 50%, rgba(0,0,0,.55)); }
.hero-inner { position: relative; z-index: 1; padding: 160px 16px 140px; max-width: 1100px; }
.hero h1 { font: 400 clamp(3rem, 9vw, 6.2rem)/1.05 var(--script); color: #fff; margin: 0 0 .2em; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; margin: 0 auto 1.8em; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.hero .eyebrow { color: #f1dcc3; }
.hero .btn-row { justify-content: center; }

/* ---------- Quick-link tiles (hero overlap) ---------- */
.tiles { position: relative; z-index: 2; margin-top: -90px; }
.tiles ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; padding: 22px; border-radius: var(--radius);
  overflow: hidden; color: #fff; text-decoration: none; box-shadow: var(--shadow); isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 25%, rgba(20,18,22,.85)); }
.tile:hover img { transform: scale(1.06); }
.tile strong { font: 700 1.05rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.tile strong::after { content: "→"; color: var(--gold); transition: transform .2s; }
.tile:hover strong::after { transform: translateX(4px); }
.tile span { font-size: .9rem; line-height: 1.45; opacity: .9; margin-top: 6px; }
@media (max-width: 900px) { .tiles ul { grid-template-columns: repeat(2, 1fr); } .tile { min-height: 180px; } }
@media (max-width: 480px) { .tiles { margin-top: -60px; } .tiles ul { grid-template-columns: 1fr; } .tile { min-height: 140px; } }

/* ---------- Haven / pillars ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.pillars { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.pillars li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.pillars .ico { width: 52px; height: 52px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; color: var(--gold-dark); }
.pillars .ico svg { width: 24px; height: 24px; }
.pillars h3 { font-size: 1.15rem; margin: 2px 0 4px; }
.pillars p { margin: 0; font-size: .95rem; }
.collage { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.collage img:first-child { grid-row: span 2; }
.collage { aspect-ratio: 5 / 4; }

/* ---------- Programs ---------- */
.bg-sand { background: var(--sand); }
.bg-mist { background: var(--mist); }
.bg-ink { background: var(--ink); color: #cfcfcf; }
.bg-ink h2, .bg-ink h3 { color: #fff; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 26px 22px; background: #fff; border-radius: var(--radius); text-decoration: none;
  color: var(--text); border: 1px solid var(--line); transition: .2s ease; }
.card-link:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link .ico { color: var(--gold-dark); margin-bottom: 14px; }
.card-link .ico svg { width: 30px; height: 30px; }
.card-link h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card-link p { font-size: .92rem; margin: 0 0 14px; }
.card-link .more { margin-top: auto; font: 600 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); }

.events { margin-top: 48px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; background: #fff; border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); }
.events h3 { margin-bottom: 14px; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.event-list li:first-child { border-top: 0; }
.event-list time { font: 700 .78rem/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); }
@media (max-width: 760px) { .events { grid-template-columns: 1fr; } }

/* ---------- Quote ---------- */
#home-quote { background: #f7f9fb; }
#home-quote blockquote { margin: 0 auto; max-width: 860px; text-align: center; }
#home-quote blockquote p { font: italic 400 clamp(1.4rem, 2.8vw, 2rem)/1.45 var(--serif); color: var(--ink); margin-bottom: .8em; }
#home-quote cite { font: 600 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-dark); font-style: normal; }
#home-quote .mark { display: block; margin: 0 auto 10px; width: 46px; height: 46px; color: var(--gold); }

/* ---------- Herd cards ---------- */
.herd-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .herd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .herd-grid { grid-template-columns: 1fr; } }
.horse { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: .2s ease; }
.horse:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.horse figure { margin: 0; position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.horse img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.horse:hover img { transform: scale(1.05); }
.badge { position: absolute; top: 12px; left: 12px; background: var(--olive); color: #fff; font: 700 .68rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }
.horse .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.horse h3 { font-size: 1.1rem; margin-bottom: 6px; }
.horse p { font-size: .9rem; line-height: 1.55; margin: 0 0 14px; }
.horse .more { margin-top: auto; font: 600 .76rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.chip { border: 1px solid var(--line); background: #fff; padding: .7em 1.3em; border-radius: 999px; cursor: pointer; font: 600 .8rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Founder / adopt ---------- */
.portrait { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.signature { font: 400 1.8rem/1 var(--script); color: var(--gold-dark); margin-top: -4px; }
.adopt { position: relative; color: #fff; overflow: hidden; }
.adopt > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adopt::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28,26,30,.94) 0%, rgba(28,26,30,.85) 40%, rgba(28,26,30,.2) 75%); }
.adopt .wrap { position: relative; }
.adopt .box { max-width: 560px; }
.adopt h2 { color: #fff; }
.adopt .eyebrow { color: var(--gold); }
@media (max-width: 760px) { .adopt::before { background: rgba(28,26,30,.8); } }

/* ---------- Ways to help ---------- */
.help-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .help-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .help-grid { grid-template-columns: 1fr; } }
.help { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; padding: 26px 22px; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: #ddd; text-decoration: none; transition: .2s; }
.help:hover { background: rgba(255,255,255,.1); border-color: var(--gold); }
.help .ico { color: var(--gold); } .help .ico svg { width: 30px; height: 30px; }
.help strong { font: 700 1rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.help span { font-size: .9rem; line-height: 1.5; }
.help.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.help.primary .ico { color: #fff; }
.help.primary:hover { background: var(--gold-dark); }
.bg-light .help { background: #fff; border-color: var(--line); color: var(--text); }
.bg-light .help strong { color: var(--ink); }
.bg-light .help .ico { color: var(--gold-dark); }
.bg-light .help:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.bg-light .help.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.bg-light .help.primary strong, .bg-light .help.primary .ico { color: #fff; }

/* ---------- Inner pages ---------- */
.page-hero { position: relative; color: #fff; padding: clamp(70px, 10vw, 120px) 0 clamp(50px, 7vw, 80px); overflow: hidden; background: var(--ink); }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .25em; }
.page-hero p { max-width: 680px; font-size: 1.1rem; margin: 0; color: #eee; }
.crumbs { font: 600 .74rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; color: #ccc; }
.crumbs a { color: var(--gold); text-decoration: none; }
.subnav { position: sticky; top: var(--head-h); z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; padding: 16px 14px; white-space: nowrap; text-decoration: none; color: var(--ink); font: 600 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.subnav a:hover, .subnav a.active { color: var(--gold-dark); border-color: var(--gold); }
.program { display: grid; grid-template-columns: 340px 1fr; gap: clamp(24px, 4vw, 56px); padding: 48px 0; border-top: 1px solid var(--line); align-items: start; }
.program:first-of-type { border-top: 0; }
.program img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.program .poster { aspect-ratio: auto; }
@media (max-width: 760px) { .program { grid-template-columns: 1fr; } }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 18px; padding: 0; list-style: none; font: 600 .8rem/1.4 var(--sans); color: var(--muted); letter-spacing: .04em; }
.facts li::before { content: "•"; color: var(--gold); margin-right: 8px; }
.note { background: var(--sand); border-left: 3px solid var(--gold); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--gold); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 40px 0; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { margin: 4px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); color: #a9a9a9; font-size: .92rem; }
.site-footer a { color: #d6d6d6; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding: 70px 0 50px; }
.foot-grid h4 { font: 700 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #fff; margin: 6px 0 18px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-brand img { height: 56px; width: auto; margin-bottom: 18px; }
.foot-brand address { font-style: normal; line-height: 1.8; margin-bottom: 18px; }
.foot-brand .social svg { width: 18px; height: 18px; }
.partners { border-top: 1px solid rgba(255,255,255,.08); padding: 28px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 36px; }
.partners img { height: 46px; width: auto; filter: grayscale(1) brightness(1.6); opacity: .75; transition: .2s; }
.partners a:hover img { filter: none; opacity: 1; }
.copyright { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; font-size: .8rem; text-align: center; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Prototype banner ---------- */
.proto { position: fixed; right: 14px; bottom: 14px; z-index: 60; background: rgba(27,27,27,.92); color: #ddd; font: 500 .74rem/1.4 var(--sans);
  padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.proto b { color: var(--gold); }
.nav-open .proto { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Page content (the editor's Content box) ---------- */
.page-body { padding: clamp(48px, 7vw, 88px) 0; }
.prose { max-width: 760px; margin-inline: auto; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 1.6em 0 .2em; }
.prose h3 { font-size: 1.3rem; margin: 1.5em 0 .2em; }
.prose h4 { font: 700 .8rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin: 1.6em 0 .2em; }
.prose h2:first-child, .prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose figure { margin: 1.8em 0; }
.prose figure img { border-radius: var(--radius); width: 100%; height: auto; }
.prose figure + figure { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font: italic 1.15rem/1.6 var(--serif); color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.prose .video { position: relative; aspect-ratio: 16 / 9; margin: 1.8em 0; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.prose .btn-p { margin: 1.4em 0; }
.prose a:not(.btn) { color: var(--gold-dark); text-underline-offset: 3px; }
.prose > .lead:first-child { font-size: 1.2rem; color: var(--ink); }

/* Story pages (horse / article): text + side box */
.story { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.story .prose { margin: 0; max-width: none; }
.side { position: sticky; top: calc(var(--head-h) + 20px); display: grid; gap: 18px; }
.side-box { background: var(--sand); border-radius: var(--radius); padding: 26px 24px; }
.side-box h3 { font-size: 1.2rem; margin-bottom: 8px; }
.side-box p { font-size: .95rem; margin-bottom: 16px; }
.side-box .btn { width: 100%; justify-content: center; }
.side-box .btn + .btn { margin-top: 10px; }
.side-box.dark { background: var(--ink); color: #ccc; }
.side-box.dark h3 { color: #fff; }
.side-facts { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.side-facts li { padding: 8px 0; border-top: 1px solid rgba(0,0,0,.08); display: flex; justify-content: space-between; gap: 12px; }
.side-facts li:first-child { border-top: 0; }
.side-facts span { color: var(--muted); }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } .side { position: static; } }
.page-hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.page-hero .badge { position: static; }
.page-hero.story-hero { padding-top: clamp(110px, 16vw, 200px); }
.page-hero.story-hero > img { opacity: .55; }
.page-hero.story-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(20,18,22,.75)); }
.page-hero.story-hero .wrap { z-index: 1; }
.meta-line { font: 600 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #ddd; margin-top: 14px; }

/* Status badges driven by the horse's "Lists" field */
.badge.b-adopt { background: var(--olive); }
.badge.b-adopted { background: var(--gold-dark); }
.badge.b-memorial { background: #5b5b66; }
.horse figure .badge + .badge { left: auto; right: 12px; }

/* Article cards */
.post-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }
.horse time { display: block; font: 600 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* Wish list */
.wish { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.wish a { display: flex; flex-direction: column; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); background: #fff; transition: .2s; }
.wish a:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.wish strong { font: 600 1.05rem/1.3 var(--serif); color: var(--ink); }
.wish span { font-size: .88rem; line-height: 1.5; margin: 6px 0 14px; }
.wish em { margin-top: auto; font: 700 .95rem/1 var(--sans); font-style: normal; color: var(--gold-dark); display: flex; justify-content: space-between; }
.wish em::after { content: "Buy on Amazon ↗"; font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); align-self: center; }

/* Forms (prototype markup; wired up in sitebuilder) */
.form { display: grid; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
.form label, .form legend { display: block; font: 600 .82rem/1.3 var(--sans); color: var(--ink); margin-bottom: 6px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #d6d6d6; border-radius: 6px; background: #fff; color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.form textarea { min-height: 120px; resize: vertical; }
.form fieldset { border: 0; margin: 0; padding: 0; }
.form .checks { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .95rem; }
.form .checks label { font: 400 .95rem/1.4 var(--body); color: var(--text); display: flex; gap: 8px; align-items: center; margin: 0; }
.form .hint { font-size: .85rem; color: var(--muted); margin: 0; }
.contact-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-cards li { background: var(--sand); border-radius: var(--radius); padding: 18px 20px; }
.contact-cards span { display: block; font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; }
.contact-cards a, .contact-cards p { color: var(--ink); font: 600 1.05rem/1.4 var(--serif); text-decoration: none; margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Editing guide page */
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.legend-list li { display: grid; grid-template-columns: 18px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.legend-list i, .ed-legend i { width: 18px; height: 18px; border-radius: 4px; display: inline-block; margin-top: 4px; border: 3px dashed currentColor; }
.how { counter-reset: how; list-style: none; padding: 0; }
.how > li { padding: 20px 0; border-top: 1px solid var(--line); }
.how > li > strong { font: 600 1.1rem/1.3 var(--serif); color: var(--ink); display: block; margin-bottom: 6px; }
.how ol { margin: 6px 0 0; }
.path { font: 600 .82rem/1.4 var(--sans); background: var(--sand); padding: 2px 8px; border-radius: 4px; color: var(--ink); white-space: nowrap; }
.map-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.map-table th, .map-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.map-table th { font: 700 .74rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.k { font: 700 .66rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 4px 7px; border-radius: 3px; white-space: nowrap; display: inline-block; margin: 1px 4px 1px 0; }

/* ---------- "Show what's editable" overlay ---------- */
:root { --ed-template: #6b7280; --ed-page: #2563eb; --ed-snippet: #16a34a; --ed-index: #9333ea; --ed-form: #ea580c; }
.k.template, .c-template { background: var(--ed-template); color: var(--ed-template); }
.k.page, .c-page { background: var(--ed-page); color: var(--ed-page); }
.k.snippet, .c-snippet { background: var(--ed-snippet); color: var(--ed-snippet); }
.k.index, .c-index { background: var(--ed-index); color: var(--ed-index); }
.k.form, .c-form { background: var(--ed-form); color: var(--ed-form); }
.k { color: #fff; }
.legend-list i.c-template, .legend-list i.c-page, .legend-list i.c-snippet, .legend-list i.c-index, .legend-list i.c-form,
.ed-legend i { background: transparent; }
#ed-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.ed-box { position: fixed; border: 2px dashed; border-radius: 3px; background: rgba(255,255,255,.04); }
.ed-box.template { border-color: var(--ed-template); }
.ed-box.page { border-color: var(--ed-page); background: rgba(37,99,235,.05); }
.ed-box.snippet { border-color: var(--ed-snippet); background: rgba(22,163,74,.05); }
.ed-box.index { border-color: var(--ed-index); background: rgba(147,51,234,.05); }
.ed-box.form { border-color: var(--ed-form); background: rgba(234,88,12,.05); }
.ed-tag { position: absolute; top: 0; left: 0; transform: translateY(-1px); max-width: 100%; pointer-events: auto; cursor: help;
  font: 700 .66rem/1 var(--sans); letter-spacing: .04em; color: #fff; padding: 5px 8px; border-radius: 0 0 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-box.template .ed-tag { background: var(--ed-template); }
.ed-box.page .ed-tag { background: var(--ed-page); }
.ed-box.snippet .ed-tag { background: var(--ed-snippet); }
.ed-box.index .ed-tag { background: var(--ed-index); }
.ed-box.form .ed-tag { background: var(--ed-form); }
.ed-tip { position: fixed; z-index: 80; max-width: 340px; background: #111; color: #eee; font: 400 .85rem/1.5 var(--body); padding: 12px 14px; border-radius: 6px; box-shadow: var(--shadow); pointer-events: none; }
.ed-tip b { display: block; color: #fff; font-family: var(--sans); margin-bottom: 4px; }
.ed-legend { position: fixed; left: 14px; bottom: 14px; z-index: 81; background: rgba(17,17,17,.95); color: #ddd; padding: 14px 16px; border-radius: 8px;
  font: 500 .76rem/1.5 var(--sans); box-shadow: var(--shadow); max-width: 260px; }
.ed-legend ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.ed-legend li { display: flex; gap: 8px; align-items: center; }
.ed-legend i { width: 12px; height: 12px; margin: 0; border-width: 2px; }
.ed-legend a { color: var(--gold); }
.proto button { background: var(--gold); color: #fff; border: 0; border-radius: 999px; font: 700 .7rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 7px 11px; margin-left: 8px; cursor: pointer; }
.proto a { color: #ddd; }
@media (max-width: 600px) { .ed-legend { display: none; } }
.prose .legend-list, .prose .how { padding-left: 0; }
.ed-tag { transform: translateY(-100%); border-radius: 4px 4px 0 0; }

/* ---------- sitebuilder markup ---------- */
/* Automatic lists: items are <div class="card-item" data-tags="Current herd, Available for adoption"> */
.herd-grid > .card-item, .post-grid > .card-item { display: block; }
.card-item .badge { display: none; }
.card-item[data-tags*="Available for adoption"]:not([data-tags*="Adopted"]) .badge.b-adopt,
.card-item[data-tags*="Adopted"] .badge.b-adopted,
.card-item[data-tags*="In memoriam"] .badge.b-memorial { display: inline-block; }
.page-hero .badges[data-tags] .badge { display: none; }
.page-hero .badges[data-tags*="Current herd"] .b-herd,
.page-hero .badges[data-tags*="Available for adoption"]:not([data-tags*="Adopted"]) .b-adopt,
.page-hero .badges[data-tags*="Adopted"] .b-adopted,
.page-hero .badges[data-tags*="In memoriam"] .b-memorial { display: inline-block; }
.badge.b-herd { background: #6b6f52; }
/* Contact details snippet: one markup, styled by where it sits */
.ct-label { display: none; }
.ct { color: inherit; text-decoration: none; }
.site-footer address .ct { display: block; }
.contact-cards { display: grid; gap: 14px; }
.contact-cards .ct { display: block; background: var(--sand); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); font: 600 1.05rem/1.4 var(--serif); }
.contact-cards .ct-label { display: block; font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; }
@media (max-width: 980px) { .topbar-info .ct-address { display: none; } }
