/* Horses Healing Hearts: the whole site's look.
 *
 * Tokens, type and rules come from
 * /Users/Main/Documents/dn_agent/entities/clients/horses-healing-hearts/design/DESIGN.md.
 * Warm cream paper, horse-brown ink, one hay accent, a dusk second voice, a light serif
 * for the few large lines and a humanist sans for reading. Motion lives in hhh.js; every
 * rule here describes the still, complete page.
 *
 * Class vocabulary (pages and partials use these):
 *   Layout     .wrap .wrap--wide .measure .band .band--tight .band--linen .band--dusk
 *              .band--night .band--flush .stack .split .split--reverse .section-head
 *   Type       .display-xl .display-lg .display-md .title .quote .lede .body-lg .eyebrow
 *              .caption .prose
 *   Actions    .btn (primary, once per page) .btn--quiet
 *   Chrome     .skip .nav .nav__inner .nav__brand .nav__menu .nav__links .nav__link
 *              .nav__link--contact .footer .footer__grid .footer__brand .footer__mark
 *              .footer__name .footer__nap .footer__links .footer__base
 *   Heroes     .hero .hero--full .hero--page .hero__media .hero__scrim .hero__content
 *              .page-head
 *   Images     .media .media--4x5 .media--3x4 .media--2x3 .media--3x2 .media--16x9 .arch
 *              .plate
 *   Sections   .core-line .paths .path .services .service .service__title .teach
 *              .teach__item .strip .strip__track .strip__item .mission .gallery
 *              .gallery__item .lightbox .faq .invite .invite__line .invite__phone
 *   Forms      .form .field .field__help .field__error .form__status .hp
 *   Body attr  <body data-hero="dark"> when the page opens on a full-bleed photo hero.
 */

/* ---------- Fonts (self-hosted Google Fonts files, Latin subset) ---------- */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/newsreader-roman.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/source-sans-3-roman.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-sans-3-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (DESIGN.md, CSS tokens) ---------- */

:root {
  color-scheme: light dark;

  --c-canvas: #f5efe3;
  --c-surface: #ede4d3;
  --c-hairline: #d9cbb3;
  --c-rule: #8f7a65;
  --c-ink: #2b1b12;
  --c-body: #46352a;
  --c-muted: #6b5747;
  --c-hay: #c0954a;
  --c-hay-hover: #b3863b;
  --c-hay-deep: #80591c;
  --c-dusk: #8b9db2;
  --c-dusk-deep: #4a5d72;
  --c-night: #1a1310;
  --c-on-night: #f2e9da;
  --c-on-night-muted: #c9b9a6;
  --c-heart: #c8524f;
  --c-error: #9e3a36;
  --c-scrim: rgba(26, 19, 16, 0.55);

  --f-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --f-text: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --t-display-xl: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);
  --t-display-lg: clamp(2.25rem, 1.5rem + 3.2vw, 4rem);
  --t-display-md: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  --t-title: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --t-quote: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --t-lede: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-body-lg: 1.1875rem;
  --t-body: 1.0625rem;
  --t-body-sm: 0.9375rem;
  --t-caption: 0.875rem;
  --t-eyebrow: 0.8125rem;

  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-base: 24px;
  --s-lg: 32px;
  --s-xl: 48px;
  --s-xxl: 72px;
  --s-gutter: clamp(16px, 4vw, 48px);
  --s-section: clamp(96px, 12vw, 176px);

  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-arch: 999px 999px 0 0;

  --w-measure: 64ch;
  --w-content: 1200px;
  --w-wide: 1440px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-quick: 160ms;
  --dur-reveal: 900ms;

  /* derived */
  --nav-h: 72px;
  --c-focus: var(--c-dusk-deep);
  --c-btn-text: var(--c-ink);
  --shadow-lift: 0 18px 40px -24px rgba(43, 27, 18, 0.35);
  --print-border: transparent;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .11 0 0 0 0 .07 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  --wash-dusk: color-mix(in srgb, var(--c-dusk) 10%, var(--c-canvas));
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-canvas: #1a1310;
    --c-surface: #241b16;
    --c-hairline: #3b2e25;
    --c-rule: #8a7663;
    --c-ink: #f2e9da;
    --c-body: #dccfbc;
    --c-muted: #ab9b8b;
    --c-hay: #d4a95c;
    --c-hay-hover: #e2bd78;
    --c-hay-deep: #d4a95c;
    --c-dusk: #a3b5c9;
    --c-dusk-deep: #a3b5c9;
    --c-night: #120d0b;
    --c-on-night: #f2e9da;
    --c-on-night-muted: #ab9b8b;
    --c-heart: #e07b74;
    --c-error: #e58a84;
    --c-scrim: rgba(18, 13, 11, 0.6);

    --c-btn-text: var(--c-canvas);
    --shadow-lift: none;
    --print-border: var(--c-hairline);
    --grain: none;
    --wash-dusk: color-mix(in srgb, var(--c-dusk) 8%, var(--c-canvas));
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + var(--s-base));
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--c-canvas);
  background-image: var(--grain);
  color: var(--c-body);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body:not([data-hero="dark"]) { padding-top: var(--nav-h); }

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class], .nav ul, .footer ul, .gallery, .services { list-style: none; padding: 0; }

