/* =========================================================================
   KATE DOOHAN EQUESTRIAN — design tokens
   Palette: deep hunter green, saddle leather, brass ribbon gold, parchment.
   Display type: Fraunces (editorial serif). Body/UI: Inter.
   Signature element: the ribbon/rosette badge, used for placings throughout.
   ========================================================================= */

:root {
  --ink: #1E2420;
  --parchment: #F1EADA;
  --parchment-deep: #E6DBC3;
  --hunter: #2C3B2E;
  --hunter-dark: #1D2820;
  --leather: #6B4226;
  --brass: #A9824F;
  --brass-bright: #C79F5B;
  --ribbon-red: #8C2F2F;

  --ribbon-1: #1F4E8C;
  --ribbon-2: #8C2F2F;
  --ribbon-3: #C9A227;
  --ribbon-4: #EFE8DA;
  --ribbon-5: #B5567A;
  --ribbon-6: #3F6B4B;

  --trophy-silver: #A6A296;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --rail: 1px solid rgba(30, 36, 32, 0.16);
  --radius: 4px;
  --max-w: 1140px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--leather); }
a:hover { color: var(--ribbon-red); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--hunter);
  color: var(--parchment);
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Eyebrow / label convention (ribbon-lettering feel) ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 10px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--hunter-dark);
}

h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }

.lede {
  font-size: 1.15rem;
  max-width: 60ch;
}

/* ---------- Rail divider — a double hairline, evokes a fence rail ---------- */
.rail-divider {
  border: none;
  height: 6px;
  margin: 0;
  background:
    linear-gradient(var(--ink) 0 1px, transparent 1px 5px, var(--ink) 5px 6px);
  opacity: 0.14;
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hunter);
  color: var(--parchment);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--parchment);
  text-decoration: none;
  font-style: italic;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62vw;
}

@media (max-width: 380px) {
  .brand { font-size: 0.98rem; }
}
.brand:hover { color: var(--brass-bright); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}
.site-nav a:hover {
  opacity: 1;
  color: var(--brass-bright);
  border-bottom-color: var(--brass-bright);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(241,234,218,0.4);
  color: var(--parchment);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--hunter);
    border-top: var(--rail);
  }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    padding: 16px 24px 22px;
    gap: 16px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--parchment);
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center 20%;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(29,40,32,0.5) 0%, rgba(29,40,32,0) 55%),
    linear-gradient(180deg, rgba(29,40,32,0.65) 0%, rgba(29,40,32,0.8) 50%, rgba(29,40,32,1) 100%);
  z-index: -1;
}

@media (min-aspect-ratio: 16/8) {
  .hero { background-position: center 8%; }
}
.hero-inner {
  padding: 60px 0 56px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}
.hero h1 {
  color: var(--parchment);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-style: italic;
  margin-bottom: 0.2em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.hero .lede {
  color: var(--parchment);
  opacity: 0.92;
  max-width: 52ch;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
/* ---------- Ribbon badge (signature element, now inline in the text flow) ---------- */
.ribbon {
  --rc: var(--ribbon-1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 10px;
  background: rgba(20, 26, 22, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: background-color 0.2s ease;
}
.ribbon:hover,
.ribbon:focus-visible {
  background: rgba(20, 26, 22, 0.68);
}
.ribbon:hover .ribbon-cta,
.ribbon:focus-visible .ribbon-cta {
  color: var(--brass-bright);
  border-bottom-color: var(--brass-bright);
}
.ribbon-icon {
  width: 34px;
  height: 44px;
  flex-shrink: 0;
}
.ribbon-icon .tails { fill: var(--rc); }
.ribbon-icon .rosette { fill: var(--rc); }
.ribbon-icon .rosette-inner { fill: rgba(255,255,255,0.35); }
.hero-trophy-icon {
  width: 32px;
  height: 36px;
  flex-shrink: 0;
}
.ribbon-text {
  font-family: var(--font-body);
  line-height: 1.2;
}
.ribbon-text .ribbon-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-bright);
  opacity: 0.9;
  margin-bottom: 1px;
}
.ribbon-text .place {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--parchment);
}
.ribbon-text .place-detail {
  display: block;
  font-size: 0.82rem;
  opacity: 0.85;
  color: var(--parchment);
  max-width: 200px;
}
.ribbon-text .ribbon-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--parchment);
  border-bottom: 1px solid var(--brass-bright);
  padding-bottom: 2px;
}

@media (max-width: 480px) {
  .ribbon { margin-top: 20px; gap: 8px; padding: 12px 16px; }
  .ribbon-icon { width: 26px; height: 34px; }
  .hero { min-height: 66vh; }
  .hero-inner { padding: 44px 24px 36px; }
}

