/* ==========================================================================
   Cossentine Equestrian: site styles
   Brand: navy #0B1D3F on white · Trajan Pro 3 (display) · Raleway (text)
   ========================================================================== */

:root {
  /* Brand colours (taken from the original site) */
  --navy: #0b1d3f;
  --navy-deep: #07142d;   /* large dark backgrounds (top bar, page headers, navy sections, footer), as in the Root System; --navy stays the brand colour for text, buttons and the logo */
  --navy-80: rgba(11, 29, 63, 0.8);
  --navy-70: rgba(11, 29, 63, 0.7);
  --navy-55: rgba(11, 29, 63, 0.55);
  --navy-20: rgba(11, 29, 63, 0.2);
  --navy-12: rgba(11, 29, 63, 0.12);
  --navy-06: rgba(11, 29, 63, 0.06);
  --mist: #f3f5f8;
  --white: #ffffff;

  /* Type. Trajan Pro 3 is an Adobe font: add your Adobe Fonts web-project
     <link> in each page <head> and "trajan-pro-3" is picked up automatically.
     Until then Cinzel (a free Trajan-style face) stands in. */
  --font-display: "trajan-pro-3", "Cinzel", "Times New Roman", serif;
  --font-body: "Raleway", "Helvetica Neue", Arial, sans-serif;

  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(11, 29, 63, 0.06), 0 8px 28px rgba(11, 29, 63, 0.08);
  --shadow-lg: 0 2px 6px rgba(11, 29, 63, 0.08), 0 24px 60px rgba(11, 29, 63, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --topbar-h: 38px;
  --bar-h: 80px;
  --header-h: calc(var(--topbar-h) + var(--bar-h));
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.on-navy :focus-visible { outline-color: var(--white); }
::selection { background: var(--navy); color: var(--white); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.5rem); letter-spacing: 0.03em; }
h4 { font-size: 1.05rem; letter-spacing: 0.06em; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.65; color: var(--navy-80); }
.muted { color: var(--navy-70); }
.small { font-size: 0.9rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--navy-70);
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.center .eyebrow::after { content: ""; width: 32px; height: 1px; background: currentColor; }
.on-navy .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: rgba(255, 255, 255, 0.8); }

.rule { width: 48px; height: 2px; background: var(--navy); border: 0; margin: 0 0 28px; }
.center .rule { margin-inline: auto; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section-tight { padding-block: clamp(56px, 7vw, 88px); }
.bg-mist { background: var(--mist); }
.on-navy { background: var(--navy-deep); color: var(--white); }
.on-navy .card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }
.on-navy .card p { color: rgba(255, 255, 255, 0.82); }
.on-navy .muted, .on-navy .lead { color: rgba(255, 255, 255, 0.78); }
.center { text-align: center; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; }
.section-head p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split > *, .grid > * { min-width: 0; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px;
  border: 1px solid var(--navy); border-radius: var(--radius);
  background: var(--navy); color: var(--white);
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: var(--navy-deep); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-light:hover { background: transparent; color: var(--white); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn-ghost-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 0.75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid var(--navy-20); padding-bottom: 4px;
  transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}
.link-arrow:hover { gap: 16px; border-color: currentColor; }

/* ---------- Header ----------
   Note: the frosted background lives on ::before. Putting backdrop-filter on the
   header itself would trap the fixed mobile menu inside the header bar. */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: color 0.35s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--navy-12);
  transition: opacity 0.35s var(--ease);
}
.site-header.is-scrolled::before { box-shadow: 0 6px 24px rgba(11, 29, 63, 0.06); }

/* Instagram bar, always visible */
.topbar { position: relative; z-index: 2; height: var(--topbar-h); background: var(--navy-deep); color: var(--white); font-size: 0.8rem; }
.topbar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ig-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; letter-spacing: 0.02em; }
.ig-link svg { width: 18px; height: 18px; flex: none; }
.ig-link strong { font-weight: 700; }
.ig-link .cta { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 3px 10px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; transition: background-color 0.2s, color 0.2s; }
.ig-link:hover .cta { background: var(--white); color: var(--navy); }
.topbar-right { display: flex; gap: 22px; }
.topbar-right a { text-decoration: none; opacity: 0.85; }
.topbar-right a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 760px) {
  .topbar-right { display: none; }
  .ig-link .hide-sm { display: none; }
  .topbar .wrap { justify-content: center; }
}

.mainbar { height: var(--bar-h); transition: height 0.35s var(--ease); }
.mainbar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; flex: none; position: relative; z-index: 120; }
.brand img { height: 52px; width: auto; transition: height 0.35s var(--ease); }
.brand .logo-white { display: none; }

.nav { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 28px); }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 1.2vw, 26px); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; text-decoration: none; white-space: nowrap;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after, .has-sub.is-current > a::after { transform: scaleX(1); }

/* Programs drop-down: opens on hover, or with the arrow button (keyboard and touch) */
/* every top-level link is the same kind of box, so "Programs" (which shares its item with the arrow) lines up with the rest */
.nav-links > li > a { display: block; }
.has-sub { position: relative; display: flex; align-items: center; gap: 2px; }
.sub-toggle { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.sub-toggle svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.sub { list-style: none; margin: 0; padding: 0; }
@media all {
  /* centered while it fits, scrolls from the top when it doesn't */
  .nav-open .site-header::after { content: ""; position: absolute; inset: 0 0 auto; height: var(--header-h); background: var(--navy-deep); z-index: 115; }
  .site-header .nav { justify-content: flex-start; }
  .site-header .nav-links { margin-top: auto; }
  .site-header .nav .btn { margin-bottom: auto; }
  .has-sub { flex-direction: column; }
  .sub-toggle { display: none; }
  .sub { margin-bottom: 8px; }
  .nav-links .sub a { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0.02em; padding: 5px 0; opacity: 0.85; }
}
.nav .btn { white-space: nowrap; }
.ig-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1px solid currentColor; text-decoration: none; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.ig-btn svg { width: 18px; height: 18px; }
.ig-btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.header-actions { display: flex; align-items: center; gap: 6px; position: relative; z-index: 120; }

/* Transparent header over the photo at the top of each page */
.has-hero .site-header:not(.is-scrolled) { color: var(--white); }
.has-hero .site-header:not(.is-scrolled)::before { opacity: 0; }
.has-hero .site-header:not(.is-scrolled) .logo-navy { display: none; }
.has-hero .site-header:not(.is-scrolled) .logo-white { display: block; }
.has-hero .site-header:not(.is-scrolled) .quick .btn { background: transparent; border-color: rgba(255, 255, 255, 0.75); color: var(--white); }
.has-hero .site-header:not(.is-scrolled) .quick .btn:hover { background: var(--white); color: var(--navy); }
.has-hero .site-header:not(.is-scrolled) .ig-btn:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.site-header.is-scrolled { --bar-h: 66px; }
.site-header.is-scrolled .brand img { height: 44px; }

.nav-toggle {
  display: block; width: 46px; height: 46px; border: 0; background: transparent; padding: 0;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 24px; height: 1.5px; background: currentColor; content: "";
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span { top: 22px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media all {
  .header-actions { display: flex; }
  .nav .ig-btn { display: none; }
  .nav {
    position: fixed; inset: 0; z-index: 110;
    flex-direction: column; justify-content: center; gap: 30px;
    padding: calc(var(--header-h) + 8px) 24px 32px; overflow-y: auto;
    background: var(--navy-deep); color: var(--white);
    opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; gap: 2px; text-align: center; }
  .nav-links a { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.06em; text-transform: none; padding: 9px 0; display: block; }
  .nav .btn { background: var(--white); color: var(--navy); border-color: var(--white); }
  body.nav-open { overflow: hidden; }
  .nav-open .site-header { color: var(--white); }
  .nav-open .site-header::before { opacity: 0; }
  .nav-open .site-header .logo-navy { display: none; }
  .nav-open .site-header .logo-white { display: block; }
}
@media (max-width: 560px) {
  :root { --bar-h: 68px; }
  .brand img { height: 42px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 980px);
  display: flex; align-items: flex-end;
  color: var(--white); background: var(--navy-deep); isolation: isolate; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 20, 45, 0.55) 0%, rgba(7, 20, 45, 0) 28%),
    linear-gradient(90deg, rgba(7, 20, 45, 0.85) 0%, rgba(7, 20, 45, 0.45) 55%, rgba(7, 20, 45, 0.2) 100%),
    linear-gradient(0deg, rgba(7, 20, 45, 0.7) 0%, rgba(7, 20, 45, 0) 50%);
}
.hero-content { padding-block: calc(var(--header-h) + 80px) clamp(64px, 10vh, 120px); }
.hero h1 { margin-bottom: 0.25em; line-height: 1.02; }
.hero h1 small { display: block; font-size: 0.52em; letter-spacing: 0.16em; margin-top: 0.18em; }
.hero .tagline { font-style: italic; font-size: clamp(1.15rem, 2vw, 1.45rem); margin: 0 0 2rem; color: rgba(255, 255, 255, 0.9); }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: clamp(48px, 7vh, 80px); padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.82); }
.hero-ring { position: absolute; right: -10vw; top: 50%; width: min(70vw, 820px); transform: translateY(-50%); color: rgba(255, 255, 255, 0.14); z-index: -1; pointer-events: none; }