img, picture, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: color-mix(in srgb, var(--c-hay) 40%, transparent); color: var(--c-ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.visually-hidden, .hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  top: var(--s-xs); left: var(--s-xs);
  z-index: 100;
  padding: var(--s-sm) var(--s-md);
  background: var(--c-ink);
  color: var(--c-canvas);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-sm);
  transform: translateY(-160%);
}
.skip:focus-visible { transform: none; }

/* ---------- Type ---------- */

h1, h2, h3, .display-xl, .display-lg, .display-md, .title, .quote, .lede {
  font-family: var(--f-display);
  color: var(--c-ink);
  text-wrap: balance;
}

.display-xl {
  font-size: var(--t-display-xl);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 72;
}

h1, .display-lg {
  font-size: var(--t-display-lg);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.012em;
  font-variation-settings: 'opsz' 72;
}
h1.display-xl { font-size: var(--t-display-xl); line-height: 1.02; letter-spacing: -0.015em; }

h2, .display-md {
  font-size: var(--t-display-md);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.008em;
}

h3, .title {
  font-size: var(--t-title);
  font-weight: 400;
  line-height: 1.25;
}

.quote {
  font-size: var(--t-quote);
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.lede {
  font-size: var(--t-lede);
  font-style: italic;
  font-weight: 300;
  line-height: 1.45;
  color: var(--c-body);
  max-width: 38ch;
}

.body-lg { font-size: var(--t-body-lg); line-height: 1.65; }

p { text-wrap: pretty; }
em, i { font-style: italic; }
strong, b { font-weight: inherit; } /* inline bold is outside the system */

.eyebrow {
  font-family: var(--f-text);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-hay-deep);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  margin-bottom: var(--s-sm);
  background: var(--c-hay);
}
.eyebrow--on-night { color: var(--c-hay); }

.caption, figcaption.caption {
  font-size: var(--t-caption);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--c-muted);
}

/* Running text: links, lists, measure */
.prose { max-width: var(--w-measure); }
.prose > * + * { margin-top: 1em; }
.prose > h2 { margin-top: var(--s-xl); }
.prose > h3 { margin-top: var(--s-lg); }
.prose > h2 + *, .prose > h3 + * { margin-top: var(--s-sm); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--c-hay-deep); }

/* Specificity (0,1,1), so the footer, nav and band rules later in the file win by order. */
:where(.prose, p, li, address, .field__help) a:not([class]) {
  color: var(--c-hay-deep);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness var(--dur-quick), color var(--dur-quick);
}
:where(.prose, p, li, address, .field__help) a:not([class]):hover {
  text-decoration-thickness: 2px;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(100% - 2 * var(--s-gutter), var(--w-content));
  margin-inline: auto;
}
.wrap--wide { width: min(100% - 2 * var(--s-gutter), var(--w-wide)); }
.measure { max-width: var(--w-measure); }
.wrap.measure { width: min(100% - 2 * var(--s-gutter), var(--w-measure)); }

