/* ==========================================================================
   Fenmarsh Stud — site.css
   Palette drawn from the tack room and the sales ring: flint, brass, claret.
   Ivory is used only for "paper" surfaces (pedigrees, stud cards, catalogues).
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Ground */
  --ink:        #101714;
  --ink-2:      #161F1B;
  --surface:    #1C2621;
  --surface-2:  #23302A;

  /* Paper (documents only) */
  --paper:      #F2EEE4;
  --paper-2:    #E5DFD0;
  --paper-3:    #D3CBB7;

  /* Accents */
  --brass:      #C39A50;
  --brass-dim:  #8A6C36;
  --claret:     #7A1F33;
  --claret-lt:  #A9354D;
  --sage:       #93A597;

  /* Text on ground */
  --text:       #EDE9DF;
  --muted:      #B3C0B6;   /* lifted from #98A69B — now ~7:1 on --ink */
  --faint:      #9DABA1;

  /* Lines */
  --line:       rgba(233,228,216,.13);
  --line-2:     rgba(233,228,216,.26);
  --line-paper: rgba(16,23,20,.16);

  /* Type
     Bodoni Moda was the readability problem: a didone's hairlines disappear
     on a dark ground at anything under 2rem. Fraunces keeps the editorial,
     old-money feel but carries real weight in the thin strokes. Instrument
     Sans replaces Archivo for interface text — larger x-height, opener
     apertures, better at small sizes. */
  --display: "Fraunces", "Georgia", "Times New Roman", serif;
  --body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --data:    "Archivo Narrow", "Instrument Sans", sans-serif;

  /* Scale */
  --t-hero:  clamp(2.7rem, 6.8vw, 5.9rem);
  --t-xxl:   clamp(2.1rem, 4.3vw, 3.5rem);
  --t-xl:    clamp(1.65rem, 2.8vw, 2.4rem);
  --t-lg:    clamp(1.3rem, 2vw, 1.65rem);
  --t-body:  1.075rem;
  --t-sm:    .9125rem;
  --t-xs:    .78rem;

  /* Rhythm */
  --gutter:  clamp(1.25rem, 4vw, 3rem);
  --bay:     clamp(4.5rem, 9vw, 8.5rem);
  --max:     1240px;
  --narrow:  760px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; letter-spacing: -.005em; }
p { margin: 0 0 1.15em; max-width: 74ch; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }

::selection { background: var(--claret); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brass); color: var(--ink);
  padding: .75rem 1.25rem; font: 600 var(--t-sm)/1 var(--body);
}
.skip:focus { left: .5rem; top: .5rem; }

.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* --- Layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--narrow); }
.bay { padding-block: var(--bay); }
.bay--tight { padding-block: calc(var(--bay) * .62); }

/* --- Type helpers ------------------------------------------------------- */
.eyebrow {
  font-family: var(--data);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.4rem;
  display: flex; align-items: center; gap: .8rem;
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--line-2);
}
.eyebrow--plain::after { display: none; }

.display   { font-family: var(--display); font-weight: 400; letter-spacing: -.015em; }
.h-hero    { font-family: var(--display); font-size: var(--t-hero); line-height: .96; letter-spacing: -.03em; }
.h-xxl     { font-family: var(--display); font-size: var(--t-xxl); letter-spacing: -.02em; }
.h-xl      { font-family: var(--display); font-size: var(--t-xl);  letter-spacing: -.015em; }
.h-lg      { font-family: var(--display); font-size: var(--t-lg); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--text); max-width: 62ch; }
.muted { color: var(--muted); }
.meta {
  font-family: var(--data); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.italic { font-style: italic; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--body); font-size: var(--t-sm); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .95rem 1.7rem;
  border: 1px solid var(--brass); background: transparent; color: var(--brass);
  text-decoration: none; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--brass); color: var(--ink); }
.btn--solid { background: var(--claret); border-color: var(--claret); color: var(--paper); }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--claret-lt); border-color: var(--claret-lt); color: var(--paper); }
.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--text); background: transparent; color: var(--text); }
.btn--sm { padding: .65rem 1.15rem; font-size: var(--t-xs); }
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.textlink {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--data); font-size: var(--t-sm); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass); text-decoration: none;
  border-bottom: 1px solid rgba(195,154,80,.35); padding-bottom: 2px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.textlink:hover { border-color: var(--brass); }

