/* Home, gallery and lightbox for the single-page index. */

/* Views ------------------------------------------------------------------ */
main { position: relative; z-index: 1; }

.view { display: none; }
.view.is-active { display: block; animation: view-in 320ms ease-out; }

.page {
  width: min(1240px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(24px, 5vh, 48px) 0 56px;
}


@keyframes view-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Easter egg for unknown paths ------------------------------------------- */
.not-found-easter {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  text-align: center;
}

.not-found-easter strong {
  display: block;
  max-width: 980px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(30px, 5.5vw, 78px);
  font-weight: 650;
  line-height: 1.1;
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.58);
  animation: rise-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-not-found .not-found-easter { display: grid; }
body.is-not-found > :not(.background-video):not(.not-found-easter) { display: none !important; }

/* Home -------------------------------------------------------------------- */
/* The clip is only 960 px wide, so it stays softly blurred; the blur is lighter than on other pages. */
body::before, .background-video { transition: filter 800ms ease, transform 1100ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 900ms ease; }

body.is-home::before, body.is-home .background-video {
  filter: blur(calc(var(--photo-blur) * 0.75)) saturate(0.98) brightness(0.8);
  transform: scale(1.08) translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -9px), 0);
}

.empty-home { display: none; }

.empty-home.is-active {
  display: grid;
  align-items: center;
  min-height: calc(100dvh - 76px);
  padding: clamp(24px, 6vh, 64px) var(--gutter) clamp(24px, 4vh, 40px);
  animation: view-in 320ms ease-out;
}

.home-wrap { width: min(1100px, 100%); margin: 0 auto; }
.home-wrap .home-grid { margin-top: 0; }

.home-title {
  margin: 10px 0 clamp(26px, 5vh, 42px);
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 540;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}

.home-title em { color: var(--accent); font-style: italic; font-weight: 440; }
.home-wrap .eyebrow { color: var(--muted); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }

.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.home-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 270px;
  padding: 22px;
  color: var(--text);
  text-decoration: none;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, background 200ms ease;
}

.home-card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--raised); }

body.is-intro .home-card { animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
body.is-intro .home-card:nth-child(1) { animation-delay: 120ms; }
body.is-intro .home-card:nth-child(2) { animation-delay: 220ms; }
body.is-intro .home-card:nth-child(3) { animation-delay: 320ms; }

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.home-card-head { display: flex; align-items: center; gap: 10px; }
.home-card-head .dot { margin-left: auto; }

.home-card-head svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-card-title { font-family: var(--font-num); font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.home-card-meta { color: var(--muted); font-size: 0.95rem; }
.home-card-stats { display: flex; flex-wrap: wrap; gap: 8px; }

.home-card-go { margin-top: auto; color: var(--accent); font-size: 0.92rem; font-weight: 700; }
.home-card-go i { display: inline-block; font-style: normal; transition: transform 200ms ease; }
.home-card:hover .home-card-go i { transform: translateX(5px); }

.collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 92px; }
.collage:empty { display: none; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; background: var(--surface-2); }

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-card { min-height: 0; }
  .empty-home.is-active { min-height: 0; }
}

/* Gallery ------------------------------------------------------------------ */
.gallery-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 640px;
  margin: 0 0 32px;
}

.album-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 92px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.album-tab:hover { border-color: var(--accent); transform: translateY(-2px); }

.album-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.album-tab-label { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.album-tab-count { color: var(--muted); font-size: 0.9rem; }

.album-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 0 0 32px; }

.album-card { display: flex; flex-direction: column; overflow: hidden; color: var(--text); text-decoration: none; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease; }
.album-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.album-cover { display: block; aspect-ratio: 16 / 10; background: var(--raised) center / cover no-repeat; transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.album-card:hover .album-cover { transform: scale(1.04); }
.album-card { position: relative; }
.album-cover { overflow: hidden; }
.album-card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 20px; position: relative; background: inherit; }
.album-card-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.album-card-count { color: var(--muted); font-size: 0.92rem; }

.album-back { display: inline-block; margin: 0 0 14px; color: var(--accent); text-decoration: none; font-weight: 600; }
.album-back:hover { text-decoration: underline; }