.band { padding-block: var(--s-section); position: relative; }
.band--tight { padding-block: calc(var(--s-section) * 0.7); }
.band--flush { padding-block: 0; }
.band--linen { background-color: var(--c-surface); background-image: var(--grain); }
.band--dusk { background-color: var(--wash-dusk); }
.band--night { background: var(--c-night); color: var(--c-on-night-muted); --c-focus: var(--c-dusk); }
.band--night :is(h1, h2, h3, .quote, .lede) { color: var(--c-on-night); }

/* Two plain cream bands in a row share one section of space between them. */
.band:not(.band--linen, .band--dusk, .band--night, .band--flush, .band--tight)
  + .band:not(.band--linen, .band--dusk, .band--night, .band--flush, .band--tight) { padding-top: 0; }

.stack > * + * { margin-top: var(--s-base); }
.stack > .eyebrow + * { margin-top: var(--s-sm); }
.stack > h2 + .lede, .stack > h1 + .lede { margin-top: var(--s-lg); }
.stack > .btn, .stack > p:has(> .btn) { margin-top: var(--s-lg); }

.section-head { margin-bottom: clamp(var(--s-xl), 6vw, var(--s-xxl)); max-width: 40rem; }
.section-head > * + * { margin-top: var(--s-sm); }
.section-head h2 { max-width: 20ch; }
.section-head p:not(.eyebrow) { margin-top: var(--s-base); max-width: 52ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center h2 { margin-inline: auto; }
.section-head--center .eyebrow::before { margin-inline: auto; }
.section-head--row > div > * + * { margin-top: var(--s-sm); }
.section-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-base); }

/* Image on seven columns, text on five, alternating sides */
.split { display: grid; gap: var(--s-xl); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-base); row-gap: 0; }
  .split__media { grid-column: 1 / span 7; }
  .split__text { grid-column: 9 / span 4; }
  .split--reverse .split__media { grid-column: 6 / span 7; grid-row: 1; }
  .split--reverse .split__text { grid-column: 1 / span 4; grid-row: 1; }
}
.split + .split { margin-top: var(--s-section); }

/* ---------- Actions ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 16px 28px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--c-hay);
  color: var(--c-btn-text);
  font-family: var(--f-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-quick) ease;
}
.btn:hover, .btn:active { background: var(--c-hay-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn--quiet {
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: var(--c-ink);
  text-decoration-line: underline;
  text-decoration-color: var(--c-hay);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-thickness var(--dur-quick), text-decoration-color var(--dur-quick);
}
.btn--quiet:hover, .btn--quiet:active { background: transparent; text-decoration-thickness: 2px; }
.band--night .btn--quiet, .invite .btn--quiet { color: var(--c-on-night); }

/* ---------- Top navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  background: var(--c-canvas);
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-hairline);
  transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease, transform 500ms var(--ease-out);
}
.nav--over {
  background: transparent;
  color: var(--c-on-night);
  border-bottom-color: transparent;
  --c-focus: var(--c-on-night);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav__inner {
  width: min(100% - 2 * var(--s-gutter), var(--w-wide));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
}

.nav__brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  min-height: 44px;
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
}
.nav__brand svg { height: 30px; width: auto; fill: currentColor; }
@media (max-width: 639.98px) { .nav__brand svg { height: 24px; } }

.nav__links ul { display: flex; align-items: center; gap: clamp(var(--s-base), 2.4vw, 40px); }

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  white-space: nowrap;
  transition: text-decoration-color var(--dur-quick);
}
.nav__link:hover, .nav__link[aria-current="page"] { text-decoration-color: var(--c-hay); }
.nav__link--contact { padding-left: clamp(var(--s-base), 2.4vw, 40px); border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 25%, transparent); min-height: 20px; }

.nav__menu {
  position: relative;
  z-index: 2;
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--s-xxs);
  border: 0;
  background: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* Six full service names need about 1280px on one line; below that the Menu sheet holds them. */