/* --- Header ------------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 90;
  background: rgba(16,23,20,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
.hdr.is-stuck { background: rgba(16,23,20,.97); border-bottom-color: var(--line); }
.hdr__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--text); }
.brand__mark { width: 30px; height: 38px; flex: none; }
.brand__name {
  font-family: var(--display); font-size: 1.28rem; letter-spacing: .04em;
  line-height: 1; text-transform: uppercase;
}
.brand__sub {
  display: block; font-family: var(--data); font-size: .58rem; font-weight: 600;
  letter-spacing: .32em; color: var(--brass); margin-top: .32rem;
}

/* --- Navigation ---------------------------------------------------------
   Seven flat links became five groups. On desktop each group opens a panel
   on hover or keyboard focus; a brass rule slides between the top-level
   items. Without JS the panels still open (:focus-within) and the current
   page keeps a static underline. */
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav__list {
  list-style: none; display: flex; align-items: center;
  gap: clamp(.25rem, 1.4vw, 1.4rem); position: relative;
}
.nav__item { position: relative; }

.nav__top {
  display: flex; align-items: center; gap: .42rem;
  font-family: var(--body); font-size: .875rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  color: var(--text); text-decoration: none; padding: .55rem .5rem;
  transition: color .22s var(--ease);
}
.nav__top:hover,
.nav__item--menu:hover > .nav__top,
.nav__item:focus-within > .nav__top { color: var(--brass); }
.nav__top[data-current="true"] { color: var(--brass); }

.nav__chev { width: 10px; height: 6px; opacity: .6; transition: transform .28s var(--ease); }
.nav__item--menu:hover .nav__chev,
.nav__item--menu:focus-within .nav__chev,
.nav__item--menu.is-open .nav__chev { transform: rotate(180deg); opacity: 1; }

/* Sliding indicator. JS-only; the static rule below is the fallback. */
.nav__ind { display: none; }
.nav--js .nav__ind {
  display: block; position: absolute; left: 0; bottom: -.35rem;
  height: 1.5px; width: 0; background: var(--brass); opacity: 0;
  transition: transform .4s var(--ease), width .4s var(--ease), opacity .25s var(--ease);
  pointer-events: none;
}
.nav__top[data-current="true"]::after {
  content: ""; position: absolute; left: .45rem; right: .45rem; bottom: -.35rem;
  height: 1.5px; background: var(--brass);
}
.nav--js .nav__top[data-current="true"]::after { display: none; }

/* Dropdown panel */
.nav__menu {
  position: absolute; top: calc(100% + .7rem); left: 50%; z-index: 5;
  width: max(19rem, 300px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .22s var(--ease), transform .3s var(--ease), visibility .22s;
}
/* Bridges the gap so the pointer can travel from link to panel. */
.nav__menu::before { content: ""; position: absolute; inset: -.9rem 0 auto; height: 1rem; }
.nav__item--menu:hover > .nav__menu,
.nav__item--menu:focus-within > .nav__menu,
.nav__item--menu.is-open > .nav__menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.nav__menu-in {
  background: var(--ink-2); border: 1px solid var(--line-2);
  border-top: 2px solid var(--brass);
  padding: .45rem; display: grid;
  box-shadow: 0 26px 54px -14px rgba(0,0,0,.72);
}
.nav__link {
  display: grid; gap: .16rem; padding: .68rem .8rem; text-decoration: none;
  transition: background .18s var(--ease);
}
.nav__link:hover { background: var(--surface); }
.nav__link-n {
  font-size: .945rem; font-weight: 600; color: var(--text);
  letter-spacing: 0; text-transform: none; line-height: 1.3;
}
.nav__link-d { font-family: var(--data); font-size: .82rem; color: var(--faint); line-height: 1.35; }
.nav__link[aria-current="page"] .nav__link-n { color: var(--brass); }

/* Ten stallions need two columns and a way through to the full roster. */
.nav__menu--wide { width: max(34rem, 520px); }
.nav__menu--wide .nav__menu-in { grid-template-columns: 1fr 1fr; gap: 0 .4rem; }
.nav__all {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--ink-2); border: 1px solid var(--line-2); border-top: 0;
  padding: .85rem 1.25rem; text-decoration: none;
  font-family: var(--data); font-size: var(--t-xs); letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass);
  transition: background .18s var(--ease);
}
.nav__all:hover { background: var(--surface); }
.nav__menu--wide { left: 0; transform: translate(0, -8px); }
.nav__item--menu:hover > .nav__menu--wide,
.nav__item--menu:focus-within > .nav__menu--wide,
.nav__item--menu.is-open > .nav__menu--wide { transform: translate(0, 0); }

