:root {
  --forest-950: #101d16;
  --forest-900: #14261d;
  --forest-800: #20382b;
  --moss-600: #66785d;
  --cream-100: #f4f1e8;
  --cream-50: #faf8f2;
  --stone-300: #d8d3c7;
  --brass-500: #a78d58;
  --ink: #252823;
  --white: #ffffff;
  --shadow: 0 14px 35px rgba(16, 29, 22, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-50);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--forest-800); }
a:hover { color: var(--brass-500); }

.wrap {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  background: var(--forest-900);
  color: var(--white);
}

.masthead {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--white);
  text-decoration: none;
}

.brand:hover { color: var(--white); }

.brand-name {
  display: block;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1;
}

.brand-tagline {
  display: block;
  margin-top: 0.55rem;
  color: var(--stone-300);
  letter-spacing: 0.04em;
}

.site-nav {
  border-top: 1px solid rgba(255,255,255,.1);
  background: var(--forest-950);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav a {
  display: block;
  padding: 0.95rem 1.15rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--cream-100);
  background: var(--forest-800);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: var(--white);
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
}

.hero {
  padding: 5rem 0;
  background:
    linear-gradient(rgba(20, 38, 29, .83), rgba(20, 38, 29, .83)),
    radial-gradient(circle at top right, #66785d 0, #20382b 45%, #14261d 100%);
  color: var(--white);
}

.hero-copy { max-width: 780px; }

.eyebrow {
  margin: 0 0 .75rem;
  color: #d8c59a;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.hero h1,
.page-heading h1,
.section-title {
  font-family: "Libre Baskerville", serif;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.1;
}

.hero p { font-size: 1.18rem; color: #ece8dd; }

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: .75rem 1.1rem;
  border: 1px solid var(--brass-500);
  background: var(--brass-500);
  color: var(--forest-950);
  text-decoration: none;
  font-weight: 700;
  border-radius: 3px;
}

.button:hover { background: #b99e66; color: var(--forest-950); }

.page-section { padding: 4rem 0; }
.page-section.alt { background: var(--cream-100); }

.section-title { margin: 0 0 1.5rem; font-size: 2rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.info-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--stone-300);
  border-top: 4px solid var(--moss-600);
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin-top: 0;
  font-family: "Libre Baskerville", serif;
}

.page-heading {
  padding: 3rem 0;
  background: var(--cream-100);
  border-bottom: 1px solid var(--stone-300);
}

.page-heading h1 { margin: 0; font-size: 2.6rem; }

.content-panel {
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--stone-300);
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: 4rem;
  background: var(--forest-900);
  color: var(--cream-100);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.site-footer h2 {
  margin-top: 0;
  font-family: "Libre Baskerville", serif;
  font-size: 1.15rem;
  color: var(--white);
}

.site-footer a { color: #d8c59a; }

.copyright-bar {
  padding: 1rem 0;
  background: var(--forest-950);
  color: var(--stone-300);
  font-size: .92rem;
}

@media (max-width: 800px) {
  .masthead { min-height: 120px; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .nav-inner { flex-direction: column; align-items: stretch; padding: .4rem 0; }
  .site-nav a { padding: .85rem 0; }
  .card-grid, .footer-grid { grid-template-columns: 1fr; }
}

/* Horse directory */
.page-intro {
  max-width: 760px;
  margin: .75rem 0 0;
  color: #555c54;
  font-size: 1.08rem;
}

.directory-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(140px, 1fr));
  gap: 1rem;
  align-items: end;
  padding: 1.25rem;
  background: var(--cream-100);
  border: 1px solid var(--stone-300);
}

.filter-field label {
  display: block;
  margin-bottom: .35rem;
  color: var(--forest-900);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: .65rem .75rem;
  border: 1px solid #bdb8ac;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.filter-field input:focus,
.filter-field select:focus {
  outline: 3px solid rgba(167, 141, 88, .25);
  border-color: var(--brass-500);
}

.filter-clear {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0;
}

.button-secondary {
  background: transparent;
  color: var(--forest-900);
}

.button-secondary:hover {
  background: var(--forest-900);
  color: var(--white);
}

.directory-summary {
  display: flex;
  justify-content: flex-end;
  margin: 1rem 0;
  color: #5f655d;
  font-weight: 600;
}

.directory-summary p { margin: 0; }

.horse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.horse-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 1.35rem;
  background: var(--white);
  border: 1px solid var(--stone-300);
  border-top: 4px solid var(--moss-600);
  box-shadow: 0 8px 24px rgba(16, 29, 22, .07);
}

.horse-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e4e0d6;
}

.horse-card h2 {
  margin: 0;
  color: var(--forest-900);
  font-family: "Libre Baskerville", serif;
  font-size: 1.25rem;
  line-height: 1.25;
}

.horse-card-header p {
  margin: .4rem 0 0;
  color: #626860;
  font-size: .93rem;
}

.status-badge {
  flex: 0 0 auto;
  padding: .28rem .55rem;
  border: 1px solid #aeb9a8;
  border-radius: 999px;
  background: #edf1e9;
  color: var(--forest-800);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.horse-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 1rem 0;
}

.horse-card-details div { min-width: 0; }
.horse-card-details dt {
  color: #777c74;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.horse-card-details dd { margin: .15rem 0 0; font-weight: 600; }

.horse-note {
  margin: 0 0 1.1rem;
  color: #535950;
}

.horse-profile-link {
  margin-top: auto;
  color: var(--forest-800);
  font-weight: 700;
  text-decoration: none;
}

.horse-profile-link.disabled {
  color: #858980;
  font-weight: 600;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--cream-100);
  border: 1px dashed #bdb8ac;
}

.empty-state h2 {
  margin-top: 0;
  font-family: "Libre Baskerville", serif;
}

@media (max-width: 1100px) {
  .directory-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-search { grid-column: span 2; }
  .horse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .directory-toolbar { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .horse-grid { grid-template-columns: 1fr; }
  .horse-card { min-height: 0; }
}

/* Interior content pages */
.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.section-heading-row h2,
.split-panel h2 {
  margin: .2rem 0 0;
  color: var(--forest-900);
  font-family: "Libre Baskerville", serif;
}

.section-note,
.small-note {
  color: #666c64;
  font-size: .94rem;
}

.info-card-grid,
.link-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.program-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.info-card,
.link-card,
.values-panel,
.notice-panel {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--stone-300);
  border-top: 4px solid var(--moss-600);
  box-shadow: 0 8px 24px rgba(16, 29, 22, .06);
}

.info-card h3,
.link-card h2,
.values-panel h2 {
  margin: .25rem 0 .7rem;
  color: var(--forest-900);
  font-family: "Libre Baskerville", serif;
}

.card-kicker {
  margin: 0;
  color: var(--brass-500);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.muted-card {
  background: var(--cream-100);
  border-top-color: #a9ad9f;
}

.compact-list {
  margin: 1rem 0 0;
  padding-top: .75rem;
  border-top: 1px solid #e2ded3;
}

.compact-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .25rem 0;
}

.compact-list dt { color: #72776f; }
.compact-list dd { margin: 0; font-weight: 700; }

.section-tint { background: var(--cream-100); }

.split-panel,
.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr);
  gap: 3rem;
  align-items: start;
}