@media (max-width: 1279.98px) {
  html.js .nav__menu { display: inline-flex; align-items: center; }
  html.js .nav__links {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + var(--s-lg)) var(--s-gutter) var(--s-xxl);
    background-color: var(--c-canvas);
    background-image: var(--grain);
    color: var(--c-ink);
    opacity: 0;
    visibility: hidden;
    transition: opacity 320ms ease, visibility 0s linear 320ms;
  }
  html.js .nav.is-open .nav__links { opacity: 1; visibility: visible; transition: opacity 320ms ease, visibility 0s; }
  html.js .nav.is-open { color: var(--c-ink); background: transparent; border-bottom-color: transparent; }
  html.js .nav__links ul { flex-direction: column; align-items: flex-start; gap: var(--s-sm); }
  html.js .nav__link {
    font-family: var(--f-display);
    font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    min-height: 56px;
  }
  html.js .nav__link--contact { padding-left: 0; border-left: 0; margin-top: var(--s-base); }
  html.menu-open, html.menu-open body { overflow: hidden; }

  /* JavaScript off: the links stay on the page as a quiet second row */
  html:not(.js) .nav { height: auto; }
  html:not(.js) .nav__inner { flex-wrap: wrap; row-gap: 0; padding-block: var(--s-xs); }
  html:not(.js) .nav__links { width: 100%; }
  html:not(.js) .nav__links ul { flex-wrap: wrap; column-gap: var(--s-base); row-gap: 0; }
  html:not(.js) .nav__link--contact { padding-left: 0; border-left: 0; }
}

/* JavaScript off: the nav sits in the page flow, over the hero where there is one */
html:not(.js) .nav { position: relative; }
html:not(.js) body:not([data-hero="dark"]) { padding-top: 0; }
html:not(.js) body[data-hero="dark"] .nav {
  position: absolute;
  background: transparent;
  color: var(--c-on-night);
  border-bottom-color: transparent;
}

/* ---------- Heroes ---------- */

.hero {
  position: relative;
  display: grid;
  min-height: 78svh;
  overflow: hidden;
  background: var(--c-night);
  color: var(--c-on-night);
  isolation: isolate;
  --c-focus: var(--c-on-night);
}
.hero--full { min-height: 100svh; }
@supports not (height: 100svh) { .hero { min-height: 78vh; } .hero--full { min-height: 100vh; } }

.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media :is(img, video, picture) { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.hero__media picture img { width: 100%; height: 100%; object-fit: cover; }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(26, 19, 16, 0.5) 0, rgba(26, 19, 16, 0) 180px),
    linear-gradient(to top, var(--c-scrim) 0%, rgba(26, 19, 16, 0.32) 30%, rgba(26, 19, 16, 0) 60%);
}

.hero__content {
  align-self: end;
  justify-self: center;
  width: min(100% - 2 * var(--s-gutter), 60rem);
  padding-block: calc(var(--nav-h) + var(--s-xl)) clamp(64px, 12vh, 144px);
  text-align: center;
}
.hero__content > * + * { margin-top: var(--s-base); }
.hero__content .eyebrow::before { margin-inline: auto; background: var(--c-hay); }
.hero__content :is(h1, .display-xl, .display-lg) { color: var(--c-on-night); max-width: 14ch; margin-inline: auto; }
.hero__content .lede { color: var(--c-on-night); max-width: 34ch; margin-inline: auto; }

/* Pages without a photo hero open on paper */
.page-head { padding-block: calc(var(--s-section) * 0.75) calc(var(--s-section) * 0.5); }
.page-head h1 { max-width: 16ch; }
.page-head .lede { margin-top: var(--s-lg); }
.page-head + .band { padding-top: calc(var(--s-section) * 0.5); }

/* Our Approach and the service pages: the title on paper, then the photograph full bleed
   beneath it, so no line of type sits on a face (Task 9) */