/* Page hero (inner pages) */
.page-hero {
  position: relative; color: var(--white); background: var(--navy-deep); isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); min-height: clamp(470px, 62vh, 620px);
}
.page-hero .wrap {
  grid-column: 1; grid-row: 1; align-self: end; width: auto;
  margin: 0 clamp(28px, 4vw, 56px) 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  padding-block: calc(var(--header-h) + clamp(28px, 4vw, 48px)) clamp(40px, 5vw, 64px);
}
.page-hero .bg { grid-column: 2; grid-row: 1; position: relative; z-index: 0; margin-top: var(--header-h); background: var(--navy-deep); }
.page-hero .bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 29, 63, 0.35) 0%, rgba(11, 29, 63, 0) 16%); }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin-bottom: 0.3em; }
.page-hero p:not(.eyebrow) { max-width: 560px; font-size: clamp(1.05rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, 0.86); margin: 0; }
.page-hero .hero-ring { z-index: -1; right: auto; left: -14vw; width: min(52vw, 560px); color: rgba(255, 255, 255, 0.08); }
@media (max-width: 860px) {
  .page-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: var(--header-h); }
  .page-hero .bg { grid-column: 1; grid-row: 1; margin-top: 0; height: clamp(240px, 62vw, 440px); }
  .page-hero .bg::after { background: linear-gradient(0deg, rgba(11, 29, 63, 0.35) 0%, rgba(11, 29, 63, 0) 30%); }
  .page-hero .wrap { grid-row: 2; width: min(100% - 2 * var(--gutter), var(--wrap)); margin: 0 auto; padding-block: 28px 40px; }
}

/* ---------- Brand ring motif ---------- */
.ring { color: var(--navy-12); pointer-events: none; }
.ring circle { fill: none; stroke: currentColor; }

/* ---------- Intro / stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--navy-12); border-bottom: 1px solid var(--navy-12); }
.stat { padding: 34px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--navy-12); }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1; display: block; margin-bottom: 10px; }
.stat .label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--navy-70); }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--navy-12); }
}

/* ---------- Media frames ---------- */
.frame { position: relative; }
.frame img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); object-fit: cover; }
.frame .ring { position: absolute; width: 74%; left: -16%; bottom: -14%; z-index: -1; color: var(--navy-20); }
.frame-stack { position: relative; padding: 0 12% 12% 0; isolation: isolate; }
.frame-stack .a { aspect-ratio: 4 / 5; }
.frame-stack .b { position: absolute; right: 0; bottom: 0; width: 52%; aspect-ratio: 1; border: 8px solid var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--white); border: 1px solid var(--navy-12); border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 36px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
a.card { text-decoration: none; display: block; }
a.card:hover, .card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { margin-bottom: 0.55em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { display: block; width: 44px; height: 44px; margin-bottom: 22px; color: var(--navy); }
.card .icon svg { width: 100%; height: 100%; }
.card .more { margin-top: 18px; }

/* Program cards (homepage) */
.card.program-card { display: flex; flex-direction: column; }
.program-card p { flex: 1; color: var(--navy-80); }
.program-card .more { align-self: flex-start; }

/* ---------- Horses ---------- */
.horse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(20px, 2.6vw, 30px); }
.horse-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; background: none;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--white);
  box-shadow: 0 0 0 1px var(--navy-12);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.horse-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.horse-card .photo { position: relative; aspect-ratio: 4 / 4.2; overflow: hidden; background: var(--mist); }
.horse-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.horse-card:hover .photo img { transform: scale(1.05); }
.horse-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.horse-card .name { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.15; letter-spacing: 0.03em; }
.horse-card .show-name { font-size: 0.9rem; font-style: italic; color: var(--navy-70); }
.horse-card .specs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-12); font-size: 0.84rem; color: var(--navy-80); line-height: 1.55; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--white); color: var(--navy);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.horse-card .badge { position: absolute; left: 14px; top: 14px; box-shadow: 0 2px 10px rgba(11, 29, 63, 0.15); }
.badge.is-sold { background: var(--navy); color: var(--white); }
.badge.is-leased::before { background: transparent; border: 1.5px solid currentColor; }

.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--navy-20); background: var(--white); border-radius: 999px;
  padding: 9px 18px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip .count { opacity: 0.6; margin-left: 4px; font-weight: 500; }
.search {
  position: relative; flex: 1 1 240px; max-width: 320px;
}
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px; border-radius: 999px; border: 1px solid var(--navy-20); background: var(--white);
}
.search svg { position: absolute; left: 15px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--navy-55); }
.empty { text-align: center; padding: 60px 0; color: var(--navy-70); }

/* Horse dialog */
.horse-dialog {
  width: min(100% - 32px, 980px); max-height: min(92vh, 860px); padding: 0; border: 0; border-radius: 14px;
  color: var(--navy); background: var(--white); box-shadow: var(--shadow-lg); overflow: hidden;
}
.horse-dialog::backdrop { background: rgba(7, 20, 45, 0.72); backdrop-filter: blur(4px); }
.horse-dialog[open] { animation: pop 0.35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.dialog-inner { display: grid; grid-template-columns: 1.05fr 1fr; max-height: inherit; }
.dialog-gallery { background: var(--navy-deep); display: flex; flex-direction: column; min-height: 0; }
.dialog-gallery .main { flex: 1; min-height: 320px; position: relative; }
.dialog-gallery .main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dialog-gallery .thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.dialog-gallery .thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; opacity: 0.6; background: none; }
.dialog-gallery .thumbs button[aria-current="true"] { border-color: var(--white); opacity: 1; }
.dialog-gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dialog-body { padding: clamp(28px, 4vw, 48px); overflow-y: auto; }
.dialog-body h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); margin: 14px 0 4px; }
.dialog-body .show-name { font-style: italic; color: var(--navy-70); margin-bottom: 24px; }
.spec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0 0 24px; border-top: 1px solid var(--navy-12); }
.spec-list div { padding: 12px 0; border-bottom: 1px solid var(--navy-12); }
.spec-list dt { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-70); }
.spec-list dd { margin: 2px 0 0; font-weight: 500; }
.dialog-close {
  position: absolute; right: 14px; top: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--navy); box-shadow: 0 2px 12px rgba(11, 29, 63, 0.25);
  display: grid; place-items: center; font-size: 1.4rem; line-height: 1;
}
@media (max-width: 760px) {
  .dialog-inner { grid-template-columns: 1fr; overflow-y: auto; }
  .dialog-gallery .main { min-height: 0; aspect-ratio: 1; }
  .dialog-body { overflow: visible; }
}