.nav__cta { display: none; }
.hdr__cta { display: none; }
@media (min-width: 900px) { .hdr__cta { display: inline-flex; } }

.burger {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-2); color: var(--text); cursor: pointer;
}
.burger span { display: block; width: 18px; height: 1px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.scrim {
  position: fixed; inset: 0; z-index: 94; background: rgba(6,10,8,.66);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .35s var(--ease);
}
.scrim.is-on { opacity: 1; }

@media (min-width: 900px) { .burger, .scrim { display: none !important; } }

/* --- Mobile drawer ------------------------------------------------------ */
@media (max-width: 899px) {
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
    width: min(374px, 87vw); display: block;
    background: var(--ink-2); border-left: 1px solid var(--line-2);
    padding: 5.6rem var(--gutter) 3rem;
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(102%);
    transition: transform .42s var(--ease);
    box-shadow: -32px 0 64px -22px rgba(0,0,0,.85);
  }
  .nav.is-open { transform: none; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-top: 1px solid var(--line); }
  .nav__item:first-child { border-top: 0; }

  .nav__top {
    font-family: var(--data); font-size: .74rem; letter-spacing: .22em;
    color: var(--brass); padding: 1.5rem 0 .35rem;
  }
  .nav__top[data-current="true"]::after { display: none; }
  .nav__chev, .nav__ind { display: none !important; }

  .nav__menu {
    position: static; width: auto; opacity: 1; visibility: visible;
    pointer-events: auto; transform: none; transition: none;
  }
  .nav__menu::before { display: none; }
  .nav__menu-in { background: none; border: 0; box-shadow: none; padding: 0 0 .4rem; }
  .nav__menu--wide { width: auto; left: auto; transform: none; }
  .nav__menu--wide .nav__menu-in { grid-template-columns: 1fr; gap: 0; }
  .nav__all {
    background: none; border: 0; padding: .5rem 0 1rem;
    justify-content: flex-start; gap: .6rem;
  }
  .nav__link { padding: .6rem 0; }
  .nav__link-n { font-size: 1.02rem; font-weight: 500; }

  .nav__util {
    flex-direction: column; align-items: stretch; gap: 0;
    margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line-2);
  }
  .nav__u { display: block; padding: .85rem 0; font-size: .95rem; letter-spacing: .18em; }
  .nav__cta { display: inline-flex; margin-top: 1.8rem; width: 100%; justify-content: center; }
}

/* --- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(122,31,51,.30), transparent 58%),
    radial-gradient(90% 70% at 8% 92%, rgba(195,154,80,.13), transparent 60%);
  pointer-events: none;
}
.hero__in {
  position: relative;
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(4rem, 10vw, 8rem);
}
@media (min-width: 940px) { .hero__in { grid-template-columns: 1.15fr .85fr; } }

.hero__kicker {
  font-family: var(--data); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase; color: var(--brass);
  margin-bottom: 1.8rem;
}
.hero h1 { margin-bottom: 1.9rem; }
.hero h1 em { font-style: italic; color: var(--brass); }
.hero__lede { max-width: 46ch; color: var(--muted); font-size: clamp(1.02rem,1.4vw,1.18rem); }
.hero__acts { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.4rem; }

.hero__silk { justify-self: center; width: min(52vw, 250px); }
@media (max-width: 939px) { .hero__silk { width: min(46vw, 190px); } }
.silk-plinth { justify-self: center; width: min(40vw, 180px); }

/* --- Figure strip (dated stats) ---------------------------------------- */
.figures { border-bottom: 1px solid var(--line); background: var(--ink-2); }
.figures__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 800px) { .figures__grid { grid-template-columns: repeat(4, 1fr); } }
.figure {
  padding: clamp(1.8rem,3vw,2.6rem) clamp(1rem,2vw,1.8rem);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) { .figure { border-bottom: 0; } .figure:last-child { border-right: 0; } }