.hero--image { min-height: 0; aspect-ratio: 4 / 5; max-height: 80svh; }
@media (min-width: 640px) { .hero--image { aspect-ratio: 16 / 9; } }
@media (min-width: 1100px) { .hero--image { aspect-ratio: 2 / 1; max-height: 88svh; } }
.path__links { display: flex; flex-wrap: wrap; gap: var(--s-xs) var(--s-lg); }

/* ---------- Images ---------- */

.media {
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
}
.media :is(img, video) { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.media picture { display: block; width: 100%; height: 100%; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--2x3 { aspect-ratio: 2 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media + figcaption, .media + .caption { margin-top: var(--s-sm); }

/* The barn-window arch: one portrait per page, a horse alone or a landscape */
.arch { border-radius: var(--r-arch); }

/* A full-bleed photograph with a short text block over a scrim (one per page at most) */
.feature { position: relative; isolation: isolate; display: grid; min-height: min(88svh, 56vw); color: var(--c-on-night); background: var(--c-night); --c-focus: var(--c-on-night); }
.feature__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.feature__media :is(img, picture) { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.feature::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to right, rgba(26, 19, 16, 0.78) 0%, rgba(26, 19, 16, 0.5) 38%, rgba(26, 19, 16, 0) 68%); }
.feature__text { align-self: center; padding-block: var(--s-section); }
/* Text on the right, where the photo's faces sit left */
.feature--right::after { background: linear-gradient(to left, rgba(26, 19, 16, 0.82) 0%, rgba(26, 19, 16, 0.55) 34%, rgba(26, 19, 16, 0) 62%); }
@media (min-width: 640px) { .feature--right .feature__text > * { margin-left: auto; max-width: 24rem; } }
.feature__text > * { max-width: 30rem; }
.feature :is(h2, .eyebrow) { color: var(--c-on-night); }
.feature .eyebrow::before { background: var(--c-hay); }
.feature p { color: var(--c-on-night-muted); }
@media (max-width: 639.98px) {
  .feature { min-height: 0; }
  .feature__media { position: relative; aspect-ratio: 4 / 5; }
  .feature::after { background: none; }
  .feature__text { padding-block: var(--s-xl) var(--s-section); }
}

/* Contact map: a picture of the hills that opens the embedded map when asked (map.js) */
.map-facade { position: relative; display: block; color: var(--c-on-night); text-decoration: none; }
.map-facade img { width: 100%; height: 100%; object-fit: cover; }
.map-facade__label { position: absolute; left: 50%; bottom: var(--s-lg); transform: translateX(-50%); padding: var(--s-sm) var(--s-base);
  background: rgba(26, 19, 16, 0.72); border-radius: var(--r-xs); font-weight: 500; white-space: nowrap; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--c-hay); }
.map-facade:hover .map-facade__label { text-decoration-thickness: 2px; }

/* Text shown only from 640px up (a long eyebrow that would break on a phone) */
@media (max-width: 639.98px) { .wide-only { display: none; } }

/* Full-bleed landscape plate (data-depth moves the image inside it) */
.plate {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: 88svh;
  width: 100%;
  background: var(--c-surface);
}
@media (min-width: 640px) { .plate { aspect-ratio: 16 / 9; } }
@media (min-width: 1100px) { .plate { aspect-ratio: 21 / 9; } }
.plate > :is(img, picture, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}
.plate > picture img { width: 100%; height: 100%; object-fit: cover; }
.plate figcaption, .plate .caption {
  position: absolute;
  left: var(--s-gutter);
  bottom: var(--s-base);
  color: var(--c-on-night);
  text-shadow: 0 1px 12px rgba(26, 19, 16, 0.6);
}

/* ---------- Sections ---------- */

/* The core line: alone, centred, with a band of space around it */
.core-line {
  max-width: 22ch;
  margin-inline: auto;
  text-align: center;
  font-family: var(--f-display);
  font-size: var(--t-quote);
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--c-ink);
  text-wrap: balance;
}
.core-line--lg { font-size: var(--t-display-md); max-width: 18ch; }
.teach + .core-line { margin-top: clamp(var(--s-xxl), 8vw, 128px); }