/* ---------- Quote ---------- */
.quote-band { position: relative; overflow: hidden; }
.quote-band blockquote { margin: 0; }
.quote-band .q {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3.3vw, 2.6rem); line-height: 1.35; letter-spacing: 0.01em;
  margin: 0 0 28px; text-wrap: balance;
}
.quote-band cite { font-style: normal; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.quote-band .hero-ring { right: auto; left: 50%; transform: translate(-50%, -50%); width: min(90vw, 760px); color: rgba(255, 255, 255, 0.08); }
.quote-mark { font-family: var(--font-display); font-size: 5rem; line-height: 0.6; display: block; margin-bottom: 18px; opacity: 0.5; }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.testimonial { background: var(--white); border-radius: var(--radius-lg); padding: clamp(28px, 3.4vw, 44px); box-shadow: 0 0 0 1px var(--navy-12); display: flex; flex-direction: column; }
.testimonial p { font-size: 1.06rem; line-height: 1.75; flex: 1; }
.testimonial .who { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--navy-12); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--navy); color: var(--white); font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.04em;
}
.testimonial .name { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.06em; }
.testimonial .role { font-size: 0.8rem; color: var(--navy-70); }
.stars { display: flex; gap: 3px; margin-bottom: 18px; color: var(--navy); }
.stars svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .testimonials { grid-template-columns: 1fr; } }

/* ---------- Shows ---------- */
.show-list { list-style: none; margin: 0; padding: 0; }
.show {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 28px; align-items: center;
  padding: 24px 4px; border-bottom: 1px solid var(--navy-12);
  transition: background-color 0.25s var(--ease), padding 0.25s var(--ease);
}
.show:hover { background: var(--mist); padding-inline: 16px; }
.show .date { font-family: var(--font-display); line-height: 1.1; }
.show .date .mo { display: block; font-size: 0.78rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--navy-70); margin-bottom: 4px; }
.show .date .days { font-size: 1.55rem; letter-spacing: 0.02em; }
.show .title { font-family: var(--font-display); font-size: clamp(1.1rem, 1.6vw, 1.3rem); letter-spacing: 0.03em; line-height: 1.3; }
.show .place { font-size: 0.9rem; color: var(--navy-70); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.show .place svg { width: 14px; height: 14px; flex: none; }
.show .status { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--navy-20); white-space: nowrap; }
.show.is-live .status { background: var(--navy); color: var(--white); border-color: var(--navy); }
.show.is-past { opacity: 0.5; }
.show.is-past:hover { opacity: 0.8; }
@media (max-width: 640px) {
  .show { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .show .date { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
  .show .date .mo { margin: 0; }
  .show .date .days { font-size: 1.1rem; }
}
.month-head { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--navy-55); padding: 40px 4px 12px; margin: 0; border-bottom: 1px solid var(--navy-12); }
.show-list > li:first-child .month-head { padding-top: 0; }
.toggle-past { margin-top: 28px; }

/* Upcoming show mini cards (home) */
.next-shows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.next-show { border-top: 2px solid var(--navy); padding-top: 22px; }
.next-show .when { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--navy-70); margin-bottom: 10px; }
.next-show h3 { font-size: 1.3rem; margin-bottom: 6px; }
.next-show .where { color: var(--navy-70); font-size: 0.95rem; }
@media (max-width: 860px) { .next-shows { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-family: var(--font-display); font-size: clamp(2.2rem, 3.4vw, 2.8rem); line-height: 1; margin: 6px 0 4px; }
.price-card .per { font-size: 0.85rem; color: var(--navy-70); margin-bottom: 20px; }
.price-card ul { list-style: none; margin: 0 0 26px; padding: 0; flex: 1; }
.price-card li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--navy-06); font-size: 0.97rem; }
.price-card li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 10px; height: 6px; border-left: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); transform: rotate(-45deg); }
.price-card.featured { background: var(--navy); color: var(--white); border-color: var(--navy); }
.price-card.featured .per { color: rgba(255, 255, 255, 0.7); }
.price-card.featured li { border-color: rgba(255, 255, 255, 0.12); }
.price-card.featured li::before { border-color: var(--white); }
.price-card .tag { position: absolute; top: -12px; left: 28px; background: var(--white); color: var(--navy); border: 1px solid var(--navy); }
.price-card.featured .tag { border-color: var(--white); }

.table-wrap { overflow-x: auto; border: 1px solid var(--navy-12); border-radius: var(--radius-lg); background: var(--white); }
.rates { width: 100%; border-collapse: collapse; min-width: 520px; }
.rates th, .rates td { text-align: left; padding: 18px 24px; border-bottom: 1px solid var(--navy-12); vertical-align: top; }
.rates tr:last-child td { border-bottom: 0; }
.rates th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-70); background: var(--mist); }
.rates td:last-child, .rates th:last-child { text-align: right; white-space: nowrap; }
.rates .amt { font-family: var(--font-display); font-size: 1.2rem; }
.rates small { display: block; color: var(--navy-70); font-size: 0.86rem; margin-top: 2px; }

/* Feature list (facility) */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.feature-list li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--navy-12); }
.feature-list li:last-child { border-bottom: 1px solid var(--navy-12); }
.feature-list svg { width: 22px; height: 22px; margin-top: 3px; }
.feature-list strong { font-weight: 600; display: block; }
.feature-list span { color: var(--navy-70); font-size: 0.95rem; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card .portrait {
  width: 156px; height: 156px; margin: 0 auto 24px; border-radius: 50%; position: relative;
  display: grid; place-items: center; background: var(--mist); color: var(--navy);
  font-family: var(--font-display); font-size: 2.6rem; letter-spacing: 0.04em; overflow: hidden;
}
.team-card .portrait img { width: 100%; height: 100%; object-fit: cover; }
.team-card .portrait::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid var(--navy-20); clip-path: polygon(0 0, 78% 0, 78% 34%, 100% 34%, 100% 70%, 78% 70%, 78% 100%, 0 100%); }
.team-card .role { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--navy-70); margin-bottom: 8px; }
.team-card h3 { margin-bottom: 14px; }
.team-card p { color: var(--navy-80); font-size: 0.98rem; }

/* ---------- FAQ ---------- */
.faq-group + .faq-group { margin-top: clamp(48px, 6vw, 72px); }
.faq-group > h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 18px; }
.faq { border-top: 1px solid var(--navy-12); }
.faq details { border-bottom: 1px solid var(--navy-12); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 4px; font-weight: 600; font-size: 1.06rem; line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--navy-20);
  background:
    linear-gradient(var(--navy), var(--navy)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--navy), var(--navy)) center / 1.5px 12px no-repeat;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover::after { border-color: var(--navy); }
.faq .answer { padding: 0 60px 26px 4px; color: var(--navy-80); }
.faq .answer ul { padding-left: 1.2em; margin: 0 0 1em; }
.faq .answer li { margin-bottom: 4px; }
.faq-nav { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 4px; }
.faq-nav a { text-decoration: none; padding: 10px 14px; border-left: 2px solid var(--navy-12); font-weight: 500; transition: border-color 0.2s, background-color 0.2s; }
.faq-nav a:hover { border-color: var(--navy); background: var(--mist); }
.faq-layout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .faq-nav a { border-left: 0; border: 1px solid var(--navy-20); border-radius: 999px; padding: 8px 16px; font-size: 0.9rem; }
  .faq .answer { padding-right: 4px; }
}

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin: 0 0 32px; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--navy-12); }
.on-navy .contact-list li { border-color: rgba(255, 255, 255, 0.15); }
.contact-list .ic { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--navy-20); display: grid; place-items: center; }
.on-navy .contact-list .ic { border-color: rgba(255, 255, 255, 0.3); }
.contact-list .ic svg { width: 18px; height: 18px; }
.contact-list .k { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-70); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--navy-20); border-radius: var(--radius);
  background: var(--white); transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-12); }