.figure__n {
  font-family: var(--display); font-size: clamp(2.4rem,4.6vw,3.5rem);
  line-height: 1; color: var(--paper); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.figure__l {
  font-family: var(--data); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase; color: var(--muted);
  margin-top: .9rem; max-width: 22ch;
}
.figures__stamp {
  padding: .9rem var(--gutter); border-top: 1px solid var(--line);
  font-family: var(--data); font-size: var(--t-xs); letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); text-align: right;
}

/* --- Section head ------------------------------------------------------- */
.shead { margin-bottom: clamp(2.5rem, 4.5vw, 4rem); }
.shead p { color: var(--muted); max-width: 58ch; margin-top: 1.3rem; }
.shead--split { display: grid; gap: 1.6rem; align-items: end; }
@media (min-width: 860px) { .shead--split { grid-template-columns: 1fr auto; } }

/* --- Roster bands ------------------------------------------------------- */
.roster { border-top: 1px solid var(--line); }
.band {
  display: grid; gap: clamp(1.4rem, 3vw, 2.5rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: background .35s var(--ease);
  position: relative;
}
.band::before {
  content: ""; position: absolute; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1);
  top: 0; bottom: 0; background: var(--surface); opacity: 0; transition: opacity .35s var(--ease);
  z-index: -1;
}
.band:hover::before, .band:focus-visible::before { opacity: .55; }
@media (min-width: 880px) {
  .band { grid-template-columns: 92px minmax(0,1.4fr) minmax(0,1fr) auto; gap: clamp(1.5rem,3vw,3rem); }
}
/* A photograph joins the row once there's width for it. */
.band__shot { display: none; }
@media (min-width: 1100px) {
  .band { grid-template-columns: 92px 128px minmax(0,1.3fr) minmax(0,.95fr) auto; }
  .band__shot { display: block; }
}
.band__shot img { border-color: var(--line-2); }
.band__silk { width: 66px; }
.band__name { font-family: var(--display); font-size: clamp(1.6rem,2.6vw,2.15rem); letter-spacing: -.015em; }
.band__ped { font-family: var(--data); font-size: .9rem; color: var(--brass); margin-top: .5rem; letter-spacing: .03em; }
.band__note { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.band__fee { text-align: left; }
@media (min-width: 880px) { .band__fee { text-align: right; } }
.band__fee-n {
  font-family: var(--display); font-size: clamp(1.5rem,2.2vw,1.95rem);
  color: var(--paper); font-variant-numeric: tabular-nums;
}
.band__fee-l { font-family: var(--data); font-size: var(--t-xs); letter-spacing: .17em; text-transform: uppercase; color: var(--faint); margin-top: .4rem; }

/* --- Paper surfaces (documents) ---------------------------------------- */
.paper {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(1.6rem, 3.5vw, 3rem);
  position: relative;
}
.paper::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(16,23,20,.05) .5px, transparent .5px);
  background-size: 3px 3px; opacity: .55;
}
.paper > * { position: relative; z-index: 1; }
.paper a { color: var(--claret); }
.paper .eyebrow { color: var(--claret); }
.paper .eyebrow::after { background: var(--line-paper); }
.paper .muted { color: #4E5A53; }

/* --- Pedigree bracket --------------------------------------------------- */
.pedigree { overflow-x: auto; }
.ped {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  grid-template-rows: repeat(8, minmax(44px, auto));
  gap: 4px;
  min-width: 560px;
}
.ped__cell {
  border: 1px solid var(--line-paper);
  border-left: 3px solid var(--paper-3);
  padding: .55rem .75rem;
  display: flex; flex-direction: column; justify-content: center;
  background: rgba(255,255,255,.42);
}
.ped__cell--sire { border-left-color: var(--claret); }
.ped__cell--dam  { border-left-color: var(--brass-dim); }
.ped__n {
  font-family: var(--display); font-size: .98rem; line-height: 1.15; letter-spacing: -.005em;
}
.ped__y { font-family: var(--data); font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: #6A756D; margin-top: .28rem; }
.ped__g1 { grid-column: 1; grid-row: span 4; }
.ped__g2 { grid-column: 2; grid-row: span 2; }
.ped__g3 { grid-column: 3; grid-row: span 1; }
.ped__key { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.ped__key span { display: flex; align-items: center; gap: .5rem; font-family: var(--data); font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: #4E5A53; }
.ped__key i { width: 14px; height: 3px; display: block; }

/* --- Stud card ---------------------------------------------------------- */
.studcard { display: grid; gap: 0; border: 1px solid var(--line-paper); }
@media (min-width: 760px) { .studcard { grid-template-columns: 1fr 1fr; } }
.studcard__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .85rem 1.15rem; border-bottom: 1px solid var(--line-paper);
}
.studcard__row dt { font-family: var(--data); font-size: var(--t-xs); font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: #5C6862; }
.studcard__row dd { margin: 0; font-family: var(--display); font-size: 1.02rem; text-align: right; }

/* --- Tables (catalogue) ------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-family: var(--data); }
.tbl caption { text-align: left; font-family: var(--body); font-size: var(--t-sm); color: var(--muted); padding-bottom: 1rem; }
.tbl th {
  text-align: left; font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brass); padding: .7rem .9rem;
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.tbl td { padding: .95rem .9rem; border-bottom: 1px solid var(--line); font-size: .94rem; vertical-align: top; }
.tbl tbody tr { transition: background .25s var(--ease); }
.tbl tbody tr:hover { background: var(--surface); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .horse { font-family: var(--display); font-size: 1.05rem; }
.paper .tbl th { color: var(--claret); border-bottom-color: var(--line-paper); }
.paper .tbl td { border-bottom-color: var(--line-paper); }
.paper .tbl tbody tr:hover { background: rgba(16,23,20,.035); }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll table { min-width: 620px; }

/* --- Cards -------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.2rem, 2.4vw, 2rem); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2,1fr); } .grid--3 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3,1fr); } .grid--4 { grid-template-columns: repeat(4,1fr); } }

.card {
  border: 1px solid var(--line); padding: clamp(1.4rem,2.4vw,2rem);
  background: var(--ink-2); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: .9rem;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
a.card:hover, a.card:focus-visible { border-color: var(--brass-dim); background: var(--surface); transform: translateY(-3px); }
.card__n { font-family: var(--display); font-size: 1.3rem; letter-spacing: -.01em; }
.card__b { color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card__i { width: 30px; height: 30px; color: var(--brass); }

/* --- Photographs -------------------------------------------------------- */
.shot { margin: 0; position: relative; }
.shot__f, .shot > img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  background: var(--surface); border: 1px solid var(--line);
  filter: saturate(.86) contrast(1.04);
  transition: filter .5s var(--ease), transform .7s var(--ease);
}
.shot--frame > img { aspect-ratio: 4 / 3; }
.shot--wide > img  { aspect-ratio: 16 / 9; }
.shot--tall > img  { aspect-ratio: 3 / 4; }
.shot--sq > img    { aspect-ratio: 1 / 1; }
.shot--pano > img  { aspect-ratio: 21 / 9; }

.shot__cap {
  font-family: var(--data); font-size: var(--t-xs); letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
  margin-top: .85rem; padding-left: 1.15rem; position: relative; line-height: 1.5;
}
.shot__cap::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: .55rem; height: 1px; background: var(--brass);
}

/* Hover lift, used where the photograph sits inside a link. */
a:hover > .shot > img, .band:hover .shot > img { filter: saturate(1) contrast(1.04); }

.shot--mask { overflow: hidden; }
.shot--mask > img { transform: scale(1.001); }
a:hover .shot--mask > img { transform: scale(1.035); }

/* --- Photo plates (kept as the fallback / shot-list placeholder) --------- */
.plate {
  position: relative; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3;
}
.plate--wide { aspect-ratio: 16 / 9; }
.plate--tall { aspect-ratio: 3 / 4; }
.plate::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(145deg, rgba(195,154,80,.16), transparent 52%),
    linear-gradient(300deg, rgba(122,31,51,.24), transparent 55%),
    repeating-linear-gradient(45deg, rgba(233,228,216,.028) 0 2px, transparent 2px 7px);
}
.plate__l {
  position: relative; font-family: var(--data); font-size: var(--t-xs);
  letter-spacing: .2em; text-transform: uppercase; color: var(--sage);
  padding: .6rem 1rem; border: 1px solid var(--line-2); max-width: 80%;
}

/* --- Forms -------------------------------------------------------------- */
.form { display: grid; gap: 1.4rem; }
.field { display: grid; gap: .55rem; }
.field label, .fieldset__legend {
  font-family: var(--data); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.field .hint { font-size: var(--t-xs); color: var(--faint); letter-spacing: .02em; text-transform: none; font-family: var(--body); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line-2);
  padding: .85rem 1rem; width: 100%;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brass); background: var(--surface); outline: none;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.8rem; }