.gallery-media .album-tabs { margin: 18px 0 14px; }
.gallery-media .album-tab { min-height: 0; padding: 12px 18px; flex-direction: row; align-items: baseline; gap: 10px; }
.gallery-media .album-tab-label { font-size: 1.15rem; }

.gallery-media h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.photo-hint { max-width: 62ch; margin: 8px 0 0; color: var(--muted); }
.photo-meta { min-height: 1.4em; margin: 8px 0 0; color: var(--faint); font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  margin-top: 22px;
  align-items: stretch;
}

.photo {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: 0 8px 24px rgba(var(--ink-deep), 0.28);
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.98);
  animation: photo-in 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
  cursor: zoom-in;
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 300px 400px;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(var(--ink-deep), 0.4), transparent 38%);
  opacity: 0.55;
  transition: opacity 400ms ease;
}

.photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: var(--ratio, 4 / 5);
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.photo:nth-child(3n + 2) { --ratio: 1 / 1; }
.photo:nth-child(3n) { --ratio: 16 / 11; }

.photo:hover img, .photo:focus-within img { transform: scale(1.06); }
.photo:hover::after, .photo:focus-within::after { opacity: 0.85; }
.photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }

.photo-type,
.video-duration {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(var(--ink), 0.76);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 750;
  pointer-events: none;
}

.photo-type { top: 10px; left: 10px; }
.video-duration { right: 10px; bottom: 10px; font-variant-numeric: tabular-nums; }