.ribbon[data-place="1"] { --rc: var(--ribbon-1); }
.ribbon[data-place="2"] { --rc: var(--ribbon-2); }
.ribbon[data-place="3"] { --rc: var(--ribbon-3); }
.ribbon[data-place="4"] { --rc: var(--ribbon-4); }
.ribbon[data-place="5"] { --rc: var(--ribbon-5); }
.ribbon[data-place="6"] { --rc: var(--ribbon-6); }

/* ---------- Section rhythm ---------- */
section { padding: 76px 0; }
section.alt { background: var(--parchment-deep); }

@media (max-width: 600px) {
  section { padding: 48px 0; }
  .wrap { padding: 0 18px; }
}

.section-head {
  margin-bottom: 34px;
}

/* ---------- Story / Honey (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split.reverse .split-copy { order: 1; }

.split-media img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.split-copy p { margin: 0 0 1em; }
.photo-credit {
  font-size: 0.8rem;
  opacity: 0.65;
  margin-top: 8px;
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .split-media,
  .split.reverse .split-copy { order: unset; }
}

.pony-block + .pony-block {
  margin-top: 56px;
  padding-top: 56px;
  border-top: var(--rail);
}
.pony-name {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.pony-showname {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 0.62em;
  color: var(--leather);
  opacity: 0.75;
}

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
}
.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}
.carousel-slide {
  min-width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, rgba(29,40,32,0) 0%, rgba(29,40,32,0.82) 55%);
  color: var(--parchment);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}
.carousel-btn {
  background: var(--hunter);
  color: var(--parchment);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover { background: var(--leather); }
.carousel-dots {
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(30,36,32,0.25);
  cursor: pointer;
  padding: 0;
}
.carousel-dot[aria-current="true"] { background: var(--brass); }

/* ---------- Latest video (YouTube embed) ---------- */
.video-wrap {
  max-width: 860px;
  margin: 0 auto;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-caption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--leather);
  text-align: center;
}

/* ---------- Results table ---------- */
.results-table-wrap {
  overflow-x: auto;
  border: var(--rail);
  border-radius: var(--radius);
  background: var(--parchment);
}
table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 620px;
}
table.results th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 14px 18px;
  border-bottom: var(--rail);
  white-space: nowrap;
}
table.results td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(30,36,32,0.08);
  vertical-align: middle;
}
table.results tr:last-child td { border-bottom: none; }

@media (max-width: 600px) {
  table.results { min-width: 460px; font-size: 0.86rem; }
  table.results th,
  table.results td { padding: 11px 12px; }
  table.results th:last-child,
  table.results td:last-child { display: none; } /* hide "note" col; still in the data */
}
.place-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.place-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.place-dot[data-place="1"] { background: var(--ribbon-1); }
.place-dot[data-place="2"] { background: var(--ribbon-2); }
.place-dot[data-place="3"] { background: var(--ribbon-3); }
.place-dot[data-place="4"] { background: var(--ribbon-4); border: 1px solid var(--ink); }
.place-dot[data-place="5"] { background: var(--ribbon-5); }
.place-dot[data-place="6"] { background: var(--ribbon-6); }
.place-dot[data-place="0"] { background: transparent; border: 1px dashed rgba(30,36,32,0.35); }

.place-cell-none { color: rgba(30,36,32,0.4); }

.trophy-icon {
  width: 16px;
  height: 18px;
  flex-shrink: 0;
}
.trophy-champion { fill: var(--brass-bright); }
.trophy-reserve { fill: var(--trophy-silver); }

/* ---------- Gear / partners ---------- */
.gear-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 48px) clamp(28px, 6vw, 56px);
  max-width: 880px;
  margin: 0 auto;
}
.gear-card {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.gear-card:hover,
.gear-card:focus-visible {
  transform: translateY(-2px);
}
.gear-logo {
  height: calc(clamp(30px, 6vw, 52px) * var(--scale, 1));
  width: auto;
  object-fit: contain;
}
.gear-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}
.gear-name-fallback {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--leather);
  text-align: center;
}
.partner-callout {
  margin-top: 34px;
  padding: 22px 24px;
  border-left: 3px solid var(--brass);
  background: rgba(169,130,79,0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.partner-callout p { margin: 0; }

/* ---------- Follow along ---------- */
.social-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: var(--rail);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--leather);
  background: var(--parchment);
}
.social-links a:hover {
  border-color: var(--brass);
  color: var(--brass);
}
.social-links a svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 560px;
}
.form-row {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brass);
}
.form-row input,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: var(--rail);
  border-radius: var(--radius);
  background: var(--parchment);
  color: var(--ink);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--brass);
}
.hidden-field { position: absolute; left: -9999px; }
.submit-btn {
  background: var(--hunter);
  color: var(--parchment);
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.submit-btn:hover { background: var(--leather); }
.form-note {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--hunter-dark);
  color: var(--parchment);
  padding: 36px 0;
  font-size: 0.85rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0.85;
}
.site-footer a { color: var(--brass-bright); }