.form .note { font-size: 0.85rem; color: var(--navy-70); margin: 0; }
.form-status { grid-column: 1 / -1; padding: 14px 18px; border-radius: var(--radius); background: var(--mist); display: none; }
.form-status.show { display: block; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

.form-card { background: var(--white); color: var(--navy); border-radius: 14px; padding: clamp(28px, 4vw, 48px); box-shadow: var(--shadow-lg); }

.map { border: 0; width: 100%; height: 100%; min-height: 380px; border-radius: var(--radius-lg); filter: grayscale(0.35) contrast(1.05); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band .inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; max-width: 640px; }
.cta-band .hero-ring { width: 520px; right: -140px; color: rgba(255, 255, 255, 0.08); }

/* ---------- Instagram band ---------- */
/* Instagram feed (home, under the hero): profile header, reel tiles with views; previews play on hover */
.ig-band { padding: clamp(36px, 5vw, 64px) 0; border-bottom: 1px solid var(--navy-12); }
.ig-head { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 28px); margin-bottom: 22px; }
.ig-avatar { flex: none; display: block; width: 88px; height: 88px; padding: 3px; border-radius: 50%; background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.ig-avatar img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--white); object-fit: cover; background: var(--white); }
.ig-id { min-width: 0; }
.ig-user { margin: 0; font-family: var(--font-body); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.ig-user a { text-decoration: none; }
.ig-user a span { font-weight: 500; color: var(--navy-80); }

.ig-stats { display: flex; gap: 20px; margin: 6px 0 4px; padding: 0; list-style: none; font-size: 0.98rem; }
.ig-stats strong { font-weight: 700; }
.ig-bio { margin: 0; color: var(--navy-70); font-size: 0.92rem; }
.ig-follow { margin-left: auto; flex: none; }
.ig-follow svg { width: 18px; height: 18px; margin-right: 8px; }
.ig-posts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border-radius: var(--radius-lg); overflow: hidden; }
.ig-post { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--navy); color: var(--white); text-decoration: none; }
.ig-post img, .ig-post video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ig-post video { opacity: 0; transition: opacity 0.3s; }
.ig-post.is-playing video { opacity: 1; }
.ig-post::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 32%); pointer-events: none; }
.ig-post:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.ig-kind { position: absolute; top: 10px; right: 10px; z-index: 1; width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.ig-kind svg { width: 100%; height: 100%; }
.ig-views, .ig-likes { position: absolute; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.ig-views { left: 12px; font-size: 1.02rem; }
.ig-likes { right: 12px; font-size: 0.9rem; opacity: 0; transition: opacity 0.2s; }
.ig-likes span { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }
.ig-views svg { width: 20px; height: 20px; }
.ig-likes svg { width: 16px; height: 16px; }
.ig-post:hover .ig-likes, .ig-post:focus-visible .ig-likes { opacity: 1; }
@media (hover: none) { .ig-likes { opacity: 1; } }
@media (max-width: 760px) {
  .ig-head { flex-wrap: wrap; gap: 14px; }
  .ig-avatar { width: 68px; height: 68px; }
  .ig-id { flex: 1 1 0; }
  .ig-follow { margin-left: 0; width: 100%; justify-content: center; }
  .ig-posts { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 0; margin-inline: calc(var(--gutter, 20px) * -1); padding-inline: var(--gutter, 20px); scrollbar-width: none; }
  .ig-posts::-webkit-scrollbar { display: none; }
  .ig-post { flex: 0 0 60%; scroll-snap-align: start; border-radius: 8px; }
}
/* the post viewer: Instagram's own player, with arrows to the next post */
.ig-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.ig-viewer::backdrop { background: rgba(7, 20, 45, 0.92); }
.ig-viewer[open] { display: grid; place-items: center; }
.ig-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ig-frame { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 96px); overflow-y: auto; border-radius: 12px; background: var(--white); }
.ig-frame iframe { display: block; width: 100%; height: 780px; border: 0; }
.ig-open { color: var(--white); font-size: 0.9rem; font-weight: 600; }
.ig-card { color: #000; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.ig-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.ig-card-head img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #dbdbdb; }
.ig-card-head strong { font-size: 0.9rem; }
.ig-card-head .btn { margin-left: auto; padding: 7px 12px; font-size: 0.68rem; }
.ig-card-media { position: relative; display: grid; place-items: center; height: min(62dvh, 640px); background: #000; text-decoration: none; }
.ig-card-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ig-card-play { position: absolute; width: 74px; height: 74px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); }
.ig-card-play::after { content: ""; position: absolute; left: 29px; top: 22px; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.ig-card-note { position: absolute; top: calc(50% + 52px); color: #fff; font-size: 0.85rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.ig-card-body { padding: 12px 14px 16px; font-size: 0.88rem; line-height: 1.45; }
.ig-card-counts { margin: 0 0 6px; font-weight: 600; }
.ig-card-caption { margin: 0 0 8px; white-space: pre-line; }
.ig-card-date { margin: 0; color: #737373; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.02em; }
.ig-viewer .g-prev { left: max(12px, calc(50vw - 300px)); }
.ig-viewer .g-next { right: max(12px, calc(50vw - 300px)); }
@media (max-width: 640px) { .ig-viewer .g-nav { top: auto; bottom: 18px; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.82); padding-block: clamp(64px, 8vw, 96px) 32px; font-size: 0.95rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer img.logo { height: 66px; width: auto; margin-bottom: 22px; }
.site-footer h4 { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); display: grid; place-items: center; transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.socials a:hover { background: var(--white); border-color: var(--white); color: var(--navy); text-decoration: none; }
.socials svg { width: 17px; height: 17px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 960px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Signature motion: the logo's ring draws itself behind each hero ---------- */
.hero .hero-ring path, .page-hero .hero-ring path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ringDraw 2.4s var(--ease) 0.2s forwards; }
@keyframes ringDraw { to { stroke-dashoffset: 0; } }

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

/* ---------- Misc ---------- */
.callout { border-left: 2px solid var(--navy); padding: 6px 0 6px 22px; margin: 28px 0; color: var(--navy-80); font-style: italic; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pill-list li { border: 1px solid var(--navy-20); border-radius: 999px; padding: 8px 18px; font-size: 0.92rem; }
.on-navy .pill-list li { border-color: rgba(255, 255, 255, 0.3); }
.divider { height: 1px; background: var(--navy-12); border: 0; margin: 0; }
.testimonial .quote-mark { font-size: 3.4rem; margin-bottom: 6px; opacity: 0.22; }

/* ---------- Horse cards as links + record links ---------- */
a.horse-card { text-decoration: none; color: inherit; }
.horse-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.horse-links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--navy-20); font-size: 0.82rem; font-weight: 600; text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.horse-links a::after { content: "↗"; font-size: 0.8rem; opacity: 0.6; }
.horse-links a:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- Testimonial photo cards (home) ---------- */
.t-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.t-card {
  position: relative; display: block; aspect-ratio: 3 / 4.7; border-radius: var(--radius-lg); overflow: hidden;
  color: var(--white); text-decoration: none; background: var(--navy); isolation: isolate;
  box-shadow: var(--shadow);
}
.t-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; z-index: -2; transition: transform 1s var(--ease); }
.t-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7, 20, 45, 0) 0%, rgba(7, 20, 45, 0) 40%, rgba(7, 20, 45, 0.82) 62%, rgba(7, 20, 45, 0.96) 100%);
  transition: background-color 0.4s;
}
.t-card:hover img { transform: scale(1.05); }
.t-overlay { position: absolute; inset: auto 0 0 0; padding: clamp(20px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 10px; }
.t-card .quote-mark { font-size: 3.2rem; line-height: 0.5; margin: 0; opacity: 0.7; }
.t-card blockquote { margin: 0; font-size: 0.92rem; line-height: 1.55; font-style: italic; }
.t-who { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.t-name { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.06em; }
.t-horse { font-size: 0.82rem; opacity: 0.8; }
.t-more { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; }
.t-card:hover .t-more { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1080px) { .t-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .t-cards { grid-template-columns: 1fr; }
  .t-card { aspect-ratio: 4 / 5.3; }
}

/* ---------- Testimonial stories (testimonials page) ---------- */
.stories { display: grid; gap: clamp(72px, 9vw, 120px); }
.story { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 88px); align-items: start; scroll-margin-top: calc(var(--header-h) + 24px); }
.story.reverse .story-media { order: 2; }
.story-media { position: sticky; top: calc(var(--header-h) + 24px); }
.story-media .lead-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.story-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.story-extra img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.story-body .quote-mark { font-size: 4.4rem; opacity: 0.25; margin-bottom: 10px; }
.story-lead { font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.4; letter-spacing: 0.01em; margin-bottom: 1.2em; }
.story-body p { color: var(--navy-80); }
.story-body .t-who { align-items: center; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--navy-12); }
.story-body .t-horse { color: var(--navy-70); opacity: 1; }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .story.reverse .story-media { order: 0; }
  .story-media { position: static; }
}

/* ---------- Team portraits ---------- */
.team-group { max-width: 960px; margin: clamp(48px, 6vw, 80px) auto 0; }
.team-group img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.team-group figcaption { margin-top: 12px; text-align: center; font-size: 0.9rem; font-style: italic; color: var(--navy-70); }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 36px); }
@media (max-width: 1080px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.team-card .portrait { width: 168px; height: 168px; }
.team-card .portrait span { font-family: var(--font-display); }

/* ---------- Facility gallery ---------- */
.facility-gallery { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: clamp(40px, 5vw, 56px); }
.facility-gallery figure { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; height: clamp(240px, 32vw, 440px); background: rgba(255, 255, 255, 0.06); }
.facility-gallery img { width: 100%; height: 100%; object-fit: cover; }
.facility-gallery figcaption { position: absolute; left: 14px; bottom: 12px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--white); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
@media (max-width: 760px) { .facility-gallery { grid-template-columns: 1fr; } }

/* ---------- Instagram band ---------- */
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Server-rendered pages (v9) ---------- */
.footer-title { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--white); margin: 0 0 18px; }
.chip .count { opacity: 0.8; }
.horse-card .badges { position: absolute; left: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.horse-card .badges .badge { position: static; box-shadow: 0 2px 10px rgba(11, 29, 63, 0.15); }
.badge.is-available { background: var(--navy); color: var(--white); }
.horse-card[hidden], .show[hidden], .month[hidden], .next-show[hidden] { display: none; }
.horse-card .name { font-size: 1.45rem; }
.show .title { margin: 0; font-weight: 400; }
.month-head { font-weight: 700; }
.story-lead { margin-top: 0; }

.horse-page { padding-top: calc(var(--header-h) + 32px); }
.has-hero .horse-page ~ * {}
.horse-wrap { padding-block: 8px clamp(48px, 6vw, 80px); }
.crumbs { display: flex; gap: 10px; font-size: 0.85rem; color: var(--navy-70); margin-bottom: 24px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.horse-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
/* Meet the herd (home): one wall of photos, a tile per horse, names on hover or focus */
.herd-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; gap: 4px; border-radius: var(--radius-lg); overflow: hidden; }
.herd-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--navy); }
.herd-tile.is-big { grid-column: span 2; grid-row: span 2; }
.herd-tile img { width: 100%; height: 100%; object-fit: cover; }
.herd-name {
  position: absolute; inset: auto 0 0; padding: 28px 14px 12px; color: var(--white);
  background: linear-gradient(0deg, rgba(7, 20, 45, 0.85), rgba(7, 20, 45, 0));
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.03em; opacity: 0; transition: opacity 0.25s var(--ease);
}
.herd-tile.is-big .herd-name { padding: 44px 20px 16px; font-size: 1.5rem; }
.herd-tile:hover .herd-name, .herd-tile:focus-visible .herd-name { opacity: 1; }
.herd-tile:focus-visible { outline: 3px solid var(--white); outline-offset: -3px; }
.herd-more { display: grid; place-items: center; padding: 16px; background: var(--navy); color: var(--white); text-align: center; text-decoration: none; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.03em; }
.herd-more:hover { background: var(--navy-80); }
@media (max-width: 760px) {
  .herd-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .herd-more { grid-column: 1 / -1 !important; min-height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .herd-name { transition: none; } }

.gallery .main { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--mist); aspect-ratio: 1 / 1.05; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.g-nav {
  position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--navy); cursor: pointer;
  box-shadow: 0 2px 12px rgba(7, 20, 45, 0.22); transition: background-color 0.2s, transform 0.2s var(--ease);
}
.g-nav:hover { background: var(--white); }
.g-nav svg { width: 22px; height: 22px; }
.g-prev { left: 14px; }
.g-prev svg { transform: rotate(90deg); }
.g-next { right: 14px; }
.g-next svg { transform: rotate(-90deg); }
.g-count { position: absolute; left: 14px; bottom: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(7, 20, 45, 0.62); color: var(--white); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; pointer-events: none; }
.g-zoom { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(7, 20, 45, 0.62); color: var(--white); cursor: pointer; }
.g-zoom svg { width: 18px; height: 18px; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7, 20, 45, 0.97); }
.lightbox::backdrop { background: rgba(7, 20, 45, 0.97); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); object-fit: contain; }
.lb-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: var(--white); cursor: pointer; }
.lb-close svg { width: 22px; height: 22px; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 10px; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: none; opacity: 0.7; }
.gallery .thumbs button[aria-current="true"] { border-color: var(--navy); opacity: 1; }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Instagram stories button under the horse photos */
.ig-stories {
  display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 16px 22px;
  background: var(--navy); color: var(--white); border-radius: var(--radius-lg); text-decoration: none;
  box-shadow: 0 10px 24px rgba(11, 29, 63, 0.18);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.ig-stories:hover { background: var(--navy-deep); transform: translateY(-1px); }
.ig-ring {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); padding: 3px;
}
.ig-ring svg { width: 100%; height: 100%; padding: 10px; border-radius: 50%; background: var(--navy); color: var(--white); }
.ig-stories:hover .ig-ring svg { background: var(--navy-deep); }
.ig-stories-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ig-stories-text strong { font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; }
.ig-stories-text small { font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); }
.ig-stories-go { margin-left: auto; font-size: 1.3rem; opacity: 0.8; transition: transform 0.25s var(--ease); }
.ig-stories:hover .ig-stories-go { transform: translate(2px, -2px); }
.horse-info .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.horse-info .badges .badge { box-shadow: 0 0 0 1px var(--navy-20); }
.horse-info h1 { font-size: clamp(2.4rem, 4.4vw, 3.4rem); margin: 0 0 6px; }
.horse-info .show-name { font-style: italic; color: var(--navy-70); margin-bottom: 26px; }
.horse-story { color: var(--navy-80); }
.h-small { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-70); margin: 28px 0 12px; }
@media (max-width: 860px) { .horse-layout { grid-template-columns: 1fr; } }
/* the horse page has no photo header, so the header starts solid */
body:has(.horse-page) .site-header::before { opacity: 1 !important; }
body:has(.horse-page) .site-header { color: var(--navy) !important; }
body:has(.horse-page) .site-header .logo-navy { display: block !important; }
body:has(.horse-page) .site-header .logo-white { display: none !important; }
body:has(.horse-page) .site-header .quick .btn { background: var(--navy) !important; color: var(--white) !important; border-color: var(--navy) !important; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 4px 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--white); font-family: var(--font-display); }
.plain { list-style: none; padding: 0; margin: 0 0 20px; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--navy-12); }