.field--2 { display: grid; gap: 1.4rem; }
@media (min-width: 640px) { .field--2 { grid-template-columns: 1fr 1fr; } }
.fieldset { border: 1px solid var(--line); padding: clamp(1.2rem,2.4vw,1.8rem); display: grid; gap: 1.4rem; }
.fieldset__legend { padding-inline: .6rem; }
.hp { position: absolute; left: -9999px; }
.form__note { font-size: var(--t-sm); color: var(--faint); }

/* --- Split feature ------------------------------------------------------ */
.split { display: grid; gap: clamp(2rem,4vw,4rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--wide { grid-template-columns: 1.2fr .8fr; } .split--flip > :first-child { order: 2; } }

/* --- Timeline ----------------------------------------------------------- */
.tl { border-left: 1px solid var(--line-2); padding-left: clamp(1.4rem,3vw,2.6rem); display: grid; gap: clamp(2rem,3.5vw,3rem); }
.tl__i { position: relative; }
.tl__i::before {
  content: ""; position: absolute; left: calc(clamp(1.4rem,3vw,2.6rem) * -1 - 4px);
  top: .55rem; width: 7px; height: 7px; background: var(--brass); border-radius: 50%;
}
.tl__y { font-family: var(--display); font-size: 1.6rem; color: var(--brass); line-height: 1; }
.tl__b { color: var(--muted); margin-top: .8rem; max-width: 58ch; }

/* --- Quote -------------------------------------------------------------- */
.quote { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem,5vw,4rem); }
.quote blockquote { margin: 0; font-family: var(--display); font-size: clamp(1.3rem,2.6vw,2.05rem); line-height: 1.32; letter-spacing: -.015em; max-width: 24ch; }
.quote figcaption { font-family: var(--data); font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--brass); margin-top: 1.8rem; }