/* Two paths: for yourself, for your team */
.paths { display: grid; gap: var(--s-xxl); }
@media (min-width: 900px) {
  .paths { grid-template-columns: 1fr 1fr; column-gap: clamp(var(--s-xl), 8vw, 128px); align-items: start; }
  .paths > :nth-child(2) { margin-top: clamp(var(--s-xxl), 10vw, 160px); }
}
.path > * + * { margin-top: var(--s-base); }
.path > .media + * { margin-top: var(--s-lg); }
.path p { max-width: 42ch; }
.path .btn--quiet { margin-top: var(--s-base); }

/* The four services */
.services { display: grid; gap: var(--s-xl) var(--s-base); }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .services { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.service { display: block; height: 100%; color: inherit; text-decoration: none; }
.service .media { margin-bottom: var(--s-base); }
.service__title {
  padding-top: var(--s-md);
  border-top: 1px solid var(--c-hairline);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color var(--dur-quick);
}
.service:hover .service__title, .service:focus-visible .service__title { text-decoration-color: var(--c-hay); }
.service p { margin-top: var(--s-xs); font-size: var(--t-body); color: var(--c-body); max-width: 34ch; }
.services > li:nth-child(even) .service { padding-top: 0; }
@media (min-width: 1100px) { .services > li:nth-child(even) { margin-top: var(--s-xl); } }

/* What horses teach: four items, a dusk rule, a title, two sentences */
.teach { display: grid; gap: var(--s-xl) clamp(var(--s-lg), 6vw, 96px); counter-reset: teach; }
@media (min-width: 640px) { .teach { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.teach__item { counter-increment: teach; padding-top: var(--s-base); border-top: 1px solid var(--c-dusk); max-width: 30rem; }
.teach__item::before {
  content: counter(teach, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s-sm);
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.125rem;
  color: var(--c-dusk-deep);
}
.teach__item h3 + p { margin-top: var(--s-xs); }

/* Owner photo strip: an even, centred row of prints (two or three while the owner has cleared
   only three photos; the drift is a slow sideways sway of the whole row) */
.strip {
  overflow-x: clip;
  padding-block: var(--s-xs) var(--s-md);
  padding-inline: var(--s-gutter);
}
.strip__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 300px);
  justify-content: center;
  gap: var(--s-md);
}
@media (max-width: 639.98px) {
  .strip__track { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; gap: var(--s-sm); }
}
.strip__item {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--shadow-lift);
  outline: 1px solid var(--print-border);
}
.strip__item :is(img, picture) { width: 100%; height: 100%; object-fit: cover; }
.strip__item a { display: block; width: 100%; height: 100%; }

/* The mission, set large */
.mission { max-width: 46rem; margin-inline: auto; text-align: center; }
.mission blockquote { margin: 0; color: var(--c-ink); font-family: var(--f-display); font-style: italic; font-weight: 300; font-size: var(--t-quote); line-height: 1.3; letter-spacing: -0.005em; text-wrap: balance; }
.mission blockquote::before {
  content: '\201C';
  display: block;
  height: 0.62em;
  font-size: 3.2em;
  line-height: 1;
  font-style: normal;
  color: var(--c-hay);
}
.mission figcaption { margin-top: var(--s-lg); }
.mission figcaption.eyebrow::before { margin-inline: auto; }

/* Gallery: a masonry of owner photographs */
/* An even row of prints at one crop while the owner has cleared three photos */
.gallery { display: grid; gap: var(--s-xl) var(--s-base); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery__item picture { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-xs); }
.gallery__item picture img { height: 100%; object-fit: cover; }
.gallery__item figure { margin: 0; }
.gallery__item img { width: 100%; height: auto; border-radius: var(--r-xs); background: var(--c-surface); }
.gallery__item figcaption { margin-top: var(--s-sm); }
.gallery__item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--r-xs);
}