.facility-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facility-gallery figure { height: clamp(200px, 24vw, 320px); }
@media (max-width: 860px) { .facility-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facility-gallery { grid-template-columns: 1fr; } }
.steps-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
@media (max-width: 760px) { .steps-wide { grid-template-columns: 1fr; } }
.show .results { margin: 8px 0 0; padding-left: 1.1em; font-size: 0.92rem; color: var(--navy-80); }
.grid-4 .program-card h3 { font-size: 1.2rem; }
.grid-4 .program-card p { font-size: 0.95rem; }
div.horse-card { cursor: default; }
div.horse-card:hover { transform: none; box-shadow: 0 0 0 1px var(--navy-12); }

/* ---------- v12: Wix-driven roster, programs index, landscape band ---------- */
.offer-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.offer-media { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.offer-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.offer-media figcaption { margin-top: 10px; font-size: 0.85rem; font-style: italic; color: var(--navy-70); }
.offer-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--navy-12); }
.offer-list a { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 4px 28px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--navy-12); text-decoration: none; transition: padding 0.3s var(--ease), background-color 0.3s var(--ease); }
.offer-list a:hover { padding-inline: 14px; background: var(--mist); }
.offer-list .t { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.03em; line-height: 1.3; }
.offer-list .d { color: var(--navy-80); font-size: 0.98rem; line-height: 1.6; }
@media (max-width: 900px) { .offer-layout { grid-template-columns: 1fr; } .offer-media { position: static; } .offer-media img { aspect-ratio: 16 / 10; } }
@media (max-width: 600px) { .offer-list a { grid-template-columns: 1fr; } }