/* --- Filter bar --------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 2.5rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.filters__l { font-family: var(--data); font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-right: .6rem; }
.chip {
  font-family: var(--body); font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .5rem 1rem; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer;
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: var(--ink); }

/* --- Notice ------------------------------------------------------------- */
.notice {
  border: 1px solid var(--brass-dim); border-left-width: 3px;
  padding: 1.1rem 1.4rem; font-size: var(--t-sm); color: var(--muted);
  background: rgba(195,154,80,.05);
}

/* --- Footer ------------------------------------------------------------- */
.ftr { border-top: 1px solid var(--line); background: var(--ink-2); }
.ftr__top { display: grid; gap: clamp(2rem,4vw,3rem); padding-block: clamp(3rem,6vw,5rem); }
@media (min-width: 860px) { .ftr__top { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
.ftr h4 { font-family: var(--data); font-size: var(--t-xs); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: 1.3rem; }
.ftr ul { list-style: none; display: grid; gap: .7rem; }
.ftr ul a { color: var(--muted); text-decoration: none; font-size: .92rem; transition: color .25s var(--ease); }
.ftr ul a:hover { color: var(--text); }
.ftr address { font-style: normal; color: var(--muted); font-size: .92rem; line-height: 1.75; }
.ftr address a { color: var(--muted); text-decoration: none; }
.ftr address a:hover { color: var(--brass); }
.ftr__bot {
  border-top: 1px solid var(--line); padding-block: 1.6rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--data); font-size: var(--t-xs); letter-spacing: .1em; color: var(--faint);
}
.ftr__bot a { color: var(--faint); text-decoration: none; }
.ftr__bot a:hover { color: var(--muted); }
.social { display: flex; gap: .8rem; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); color: var(--muted); transition: all .25s var(--ease); }
.social a:hover { border-color: var(--brass); color: var(--brass); }
.social svg { width: 16px; height: 16px; }

/* --- Page head ---------------------------------------------------------- */
.phead { border-bottom: 1px solid var(--line); padding-block: clamp(3.2rem,7vw,6rem); position: relative; overflow: hidden; }
.phead::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 120% at 88% 0%, rgba(122,31,51,.24), transparent 60%);
}
.phead__in { position: relative; }
.phead h1 { margin-bottom: 1.5rem; }
.crumb { font-family: var(--data); font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.6rem; }
.crumb a { color: var(--brass); text-decoration: none; }