.photo.is-video .photo-type::before {
  content: "";
  width: 0;
  height: 0;
  margin-right: 6px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.photo-sentinel { width: 100%; height: 2px; margin-top: 2px; }

@keyframes photo-in {
  from { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@media (max-width: 520px) {
  .gallery-choices { grid-template-columns: 1fr 1fr; gap: 10px; }
  .album-tab { padding: 14px 16px; min-height: 80px; }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* Lightbox ----------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: calc(76px + var(--safe-top)) 76px calc(84px + var(--safe-bottom));
  border: 0;
  color: var(--text);
  background: rgba(var(--ink-deep), 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  backdrop-filter: blur(24px) saturate(120%);
}

.lightbox.is-open { display: grid; animation: lightbox-in 220ms ease-out; }
.lightbox::backdrop { background: rgba(var(--ink-deep), 0.5); }
.lightbox [hidden] { display: none; }

.focus-boundary {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.lightbox img,
.lightbox video {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1320px);
  max-height: calc(100dvh - 160px - var(--safe-top) - var(--safe-bottom));
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62);
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
  will-change: transform, opacity;
}

.lightbox video { display: none; width: auto; height: auto; background: #000; touch-action: auto; }
.lightbox.is-video img { display: none; }
.lightbox.is-video video { display: block; }

.lightbox img.is-opening, .lightbox video.is-opening { animation: full-image-in 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.lightbox img.is-leaving-left, .lightbox video.is-leaving-left { transform: translate3d(-44px, 0, 0) scale(0.985); opacity: 0; }
.lightbox img.is-leaving-right, .lightbox video.is-leaving-right { transform: translate3d(44px, 0, 0) scale(0.985); opacity: 0; }
.lightbox img.is-entering-left, .lightbox video.is-entering-left { animation: photo-swipe-left 280ms cubic-bezier(0.16, 1, 0.3, 1); }
.lightbox img.is-entering-right, .lightbox video.is-entering-right { animation: photo-swipe-right 280ms cubic-bezier(0.16, 1, 0.3, 1); }

.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(var(--raised-rgb), 0.7);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  transition: background 160ms ease, border-color 160ms ease;
}

.lightbox-close:hover, .lightbox-nav:hover { background: var(--raised); border-color: var(--accent); }

.lightbox-close { top: calc(16px + var(--safe-top)); right: calc(14px + var(--safe-right)); width: 48px; height: 48px; }
.lightbox-nav { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

.lightbox-close::before, .lightbox-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.lightbox-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.lightbox-nav::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(0 0, 28% 0, 100% 50%, 28% 100%, 0 100%, 70% 50%);
  transform: translate(-50%, -50%);
}

.lightbox-prev::before { transform: translate(-50%, -50%) scaleX(-1); }

.lightbox-counter {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 11;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(var(--raised-rgb), 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes full-image-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes photo-swipe-left { from { opacity: 0; transform: translate3d(44px, 0, 0) scale(0.985); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }
@keyframes photo-swipe-right { from { opacity: 0; transform: translate3d(-44px, 0, 0) scale(0.985); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }

@media (max-width: 520px) {
  .lightbox { padding-left: 8px; padding-right: 8px; }
  .lightbox img, .lightbox video { max-height: calc(100dvh - 160px - var(--safe-top) - var(--safe-bottom)); }
  .lightbox-nav { top: auto; bottom: calc(12px + var(--safe-bottom)); transform: none; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  dialog.lightbox { padding-top: calc(60px + var(--safe-top)); padding-bottom: calc(60px + var(--safe-bottom)); }
  .lightbox.is-video video { width: 100%; height: calc(100dvh - 120px - var(--safe-top) - var(--safe-bottom)); max-height: calc(100dvh - 120px - var(--safe-top) - var(--safe-bottom)); }
}

/* More visible motion --------------------------------------------------------------- */
/* Title: the words rise out of a blur, one after the other. */
.home-title .w { display: inline-block; animation: word-in 1000ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.home-title .w:nth-child(1) { animation-delay: 140ms; }
.home-title .w:nth-child(2) { animation-delay: 360ms; }
.home-wrap .eyebrow { animation: fade-up 800ms ease both; }
@keyframes word-in {
  from { opacity: 0; transform: translate3d(0, 0.5em, 0) rotate(2deg); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fade-up { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* The header drops in, the cards rise with a stronger stagger. */
.site-header { animation: header-in 700ms cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes header-in { from { opacity: 0; transform: translate3d(0, -100%, 0); } to { opacity: 1; transform: none; } }
body.is-intro .home-card { animation-duration: 950ms; }
body.is-intro .home-card:nth-child(1) { animation-delay: 380ms; }
body.is-intro .home-card:nth-child(2) { animation-delay: 520ms; }
body.is-intro .home-card:nth-child(3) { animation-delay: 660ms; }
.home-card { will-change: transform; }

/* Slow drifting glow behind the home page. */
body.is-home::after {
  background-size: 150% 150%, 150% 150%, 100% 100%;
  animation: ambient 20s ease-in-out infinite alternate;
}
@keyframes ambient {
  from { background-position: 0% 0%, 100% 40%, 0 0; }
  to { background-position: 35% 25%, 55% 80%, 0 0; }
}

/* Sections slide in with a little scale. */
@keyframes view-in {
  from { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.view.is-active, .empty-home.is-active { animation-duration: 520ms; }

/* Gallery: choice cards and photos arrive one by one. */
.gallery-choices .album-tab { animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.gallery-choices .album-tab:nth-child(2) { animation-delay: 120ms; }
.photo { animation-duration: 900ms; }

/* Horses ------------------------------------------------------------------- */
.home-horses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.home-horse { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; color: var(--text); text-decoration: none; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease; }
.home-horse:hover { transform: translateY(-3px); border-color: var(--accent); }
.home-horse-photo { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 22%; background: var(--raised); border: 2px solid rgba(var(--accent-rgb), 0.55); }
.home-horse-photo.horse-monogram { font-size: 1.5rem; }
.home-horse-text { display: flex; flex-direction: column; min-width: 0; }
.home-horse-text strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.home-horse-text small { color: var(--muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.horse-monogram { display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(4rem, 12vw, 6rem); font-weight: 560; color: var(--accent); background: radial-gradient(circle at 50% 35%, var(--raised), var(--surface-solid)); }

.horse-hero { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; margin-bottom: 36px; }
.horse-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.horse-photo.horse-monogram { border: 1px solid var(--line); }
.horse-hero-text h1 { margin-top: 8px; font-size: clamp(2.4rem, 6vw, 4rem); }
.horse-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 24px 0 0; }
.horse-facts > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.horse-facts dt { color: var(--faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.horse-facts dd { margin: 4px 0 0; font-weight: 600; }

.horse-section { margin: 0 0 40px; }
.horse-section h2 { margin-bottom: 14px; font-size: clamp(1.5rem, 3vw, 2rem); }
.horse-prose { max-width: 66ch; }
.horse-prose p { margin: 0 0 1em; line-height: 1.7; }
.horse-empty { max-width: 62ch; margin: 0; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); }
.horse-more a { color: var(--accent); font-weight: 600; text-decoration: none; }
.horse-more a:hover { text-decoration: underline; }

.horse-timeline { position: relative; display: grid; gap: 22px; margin: 0; padding: 0 0 0 26px; list-style: none; }
.horse-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.horse-timeline li { position: relative; max-width: 66ch; }
.horse-timeline li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2); }
.horse-timeline time { display: block; color: var(--faint); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.horse-timeline strong { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.horse-timeline p { margin: 6px 0 0; color: var(--muted); line-height: 1.65; }
.horse-timeline img { display: block; width: 100%; max-width: 420px; margin-top: 12px; border-radius: var(--radius-sm); }

.horse-stories { display: grid; gap: 12px; max-width: 72ch; }
.horse-story { padding: 0; }
.horse-story summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.horse-story summary::-webkit-details-marker { display: none; }
.horse-story summary strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.horse-story summary span { color: var(--faint); font-size: 0.85rem; }
.horse-story p { margin: 0; padding: 0 20px 16px; color: var(--muted); line-height: 1.7; }
.horse-story p:last-child { padding-bottom: 20px; }

@media (max-width: 860px) {
  .home-horses { gap: 8px; }
  .home-horse { flex-direction: column; gap: 6px; padding: 10px 6px; text-align: center; }
  .home-horse-text small { display: none; }
}

@media (max-width: 760px) {
  .horse-hero { grid-template-columns: minmax(0, 1fr); }
  .horse-photo { max-width: 320px; }
}

/* Home: plain tabs with only their name ------------------------------------- */
.home-grid .home-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; min-height: 0; padding: 22px 26px; }
.home-grid .home-card-title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 560; }
.home-card-arrow { color: var(--accent); font-style: normal; font-size: 1.4rem; transition: transform 220ms ease; }
.home-card:hover .home-card-arrow { transform: translateX(5px); }

/* Home ------------------------------------------------------------------------------------
   Four equal tiles in one row. On wide screens the block sits left of centre and the background
   moves right, so Kippie's face stays clear. */
.home-hero { text-align: center; }
.home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin-inline: auto; }
.home-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 136px; padding: 18px 10px; color: var(--text); text-align: center; text-decoration: none; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease; }
.home-tile:hover { transform: translateY(-4px); border-color: var(--accent); }
.home-tile strong { font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 580; }
.home-tile-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--accent); background: radial-gradient(circle at 50% 35%, var(--raised), var(--surface-solid)); border: 2px solid rgba(var(--accent-rgb), 0.35); }
.home-tile-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.home-faces { display: flex; height: 52px; }
.home-faces > * { width: 52px; height: 52px; flex: none; margin-left: -10px; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb), 0.55); box-sizing: border-box; object-fit: cover; object-position: 50% 22%; background: var(--raised); display: grid; place-items: center; font-family: var(--font-display); font-style: normal; font-size: 1.3rem; font-weight: 560; color: var(--accent); }
.home-faces > *:first-child { margin-left: 0; }
.home-faces > img { background: var(--surface-solid); }

@media (min-aspect-ratio: 5/4) and (min-width: 1000px) {
  .home-wrap { margin-left: max(0px, calc((100% - 780px) / 2 - 12vw)); width: min(780px, 100%); }
  body.is-home::before, body.is-home .background-video {
    transform: translate3d(calc(9vw + var(--px, 0) * -14px), calc(var(--py, 0) * -9px), 0) scale(1.2);
  }
}

@media (max-width: 760px) {
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Paarden overview */
.horse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.horse-card { position: relative; display: flex; flex-direction: column; overflow: hidden; color: var(--text); text-decoration: none; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease; }
.horse-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.horse-cover { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--raised); transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.horse-card:hover .horse-cover { transform: scale(1.04); }
.horse-card-body { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 20px; background: var(--surface-solid); }
.horse-card-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.horse-card-tagline { color: var(--muted); font-size: 0.95rem; }
.horse-card-go { color: var(--accent); font-weight: 650; font-size: 0.92rem; }