.land-band { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: clamp(440px, 64vh, 660px); color: var(--white); background: var(--navy-deep); }
.land-band > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.land-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 20, 45, 0.82) 0%, rgba(7, 20, 45, 0.1) 65%); }
.land-band .wrap { padding-block: clamp(48px, 8vw, 96px); }
.land-num { font-family: var(--font-display); font-size: clamp(3.2rem, 9vw, 7rem); line-height: 1; letter-spacing: 0.02em; margin: 0 0 14px; }
.land-text { max-width: 560px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255, 255, 255, 0.9); margin: 0 0 26px; }

.horse-card .photo .ph, .gallery .main .ph { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--font-display); font-size: 4.5rem; color: var(--navy-20); background: var(--mist); }
.horse-card .note { margin-top: 10px; font-size: 0.86rem; font-style: italic; color: var(--navy-80); }
.availability { margin: 0 0 24px; padding: 2px 22px 4px; border-radius: var(--radius-lg); background: var(--mist); }
.availability .h-small { margin-top: 16px; }
.empty-note { grid-column: 1 / -1; color: var(--navy-70); }
.show-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 0.84rem; }
.show-meta .level { color: var(--navy-70); }
.show-meta a { font-weight: 600; }
.nav-apps { margin-top: 18px; }

.text-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; background: var(--navy); color: var(--white); text-decoration: none; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; box-shadow: var(--shadow-lg); }
.text-fab svg { width: 18px; height: 18px; }
.text-fab { border: 1.5px solid rgba(255, 255, 255, 0.7); }   /* stays visible over the navy sections */
.contact-btns { display: flex; gap: 10px; margin-top: 12px; }
.contact-btns .btn svg { width: 16px; height: 16px; margin-right: 6px; }
.text-fab:hover { background: var(--navy-deep); }
.nav-open .text-chat { display: none; }
.text-chat-panel { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 41; width: min(320px, calc(100vw - 32px)); padding: 22px 22px 16px; border-radius: var(--radius-lg); background: var(--white); color: var(--navy); box-shadow: var(--shadow-lg), 0 0 0 1px var(--navy-12); }
.text-chat-panel[hidden] { display: none; }
.text-chat-panel .tc-title { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.03em; margin: 0 0 8px; }
.text-chat-panel p { font-size: 0.95rem; margin: 0 0 14px; }
.text-chat-panel .btn-row { gap: 10px; margin-bottom: 12px; }
.text-chat-panel .small { margin: 0; }

/* ---------- v13: who rides with us, Adult Riders page ---------- */
.offer-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
/* 2 x 2, the wide card alternating sides: adult amateurs | kids starting out, adult beginners | competitive juniors */
.riders { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); margin-bottom: clamp(64px, 8vw, 104px); }
.riders > .rider { grid-column: span 10; }
.riders > .rider-main { grid-column: span 13; }
.rider { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(360px, 32vw, 460px); border-radius: var(--radius-lg); overflow: hidden; color: var(--white); text-decoration: none; isolation: isolate; background: var(--navy); }
.rider img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.rider::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 20, 45, 0.92) 0%, rgba(7, 20, 45, 0.55) 38%, rgba(7, 20, 45, 0) 65%); }
.rider:hover img { transform: scale(1.04); }
.rider-body { display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 2.4vw, 30px); }
.rider-title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.15; letter-spacing: 0.03em; }
.rider-main .rider-title { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
.rider-text { font-size: 0.98rem; line-height: 1.6; color: rgba(255, 255, 255, 0.88); }
.rider-more { align-self: flex-start; margin-top: 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(255, 255, 255, 0.5); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.offer-sub { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-70); margin: 0 0 4px; }
.offer-layout .offer-list { margin-top: 14px; }
@media (max-width: 900px) { .riders { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .riders > .rider, .riders > .rider-main { grid-column: auto; } }
@media (max-width: 600px) { .riders { grid-template-columns: minmax(0, 1fr); } .rider { min-height: 360px; } }

.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 64px); margin: 0; }
.glossary div { padding: 18px 0; border-top: 1px solid var(--navy-12); }
.glossary dt { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.03em; }
.glossary dd { margin: 6px 0 0; color: var(--navy-80); }
@media (max-width: 760px) { .glossary { grid-template-columns: minmax(0, 1fr); } }
.horse-card .ig-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.84rem; font-weight: 600; color: var(--navy-80); }
.horse-card .ig-note svg { width: 16px; height: 16px; }

