:root {
  --ink: #1e201c;
  --muted: #6d6a60;
  --paper: #fbfaf6;
  --soft: #f0ede5;
  --line: #d8d1c1;
  --green: #1f4fbf;
  --green-light: #416ee0;
  --gold: #b98b3f;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(30, 32, 28, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 246, 0.94);
  border-bottom: 1px solid rgba(216, 209, 193, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 20px;
}

.brand small {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 980px;
}

.site-nav a {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--green);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  min-height: 78vh;
  display: flex;
  align-items: end;
  padding: clamp(90px, 10vw, 150px) clamp(18px, 5vw, 72px) clamp(56px, 8vw, 92px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(22, 31, 24, 0.82), rgba(22, 31, 24, 0.28) 58%, rgba(22, 31, 24, 0.12)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2200&q=80") center / cover;
}

.page-hero {
  min-height: 58vh;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.modal-body h2 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(46px, 7vw, 92px);
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(19px, 2vw, 24px);
}

.hero-actions,
.modal-body .button {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: var(--white);
  background: var(--green);
}

.button.secondary {
  margin-left: 10px;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.announcement {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  color: var(--white);
  background: var(--green);
}

.announcement span {
  margin-right: 10px;
  color: #f4d491;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.announcement p {
  margin: 0;
}

.section {
  padding: clamp(58px, 8vw, 100px) clamp(18px, 5vw, 72px);
}

.two-column,
.feature-band,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 6vw, 80px);
}

.section h2 {
  max-width: 780px;
  font-size: clamp(32px, 4vw, 56px);
}

.copy-stack p {
  margin: 0 0 18px;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.horse-card {
  display: block;
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(30, 32, 28, 0.08);
  text-decoration: none;
}

.horse-card:focus {
  outline: 3px solid rgba(185, 139, 63, 0.55);
  outline-offset: 3px;
}

.horse-card img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 260ms ease;
}

.horse-card:hover img {
  transform: scale(1.04);
}

.horse-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(20, 24, 20, 0.84));
}

.card-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  max-height: 58%;
  overflow-y: auto;
  padding: 24px;
  color: var(--white);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.65) rgba(255, 255, 255, 0.16);
}

.card-content::-webkit-scrollbar {
  width: 8px;
}

.card-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.16);
}

.card-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
}

.card-content span {
  color: #f4d491;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.card-content h3 {
  margin: 8px 0 8px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 30px;
}

.card-content p {
  margin: 0;
}

.feature-band {
  color: var(--white);
  background: var(--green);
}

.feature-band .eyebrow {
  color: #f4d491;
}

.program-list {
  display: grid;
  gap: 18px;
}

.program-list div {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.program-list p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.gallery-section {
  background: var(--soft);
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 18px;
}

.photo-strip img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-strip img:nth-child(2) {
  height: 420px;
}

.contact-section {
  align-items: start;
}

.contact-section p {
  max-width: 640px;
  color: var(--muted);
}

.contact-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 44px rgba(30, 32, 28, 0.08);
}

.contact-card h3 {
  margin: 0 0 14px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 27px;
}

.contact-card a {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--white);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 17, 0.72);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  width: min(1120px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.modal-media img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.modal-body {
  overflow: auto;
  padding: clamp(28px, 5vw, 56px);
}

.modal-body h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.modal-body h3 {
  margin: 30px 0 10px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 24px;
}

.modal-body p {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.detail-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
}

.modal-gallery {
  display: grid;
  grid-auto-columns: minmax(116px, 150px);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin-top: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--green) var(--soft);
}

.gallery-thumb {
  overflow: hidden;
  height: 96px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.gallery-thumb.active,
.gallery-thumb:focus {
  border-color: var(--green);
  outline: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horse-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.horse-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.horse-list strong {
  display: block;
  color: var(--green);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .category-grid,
  .two-column,
  .feature-band,
  .contact-section,
  .modal-panel {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    display: block;
  }

  .modal-panel {
    overflow: auto;
  }

  .modal-media img {
    min-height: 280px;
    max-height: 340px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header {
    min-height: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(30, 32, 28, 0.16);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: 74vh;
    background-position: center;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .button.secondary {
    margin-left: 0;
  }

  .announcement,
  .site-footer {
    display: block;
  }

  .category-grid,
  .photo-strip,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .horse-card,
  .horse-card img {
    min-height: 360px;
  }

  .photo-strip img,
  .photo-strip img:nth-child(2) {
    height: 260px;
  }

  .modal {
    padding: 12px;
  }
}