/* Lightbox (dialog) */
.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: var(--s-xl) var(--s-gutter);
  border: 0;
  background: rgba(18, 13, 11, 0.95);
  color: var(--c-on-night);
  --c-focus: var(--c-on-night);
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; gap: var(--s-md); }
.lightbox::backdrop { background: rgba(18, 13, 11, 0.95); }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100svh - 160px); width: auto; height: auto; object-fit: contain; border-radius: var(--r-xs); }
.lightbox figcaption, .lightbox .caption { color: var(--c-on-night-muted); text-align: center; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--s-sm);
  border: 0;
  background: none;
  color: var(--c-on-night);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color var(--dur-quick);
}
.lightbox__close { top: var(--s-md); right: var(--s-gutter); }
.lightbox__prev { left: var(--s-gutter); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--s-gutter); top: 50%; transform: translateY(-50%); }
.lightbox button:hover { color: var(--c-hay); }

/* FAQ (stays hidden until the owner confirms the answers) */
.faq { border-bottom: 1px solid var(--c-hairline); max-width: var(--w-measure); }
.faq details { border-top: 1px solid var(--c-hairline); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-md);
  min-height: 64px;
  padding-block: var(--s-md);
  font-family: var(--f-display);
  font-size: var(--t-title);
  color: var(--c-ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font-family: var(--f-text); font-weight: 300; font-size: 1.5rem; color: var(--c-hay-deep); }
.faq details[open] summary::after { content: '\2212'; }
.faq details > :not(summary) { padding-bottom: var(--s-base); max-width: 60ch; }

/* ---------- Forms ---------- */

.form { display: grid; gap: var(--s-base); }
.form--panel {
  padding: clamp(var(--s-base), 4vw, var(--s-xl));
  background: var(--c-surface);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lift);
  outline: 1px solid var(--print-border);
}
.field { display: grid; gap: var(--s-xs); }
.field label, .field legend {
  font-size: var(--t-body-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-ink);
}
.field label .optional { font-weight: 400; color: var(--c-muted); }

.field :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--s-md);
  border: 1px solid var(--c-rule);
  border-radius: var(--r-sm);
  background: var(--c-canvas);
  color: var(--c-ink);
  font-size: var(--t-body);
  line-height: 1.4;
  transition: border-color var(--dur-quick);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 168px; padding-block: 14px; resize: vertical; line-height: 1.6; }
.field select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238f7a65' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field ::placeholder { color: var(--c-muted); opacity: 1; }
.field :is(input, select, textarea):hover { border-color: var(--c-ink); }
.field :is(input, select, textarea):focus-visible { outline: 2px solid var(--c-dusk-deep); outline-offset: 2px; }
.field input[type="checkbox"], .field input[type="radio"] { width: 20px; height: 20px; accent-color: var(--c-hay-deep); }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: var(--s-sm); }
.field--check label { font-weight: 400; color: var(--c-body); font-size: var(--t-body); }

.field__help { font-size: var(--t-body-sm); line-height: 1.6; color: var(--c-muted); }
.field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--s-xs);
  font-size: var(--t-body-sm);
  color: var(--c-error);
}
.field__error::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 4v5' stroke='black' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.5' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 4v5' stroke='black' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.5' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field__error:empty, .field__error[hidden] { display: none; }
.field.is-invalid :is(input, select, textarea), [aria-invalid="true"] { border-color: var(--c-error); }

.form .btn[type="submit"] { justify-self: start; }
@media (max-width: 639.98px) { .form .btn[type="submit"] { width: 100%; justify-self: stretch; } }

.form__status { font-size: var(--t-body); color: var(--c-ink); }
.form__status:empty { display: none; }
.form__status--ok { padding: var(--s-base); border-left: 2px solid var(--c-hay); background: var(--c-surface); font-family: var(--f-display); font-size: var(--t-title); }
.form__status--error { color: var(--c-error); }
.form__status--error a { color: inherit; }

/* ---------- Invitation band: the last band on every page ---------- */