/* --- Reveal ------------------------------------------------------------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --- Silks animation ---------------------------------------------------- */
.silk__panel { transform-origin: center; }
.hero__silk .silk__panel { opacity: 0; animation: silkIn .9s var(--ease) forwards; }
.hero__silk .silk__panel:nth-child(1) { animation-delay: .12s; }
.hero__silk .silk__panel:nth-child(2) { animation-delay: .22s; }
.hero__silk .silk__panel:nth-child(3) { animation-delay: .32s; }
.hero__silk .silk__panel:nth-child(4) { animation-delay: .42s; }
.hero__silk .silk__panel:nth-child(5) { animation-delay: .52s; }
@keyframes silkIn { to { opacity: 1; } }

/* --- Print (stud card) -------------------------------------------------- */
@media print {
  .hdr, .ftr, .hero__acts, .burger, .btn, .plate, .social, .skip,
  .scrim, .hero__bg, .shot, .nav, .gal { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .paper { background: #fff; padding: 0; }
  .paper::after { display: none; }
  .ped__cell { background: #fff; border-color: #999; }
  .bay { padding-block: 1rem; }
  a { text-decoration: none; color: #000; }
  .h-hero, .h-xxl, .h-xl { color: #000; }
  .figure__n, .band__fee-n, .card__n, .band__name { color: #000; }
}

/* --- Header stacking above the mobile drawer ----------------------------
   backdrop-filter makes an element the containing block for its
   position:fixed descendants. The drawer lives inside .hdr, so with the blur
   on, its top/bottom resolved against the 77px header instead of the viewport
   and it collapsed to a 138px stub. Solid background below 900px instead. */
@media (max-width: 899px) {
  .hdr {
    z-index: 96;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: var(--ink);
  }
  .hdr.is-stuck { background: var(--ink); }
}

/* --- Photographic hero --------------------------------------------------- */
.hero--shot .hero__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.hero--shot .hero__bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.55) contrast(1.06) brightness(.62);
}
.hero--shot .hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(16,23,20,.86) 0%, rgba(16,23,20,.58) 38%, rgba(16,23,20,.94) 100%),
    linear-gradient(96deg, rgba(16,23,20,.92) 6%, rgba(16,23,20,.30) 62%);
}
.hero--shot .hero__in { position: relative; z-index: 2; }
.hero--shot::before { opacity: .55; z-index: 1; }

/* --- Gallery ------------------------------------------------------------- */
.gal { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .gal { grid-template-columns: repeat(6, 1fr); } }
.gal__i { grid-column: span 1; }
@media (min-width: 860px) {
  .gal__i--w  { grid-column: span 4; }
  .gal__i--n  { grid-column: span 2; }
  .gal__i--h  { grid-column: span 3; }
  .gal__i--f  { grid-column: span 6; }
}

/* --- Season calendar ----------------------------------------------------- */
.season { display: grid; gap: 0; border-top: 1px solid var(--line); }
.season__row {
  display: grid; grid-template-columns: 1fr; gap: .35rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 760px) {
  .season__row { grid-template-columns: 8.5rem 12rem 1fr; gap: 2rem; align-items: baseline; }
}
.season__when {
  font-family: var(--data); font-size: var(--t-xs); letter-spacing: .18em;
  text-transform: uppercase; color: var(--brass);
}
.season__what { font-family: var(--display); font-size: 1.2rem; color: var(--text); }
.season__note { color: var(--muted); font-size: .97rem; margin: 0; }

/* --- Q&A ----------------------------------------------------------------- */
.qa { border-top: 1px solid var(--line); }
.qa__i { border-bottom: 1px solid var(--line); padding: 1.6rem 0; }
.qa__q { font-family: var(--display); font-size: 1.18rem; color: var(--text); margin: 0 0 .6rem; }
.qa__a { color: var(--muted); margin: 0; font-size: .99rem; }

/* --- Owner voices -------------------------------------------------------- */
.voices { display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); grid-template-columns: 1fr; }
@media (min-width: 900px) { .voices { grid-template-columns: repeat(3, 1fr); } }
.voice { border-top: 2px solid var(--brass); padding-top: 1.5rem; }
.voice blockquote {
  margin: 0 0 1.2rem; font-family: var(--display); font-size: 1.16rem;
  line-height: 1.44; color: var(--text); font-style: italic;
}
.voice figcaption { font-family: var(--data); font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); line-height: 1.7; }
.voice figcaption b { display: block; color: var(--brass); font-weight: 600; letter-spacing: .16em; }