/* ---------- Lesson booking (/service-page/…, rendered by the Wix site) ---------- */
.lesson-media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--mist); margin-bottom: 28px; }
.lesson-media img { width: 100%; height: 100%; object-fit: cover; }
.lesson-price { font-family: var(--font-display); font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1; margin: 4px 0 6px; }
.lesson-per { color: var(--navy-70); font-size: 0.95rem; margin: 0 0 22px; }
.booking-card h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); margin: 0 0 6px; }
.booking-card .h-small:first-of-type { margin-top: 22px; }
.bk-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.bk-day, .bk-pager { flex: 0 0 68px; min-height: 64px; border: 1px solid var(--navy-20); border-radius: var(--radius); background: var(--white); text-align: center; line-height: 1.2; padding: 8px 4px; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.bk-day .wd { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.bk-day .dn { display: block; font-size: 1.3rem; font-weight: 600; }
.bk-pager { font-size: 0.74rem; font-weight: 600; }
.bk-day:hover, .bk-pager:hover, .bk-slot:hover:not(:disabled) { border-color: var(--navy); }
.bk-day[aria-pressed="true"], .bk-slot[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.bk-skeleton { flex: 0 0 68px; height: 64px; border-radius: var(--radius); background: var(--mist); animation: bk-pulse 1.4s ease-in-out infinite; }
@keyframes bk-pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .bk-skeleton { animation: none; } }
.bk-dayhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin: 22px 0 12px; }
.bk-dayhead strong { font-size: 1rem; }
.bk-dayhead span, .bk-tz { font-size: 0.85rem; color: var(--navy-70); }
.bk-bucket + .bk-bucket { margin-top: 14px; }
.bk-bucket p { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy-70); margin: 0 0 8px; }
.bk-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-slot { min-height: 44px; padding: 0 16px; border: 1px solid var(--navy-20); border-radius: var(--radius); background: var(--white); font-size: 0.95rem; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.bk-slot:disabled { cursor: not-allowed; color: var(--navy-55); text-decoration: line-through; background: var(--mist); }
.bk-empty { font-size: 0.95rem; color: var(--navy-70); margin: 8px 0 0; }
.bk-link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.bk-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-card .form { margin-top: 22px; }
.bk-error { color: #b42318; font-size: 0.95rem; margin: 16px 0 0; }
.booking-card .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.bk-done { text-align: center; padding: 12px 0; }
.bk-done h2 { margin-bottom: 10px; }

/* ---------- Contact form (Wix Forms, on the Wix site) ---------- */
.field .req { color: var(--navy-70); }
.field-label, .field legend { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-70); margin-bottom: 8px; padding: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field label.choice { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--navy); }
.field .choice input[type="checkbox"], .field .choice input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--navy); }
.field [aria-invalid="true"] { border-color: #b42318; }
.field-help { font-size: 0.85rem; color: var(--navy-70); margin: 6px 0 0; }
.field-error { color: #b42318; font-size: 0.85rem; margin: 6px 0 0; }
.field-error:empty { display: none; }
.form-error { grid-column: 1 / -1; color: #b42318; font-size: 0.95rem; margin: 0; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.field-skeleton { height: 76px; border-radius: var(--radius); background: var(--mist); animation: bk-pulse 1.4s ease-in-out infinite; }
.field-skeleton.tall { height: 180px; }
@media (prefers-reduced-motion: reduce) { .field-skeleton { animation: none; } }
.form-done { padding: 22px 24px; border-radius: var(--radius); background: var(--mist); }
.form-done:focus { outline: none; }
.form-done p { margin: 0 0 12px; }

/* ---------- Home hero: what we do, under the name (part of the h1 for search engines) ---------- */
.hero h1 .h1-sub {
  display: block; margin-top: 1.1em; max-width: 30em;
  font-family: var(--font-body); font-weight: 500; font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.5; letter-spacing: 0.02em; text-transform: none; color: rgba(255, 255, 255, 0.92);
}

/* ---------- Google reviews strip ---------- */
.g-reviews-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.g-reviews-head h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.g-rating { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; text-decoration: none; color: var(--navy-80); font-size: 0.98rem; }
.g-rating strong { color: var(--navy); }
.g-rating .g-more { text-decoration: underline; text-underline-offset: 3px; }
.g-stars { color: #b8860b; letter-spacing: 2px; font-size: 1.05rem; }
.g-review { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.g-review blockquote { margin: 0; font-style: italic; color: var(--navy-80); line-height: 1.6; }
.g-review figcaption { font-weight: 600; font-size: 0.92rem; }
.g-review figcaption span { display: block; font-weight: 400; color: var(--navy-70); }

/* ---------- Family block on horse pages: drawn like the Root System app's own 2D chart ---------- */
.family-dark {
  --ft-ink: #fff; --ft-ink-2: rgba(255,255,255,.74); --ft-ink-3: rgba(255,255,255,.52);
  --ft-line: rgba(255,255,255,.14); --ft-line-strong: rgba(255,255,255,.32);
  margin-top: clamp(40px, 5vw, 64px); background: #07142d; color: var(--ft-ink); border-radius: var(--radius-lg, 16px);
  padding: clamp(22px, 3vw, 40px); scroll-margin-top: calc(var(--header-h) + 16px);
}
.fd-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 30px; }
.fd-label { margin: 0 0 10px; font: 600 .72rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--ft-ink-3); }
.family-dark h2 { margin: 0 0 6px; color: var(--ft-ink); font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.fd-sub { margin: 0; color: var(--ft-ink-2); font-size: .95rem; }
.fd-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--ft-line-strong); border-radius: 6px; color: var(--ft-ink); text-decoration: none; font: 600 .76rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; }
.fd-btn:hover { border-color: var(--ft-ink); }
.fd-btn.solid { background: var(--ft-ink); color: var(--navy); border-color: var(--ft-ink); }
.ft-wrap { overflow-x: auto; padding-bottom: 6px; }
.ft-chart { position: relative; margin: 0 auto; }
.ft-chart svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.ft-chart svg text { font: 500 11px var(--font-body); fill: var(--ft-ink-3); letter-spacing: .06em; }
.ft-box { box-sizing: border-box; position: absolute; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--ft-line-strong); border-radius: 6px; background: var(--navy); color: var(--ft-ink); font-size: 14px; line-height: 1.25; text-decoration: none; }
a.ft-box:hover { border-color: var(--ft-ink); }
.ft-box .t { min-width: 0; display: grid; }
.ft-box .t b, .ft-box .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-box .t b { font-weight: 700; }
.ft-box .t span { color: var(--ft-ink-3); font-size: 12px; font-variant-numeric: lining-nums tabular-nums; }
.ft-box img { width: 30px; height: auto; aspect-ratio: 4 / 4.2; border-radius: 3px; object-fit: cover; flex: none; }
.ft-box.chosen { border: 2px solid var(--c); }
.ft-box.meet { background: var(--ft-ink); border-color: var(--ft-ink); color: var(--navy); box-shadow: 0 0 18px rgba(255,255,255,.25); }
.ft-box.meet .t span { color: rgba(11,29,63,.65); }
.ft-box.unknown { border-style: dashed; border-color: var(--ft-line); background: transparent; }
.ft-box.unknown .t b { font-weight: 500; font-style: italic; color: var(--ft-ink-3); }
.fd-relative { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--ft-line); }
.fd-relative .ft-chart { margin: 0; }
.fd-text h3 { margin: 0 0 8px; color: var(--ft-ink); font-size: 1.7rem; }
.fd-text p { color: var(--ft-ink-2); margin: 0 0 18px; max-width: 46ch; }
.fd-text strong { color: var(--ft-ink); }
.fd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fd-also { font-size: .9rem; color: var(--ft-ink-3); }
.fd-also a { color: var(--ft-ink-2); text-underline-offset: 3px; }
@media (max-width: 860px) { .fd-relative { grid-template-columns: 1fr; } .fd-relative .ft-wrap { margin-inline: auto; } }

.tree-page > .section { background: var(--white); }
.tree-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 24px; }
.tree-list li { padding: 8px 0; border-bottom: 1px solid var(--navy-12); }

/* ---------- Horse cards with a family tree: a whole-card link plus "See family tree" ---------- */
.horse-card.has-tree { position: relative; cursor: pointer; }
div.horse-card.has-tree:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.horse-card .card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.horse-card .card-link:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.horse-card .tree-link {
  position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 22px; background: var(--navy); color: var(--white); text-decoration: none;
  font: 600 0.74rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase;
}
.horse-card .tree-link span { font-size: 1rem; letter-spacing: 0; transition: transform 0.25s var(--ease); }
.horse-card .tree-link:hover { background: var(--navy-80); }
.horse-card .tree-link:hover span { transform: translateX(4px); }