.invite {
  padding: var(--s-section) 0;
  background: var(--c-night);
  color: var(--c-on-night-muted);
  text-align: center;
  --c-focus: var(--c-dusk);
}
.invite::before {
  content: '';
  display: block;
  width: 1px;
  height: clamp(48px, 6vw, 80px);
  margin: calc(var(--s-section) * -0.35) auto calc(var(--s-section) * 0.35);
  background: linear-gradient(to bottom, transparent, var(--c-hay));
}
.invite__line, .invite h2 {
  max-width: 20ch;
  margin-inline: auto;
  color: var(--c-on-night);
  font-family: var(--f-display);
  font-size: var(--t-display-md);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.008em;
}
.invite p:not(.invite__line) { max-width: 44ch; margin: var(--s-base) auto 0; }
.invite .btn { margin-top: var(--s-xl); }
.invite__phone a, a.invite__phone {
  color: var(--c-hay);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  white-space: nowrap;
}
.invite__phone a:hover, a.invite__phone:hover { text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */

.footer {
  padding: var(--s-xxl) 0 var(--s-xl);
  background: var(--c-night);
  color: var(--c-on-night-muted);
  font-size: var(--t-body-sm);
  line-height: 1.6;
  border-top: 1px solid rgba(242, 233, 218, 0.1);
  --c-focus: var(--c-dusk);
}
.footer__grid { display: grid; gap: var(--s-xl); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-base); } }
.footer__brand { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-md); align-items: center; align-content: start; }
.footer__mark { width: 56px; height: auto; border-radius: var(--r-xs); grid-row: span 2; }
.footer__brand > :not(.footer__mark) { grid-column: 2; }
.footer__brand:not(:has(.footer__mark)) { grid-template-columns: 1fr; }
.footer__brand:not(:has(.footer__mark)) > * { grid-column: 1; }
.footer__name { font-family: var(--f-display); font-size: var(--t-title); color: var(--c-on-night); line-height: 1.25; }
.footer__nap { font-style: normal; }
.footer a { color: var(--c-on-night); text-decoration-color: rgba(242, 233, 218, 0.35); text-underline-offset: 4px; transition: text-decoration-color var(--dur-quick); }
.footer a:hover { text-decoration-color: var(--c-hay); }
.footer__nap a { color: var(--c-on-night); text-decoration-thickness: 1px; }
.footer__links ul { display: grid; gap: var(--s-xs); }
.footer__links a { display: inline-flex; min-height: 32px; align-items: center; text-decoration-line: none; }
.footer__links a:hover { text-decoration-line: underline; }
.footer__base {
  margin-top: var(--s-xl);
  padding-top: var(--s-base);
  border-top: 1px solid rgba(242, 233, 218, 0.1);
  font-size: var(--t-caption);
  color: var(--c-on-night-muted);
}
.invite + .footer { border-top-color: rgba(242, 233, 218, 0.08); }

/* ---------- Motion support (hhh.js adds html.motion only when motion is allowed) ---------- */

/* Lenis (from lenis/dist/lenis.css) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-autoToggle { transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete; }

html.motion [data-reveal="lines"] .w { display: inline-block; }
html.motion [data-reveal="unmask"] { will-change: clip-path; }

/* Depth plates: the image carries 15% of the plate's height in overflow to travel through */
html.motion [data-depth] > :is(img, picture, video) { top: -7.5%; height: 115%; bottom: auto; will-change: transform; }
html.motion [data-drift] { will-change: transform; }

/* The pinned section fits one screen while it is held */
@media (min-width: 900px) {
  html.motion [data-pin] {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-block: calc(var(--nav-h) + var(--s-xl)) var(--s-xl);
  }
  html.motion [data-pin] > .wrap { width: min(100% - 2 * var(--s-gutter), var(--w-content)); }
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .nav { transition-property: background-color, color, border-color; }
  .nav.is-hidden { transform: none; }
  html.js .nav__links { transition: none !important; }
}

/* ---------- Print ---------- */

@media print {
  .nav, .invite .btn, .skip, .strip { display: none; }
  body { padding-top: 0; background: #fff; color: #000; }
  .hero { min-height: 0; background: none; color: #000; }
  .hero__media, .hero__scrim { display: none; }
  .hero__content :is(h1, .lede, .eyebrow) { color: #000; }
  .invite, .footer { background: none; color: #000; }
  .invite h2, .footer__name, .footer a { color: #000; }
}