/* --- Photo credit line --------------------------------------------------- */
.credit { font-family: var(--data); font-size: .78rem; color: var(--faint); letter-spacing: .04em; }


/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .nav, .nav__menu, .nav__ind, .scrim,
  .shot > img, .shot--mask > img, .burger span {
    transition: none !important;
  }
  a:hover .shot--mask > img { transform: none; }
}

/* --- Photograph fallback -------------------------------------------------
   If the CDN is unreachable the alt text sits on the plate texture rather
   than a broken-image icon. */
.shot > img { min-height: 1px; }
.shot > img:not([src]), .shot > img[src=""] { visibility: hidden; }


/* --- Secondary header links ---------------------------------------------
   The three pillars carry the site. These sit quieter, behind a hairline. */
.nav__util { list-style: none; display: flex; align-items: center; gap: 1.1rem; }
.nav__u {
  font-family: var(--body); font-size: .78rem; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  color: var(--faint); text-decoration: none; padding: .55rem 0;
  transition: color .22s var(--ease);
}
.nav__u:hover { color: var(--text); }
.nav__u[aria-current="page"] { color: var(--brass); }
@media (min-width: 900px) {
  .nav__util { padding-left: 1.35rem; border-left: 1px solid var(--line-2); }
}

/* Two links in a dropdown footer rather than one. */
.nav__foot { display: grid; }
.nav__foot .nav__all + .nav__all { border-top: 0; }

/* --- Section sub-navigation ---------------------------------------------
   Names the pillar you are in and lists its siblings. This is what stops a
   ten-horse roster having to live inside a dropdown. */
.subnav {
  position: sticky; top: 76px; z-index: 88;
  background: rgba(22,31,27,.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.subnav__in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 50px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.subnav__in::-webkit-scrollbar { display: none; }
.subnav__s {
  font-family: var(--data); font-size: var(--t-xs); letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass); white-space: nowrap;
  padding-right: 1.5rem; border-right: 1px solid var(--line-2); flex: none;
}
.subnav__ls { display: flex; align-items: center; gap: 1.4rem; flex: none; }
.subnav__l {
  font-size: .875rem; color: var(--muted); text-decoration: none;
  white-space: nowrap; padding: .9rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color .22s var(--ease), border-color .22s var(--ease);
}
.subnav__l:hover { color: var(--text); }
.subnav__l[aria-current="page"] { color: var(--text); border-bottom-color: var(--brass); }
.subnav__l[aria-current="page"]::before { content: none; }
.subnav__here {
  font-family: var(--display); font-size: .95rem; color: var(--text);
  margin-left: auto; padding-left: 1.5rem; white-space: nowrap; flex: none;
}
@media (max-width: 899px) {
  .subnav__here { display: none; }
  .subnav__in { gap: 1.1rem; }
  .subnav__s { padding-right: 1.1rem; }
}
@media print { .subnav { display: none !important; } }

/* --- Sire summary cards (racing page) ----------------------------------- */
.sire { border-top: 1px solid var(--line-2); padding-top: 1.5rem; }
.sire__hd { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.sire__n {
  display: block; font-family: var(--display); font-size: 1.35rem;
  color: var(--text); text-decoration: none; line-height: 1.2;
}
.sire__n:hover { color: var(--brass); }
.sire__l { list-style: none; display: grid; gap: .55rem; }
.sire__l li { font-size: .95rem; line-height: 1.45; padding-left: 1rem; position: relative; }
.sire__l li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .4rem; height: 1px; background: var(--brass);
}
.sire__l b { color: var(--text); font-weight: 600; }
.sire__l .muted { font-size: .88rem; }

/* The indicator needs an <li> host to keep the <ul> valid. */
.nav__ind-wrap { position: static; display: contents; }
@media (max-width: 899px) { .nav__ind-wrap { display: none; } }

/* A secondary link stays marked across its whole section, not just its landing page. */
.nav__u[data-current="true"] { color: var(--brass); }