.prose-panel p:first-child { margin-top: 0; }
.prose-panel p:last-child { margin-bottom: 0; }

.feature-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.feature-list li { margin: .65rem 0; }

.notice-panel {
  border-top-color: var(--brass-500);
}

.notice-panel strong {
  display: block;
  margin-bottom: .45rem;
  color: var(--forest-900);
  font-family: "Libre Baskerville", serif;
  font-size: 1.1rem;
}

.notice-panel p:last-child { margin-bottom: 0; }

.link-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.link-card { min-height: 220px; }

.coming-soon {
  display: inline-block;
  margin-top: .75rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: #edf1e9;
  color: var(--forest-800);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

@media (max-width: 1000px) {
  .program-grid,
  .info-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .section-heading-row { align-items: start; flex-direction: column; gap: .5rem; }
  .program-grid,
  .info-card-grid,
  .link-card-grid,
  .split-panel,
  .about-layout { grid-template-columns: 1fr; }
}

/* About page story and staff history */
.story-panel p {
  line-height: 1.8;
}

.staff-history {
  display: grid;
  gap: 1rem;
}

.staff-entry {
  display: grid;
  grid-template-columns: minmax(140px, .35fr) minmax(0, 1.65fr);
  background: var(--white);
  border: 1px solid var(--stone-300);
  border-left: 4px solid var(--moss-600);
  box-shadow: 0 8px 24px rgba(16, 29, 22, .05);
}

.staff-years {
  padding: 1.5rem;
  background: #edf1e9;
  color: var(--forest-800);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.staff-details {
  padding: 1.5rem;
}

.staff-details h3 {
  margin: .25rem 0 .65rem;
  color: var(--forest-900);
  font-family: "Libre Baskerville", serif;
}

.staff-details p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .staff-entry {
    grid-template-columns: 1fr;
  }

  .staff-years {
    padding: .8rem 1.25rem;
  }

  .staff-details {
    padding: 1.25rem;
  }
}

.horse-pedigree { margin: 0 0 1rem; }