/* ---------- Family-tree tile in the home page's horse wall (a double square) ---------- */
.herd-tree { position: relative; display: block; grid-column: span 2; grid-row: span 2; aspect-ratio: 1; overflow: hidden; background: #07142d; color: var(--white); text-decoration: none; }
.herd-tree img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.herd-tree:hover img { transform: scale(1.04); }
.herd-tree::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,20,45,.92) 0%, rgba(7,20,45,.35) 45%, rgba(7,20,45,0) 70%); }
.herd-tree-body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: grid; gap: 6px; padding: 22px 22px 20px; }
.herd-tree-eyebrow { font: 600 0.7rem/1 var(--font-body); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.herd-tree-title { font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.15; }
.herd-tree-go { justify-self: start; margin-top: 8px; padding: 9px 16px; border: 1px solid rgba(255,255,255,.75); border-radius: 4px; font: 600 0.7rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; }
.herd-tree:hover .herd-tree-go { background: var(--white); color: var(--navy); }
.herd-tree:focus-visible { outline: 3px solid var(--white); outline-offset: -3px; }

/* ---------- Family Tree page: no top bar, the app fills the screen under the header ---------- */
.tree-body { --topbar-h: 0px; --header-h: var(--bar-h); }
.tree-body .topbar { display: none; }
.tree-body .site-header { background: #07142d; }   /* a solid fixed header is what Safari samples for its top bar */
/* one screen, no page scrolling: every scroll and drag goes to the tree */
/* navy behind everything: iPhone Safari tints its top and bottom bars from the page's own background (white elsewhere on the site) */
html:has(body.tree-body) { overflow: hidden; height: 100%; overscroll-behavior: none; background: #07142d; }
body.tree-body { overflow: hidden; height: 100%; overscroll-behavior: none; background: #07142d; }
.tree-body .site-footer, .tree-body .text-chat { display: none; }   /* the tree page is busy enough: no footer, no Text us button */
.tree-page { padding-top: var(--bar-h); }
.tree-page .tree-frame { position: relative; height: calc(100svh - var(--bar-h)); height: calc(100dvh - var(--bar-h)); }   /* dvh: grows as Safari's bars shrink */
.tree-back {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid rgba(255,255,255,.32); border-radius: 6px;
  background: rgba(11,29,63,.88); color: var(--white); text-decoration: none; font: 600 0.74rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.tree-back:hover { border-color: var(--white); }
/* Phones: the back link sits in the header, between the logo and the Instagram button, out of the tree's way. */
@media (max-width: 760px) {
  .tree-back { position: fixed; top: calc(var(--bar-h) / 2); left: 50%; transform: translate(-50%, -50%); z-index: 130; max-width: calc(100% - 250px); padding: 8px 10px; gap: 6px; font-size: .66rem; letter-spacing: .06em; }
  .tree-back .back-to { display: none; }
  /* a slimmer header: Safari already leaves a band under the clock */
  .tree-body, .tree-body .site-header { --bar-h: 44px; }
  .tree-body .brand img { height: 36px; }
  /* the tree runs on behind Safari's floating address bar, down to the bottom of the screen (the app keeps its controls 120px up) */
  .tree-page .tree-frame { position: fixed; left: 0; right: 0; top: var(--bar-h); bottom: -120px; height: auto; z-index: 101; }   /* above the header: its back link lives inside the frame box */
  .tree-back .who { overflow: hidden; text-overflow: ellipsis; }
}
.tree-page { background: #07142d; }
/* width 1px + min-width: iOS Safari otherwise widens a frame to fit its content, pushing the tree's controls off screen */
.tree-page .tree-frame iframe { display: block; width: 1px; min-width: 100%; height: 100%; border: 0; }

/* ---------- Family block on phones: the wide chart gives way to a stacked version ---------- */
.ftp { display: none; }
@media (max-width: 760px) {
  .family-dark .ft-tree { display: none; }
  .ftp { display: grid; gap: 14px; }
  .ftp b { display: block; font-weight: 700; font-size: .98rem; line-height: 1.25; }
  .ftp b.unk { font-weight: 500; font-style: italic; color: var(--ft-ink-3); }
  .ftp span { color: var(--ft-ink-3); font-size: .78rem; font-variant-numeric: lining-nums tabular-nums; }
  .ftp-horse { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 6px; background: var(--ft-ink); color: var(--navy); box-shadow: 0 0 18px rgba(255,255,255,.2); }
  .ftp-horse span { color: rgba(11,29,63,.65); }
  .ftp-horse img { width: 36px; height: auto; aspect-ratio: 4 / 4.2; border-radius: 3px; object-fit: cover; }
  .ftp-side { border-left: 2px solid var(--c); padding-left: 14px; display: grid; gap: 10px; }
  .ftp-role { display: block; color: var(--c, var(--ft-ink-3)) !important; font: 600 .66rem/1 var(--font-body) !important; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }
  .ftp-parent { padding: 9px 12px; border: 1px solid var(--ft-line-strong); border-radius: 6px; background: var(--navy); }
  .ftp-gps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ftp-gp { padding: 9px 10px; border: 1px solid var(--ft-line); border-radius: 6px; min-width: 0; }
  .ftp-gp .ftp-role { color: var(--ft-ink-3) !important; }
  .ftp-gp b { font-size: .88rem; overflow-wrap: anywhere; }
  .ftp-gp ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--ft-line); display: grid; gap: 4px; }
  .ftp-gp li { font-size: .78rem; color: var(--ft-ink-2); line-height: 1.35; overflow-wrap: anywhere; }
  .ftp-gp li em { font-style: normal; color: var(--ft-ink-3); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; }
}

/* ---------- Home horse wall on phones: single-size horse tiles, the family-tree tile as a full-width band ---------- */
@media (max-width: 760px) {
  .herd-tile.is-big { grid-column: span 1; grid-row: span 1; }
  .herd-tile.is-big .herd-name { padding: 28px 10px 8px; font-size: 1rem; }
  .herd-tree { grid-column: 1 / -1; grid-row: span 1; aspect-ratio: 4 / 3; }
}

/* Phones: Our Horses is a summary, two horses side by side; the Instagram
   reels on the home page show at about a third of the screen so more fit. */
@media (max-width: 760px) {
  .horse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .horse-card .photo { aspect-ratio: 4 / 4.6; }
  .horse-card .body { padding: 10px 10px 12px; gap: 2px; }
  .horse-card .name { font-size: 1.08rem; }
  .horse-card .show-name { font-size: 0.74rem; }
  .horse-card .specs { margin-top: 6px; padding-top: 6px; font-size: 0.7rem; line-height: 1.45; }
  .horse-card .note, .horse-card .ig-note { margin-top: 6px; font-size: 0.7rem; }
  .horse-card .badges { left: 6px; top: 6px; gap: 4px; }
  .horse-card .badge, .horse-card .badges .badge { left: 6px; top: 6px; font-size: 0.56rem; padding: 4px 7px; letter-spacing: 0.1em; }
  .horse-card .tree-link { padding: 9px 10px; font-size: 0.58rem; letter-spacing: 0.1em; gap: 6px; }
  .horse-card .tree-link span { font-size: 0.8rem; }
  .ig-post { flex-basis: 31%; border-radius: 6px; }
  .ig-kind { top: 6px; right: 6px; width: 16px; height: 16px; }
  .ig-views { left: 7px; bottom: 6px; font-size: 0.78rem; gap: 4px; }
  .ig-views svg { width: 14px; height: 14px; }
  .ig-likes { display: none; }
}

/* Phones, once the page scrolls: Safari paints the band under the clock in
   the colour of any solid fixed bar touching the top edge. Fold the navy
   Instagram strip away and leave the white menu's top 10px see-through, so
   the page scrolls under the menu and on up under the clock. */
@media (max-width: 760px) {
  /* At the top of the page the header scrolls with it, so no solid bar is
     pinned to the top edge when Safari picks the band's colour on load. */
  body:not(.tree-body):not(.nav-open) .site-header:not(.is-scrolled) { position: absolute; }
  /* The band above the Instagram strip on load: navy, like the strip. */
  body:not(.tree-body) { background: var(--navy-deep); }
  body:not(.tree-body) > main { background: var(--white); }
  body:not(.tree-body):not(.nav-open) .site-header.is-scrolled { padding-top: 10px; }
  body:not(.tree-body):not(.nav-open) .site-header.is-scrolled::before { top: 10px; }
  body:not(.tree-body):not(.nav-open) .site-header.is-scrolled .topbar { display: none; }
}
/* The closed mobile menu is an invisible full-screen navy layer; Safari still
   reads its colour at the top edge, so park it below the screen while closed
   (after its fade-out) and bring it back at once when it opens. */
@media all {
  .nav { top: 100vh; bottom: auto; height: 100vh; transition: opacity 0.35s var(--ease), visibility 0.35s, top 0s 0.35s; }
  .nav-open .nav { top: 0; transition: opacity 0.35s var(--ease), visibility 0.35s, top 0s; }
}

/* Phones, Family Tree page: the tree app is a fixed layer above the header,
   so lift the header (and its open menu) over it while the menu is open. */
@media (max-width: 760px) {
  .tree-body.nav-open .site-header, .nav-open .tree-body .site-header { z-index: 140; }
}

/* Header bar: the main pages and Book a Lesson. main.js hides links one at a time,
   least important first, when the bar runs out of room; the ☰ menu always has everything. */
.quick { flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex; align-items: center; gap: clamp(16px, 1.8vw, 28px); padding: 4px 2px; }
.quick-links { margin-left: auto !important; }
.quick-links { display: flex; align-items: center; gap: clamp(14px, 1.5vw, 26px); list-style: none; margin: 0; padding: 0; }
.quick-links a {
  position: relative; display: block; text-decoration: none; white-space: nowrap;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 0;
}
.quick-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.quick-links a:hover::after, .quick-links a[aria-current="page"]::after, .quick-links a.is-section::after { transform: scaleX(1); }
.quick-book { white-space: nowrap; flex: none; }
.quick [hidden] { display: none !important; }
.nav-open .quick { visibility: hidden; }
.mainbar .wrap { gap: 12px; }
