/* ==========================================================================
   Rolling River Ranch — stonehollow.toplinesim.com/rollingriver
   Sandstone Flats / working ranch identity.
   Display: Fraunces (heavy, stamped) · Body: Jost · Utility: Jost (caps, wide-tracked)
   ========================================================================== */

:root {
  --rr-bg:        #2e2114;   /* saddle leather, near-black brown */
  --rr-bg-raised: #3a2a1c;   /* panel / card surface, one step up */
  --rr-cream:     #ede1cb;   /* sun-bleached canvas */
  --rr-cream-dim: #c9b99a;   /* muted canvas, for secondary text */
  --rr-clay:      #b5602e;   /* terracotta clay — primary accent */
  --rr-ochre:     #8a6d3a;   /* dusty ochre — secondary accent */
  --rr-rawhide:   #5c4a3a;   /* worn rawhide — borders, rules */
  --rr-shadow:    rgba(20, 14, 8, 0.45);

  --rr-font-display: 'Fraunces', Georgia, serif;
  --rr-font-body: 'Jost', 'Open Sans', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.rr-body {
  margin: 0;
  background: var(--rr-bg);
  color: var(--rr-cream);
  font-family: var(--rr-font-body);
  font-size: 16px;
  line-height: 1.6;
}

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

a { color: var(--rr-clay); text-decoration: none; }
a:hover { color: var(--rr-cream); }

.rr-eyebrow {
  font-family: var(--rr-font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--rr-clay);
  font-weight: 600;
}

h1, h2, h3 { font-family: var(--rr-font-display); margin: 0; color: var(--rr-cream); }

.rr-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* === Header / nav ======================================================= */

.rr-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(46, 33, 20, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rr-rawhide);
}

.rr-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.rr-wordmark {
  font-family: var(--rr-font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--rr-cream);
  letter-spacing: 0.01em;
}
.rr-wordmark span { color: var(--rr-clay); }

.rr-nav { display: flex; gap: 28px; }
.rr-nav a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rr-cream-dim);
  font-weight: 500;
}
.rr-nav a:hover { color: var(--rr-clay); }

.rr-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rr-rawhide);
  border-radius: 4px;
  color: var(--rr-cream);
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .rr-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rr-bg-raised);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--rr-rawhide);
  }
  .rr-nav.is-open { display: flex; }
  .rr-nav a { padding: 14px 28px; border-top: 1px solid var(--rr-rawhide); }
  .rr-nav-toggle { display: block; }
}

/* === Hero =============================================================== */

.rr-hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(46,33,20,0.15) 0%, rgba(28,19,11,0.92) 88%),
              url('<?= defined("RR_HERO_IMG") ? RR_HERO_IMG : "" ?>') center/cover no-repeat;
  background-color: var(--rr-bg);
}

.rr-hero-content {
  position: relative;
  width: 100%;
  padding: 80px 28px 56px;
  max-width: 1180px;
  margin: 0 auto;
}

.rr-hero .rr-eyebrow { margin-bottom: 14px; display: block; }

.rr-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 600;
  line-height: 1.02;
  max-width: 18ch;
}

.rr-hero-tagline {
  margin-top: 18px;
  font-size: 1.15rem;
  color: var(--rr-cream-dim);
  max-width: 80ch;
  font-weight: 300;
}

.rr-hero-meta {
  margin-top: 28px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.rr-hero-meta-item { font-size: 0.85rem; color: var(--rr-cream-dim); }
.rr-hero-meta-item strong {
  display: block;
  font-family: var(--rr-font-display);
  font-size: 1.6rem;
  color: var(--rr-cream);
  font-weight: 600;
}

/* === Brand-stamp divider (signature element) ============================ */

.rr-brand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 56px 28px;
  opacity: 0.85;
}
.rr-brand-divider .line { flex: 1; max-width: 220px; height: 1px; background: var(--rr-rawhide); }
.rr-brand-divider svg { width: 46px; height: 46px; color: var(--rr-clay); }

/* === About section ======================================================= */

.rr-about {
  padding: 20px 0 80px;
}

.rr-about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .rr-about-grid { grid-template-columns: 1fr; gap: 32px; }
}

.rr-about h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin: 10px 0 22px;
  font-weight: 600;
}

.rr-about p { color: var(--rr-cream-dim); margin: 0 0 16px; max-width: 56ch; }
.rr-about p:last-child { margin-bottom: 0; }

.rr-about-img {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--rr-rawhide);
  box-shadow: 0 18px 40px var(--rr-shadow);
}
.rr-about-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }

/* === Section heading shared ============================================= */

.rr-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.rr-section-head h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 600; margin-top: 8px; }

/* === Roster ============================================================== */

.rr-roster { padding: 70px 0 80px; background: var(--rr-bg-raised); border-top: 1px solid var(--rr-rawhide); border-bottom: 1px solid var(--rr-rawhide); }

.rr-roster-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.rr-select, .rr-search {
  background: var(--rr-bg);
  border: 1px solid var(--rr-rawhide);
  color: var(--rr-cream);
  font-family: var(--rr-font-body);
  font-size: 0.85rem;
  padding: 9px 14px;
  border-radius: 4px;
}
.rr-select:focus, .rr-search:focus {
  outline: 2px solid var(--rr-clay);
  outline-offset: 1px;
}

.rr-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.rr-horse-card {
  background: var(--rr-bg);
  border: 1px solid var(--rr-rawhide);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.rr-horse-card:hover { transform: translateY(-3px); border-color: var(--rr-clay); }

.rr-horse-card-img {
  aspect-ratio: 4/3;
  background: var(--rr-bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.rr-horse-card-img img { width: 100%; height: 100%; object-fit: cover; }
.rr-horse-card-img .placeholder-mark { color: var(--rr-rawhide); font-size: 2rem; }

.rr-horse-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(46,33,20,0.85);
  border: 1px solid var(--rr-clay);
  color: var(--rr-clay);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 3px;
}

.rr-horse-card-body { padding: 16px 18px 18px; }
.rr-horse-card-name {
  font-family: var(--rr-font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rr-cream);
  margin-bottom: 4px;
}
.rr-horse-card-name a { color: inherit; }
.rr-horse-card-name a:hover { color: var(--rr-clay); }

.rr-horse-card-meta { font-size: 0.82rem; color: var(--rr-cream-dim); }
.rr-horse-card-meta .dot { margin: 0 6px; opacity: 0.5; }

.rr-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--rr-cream-dim);
}

/* === Gallery ============================================================= */

.rr-gallery { padding: 80px 0; }

.rr-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
  margin-top: 36px;
}
.rr-gallery-grid figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--rr-rawhide);
}
.rr-gallery-grid figure:nth-child(3n+1) { grid-row: span 2; }
.rr-gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.18) saturate(0.92);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.rr-gallery-grid figure:hover img { transform: scale(1.04); filter: sepia(0) saturate(1); }
.rr-gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--rr-cream);
  background: linear-gradient(0deg, rgba(20,14,8,0.85), transparent);
}

@media (max-width: 760px) {
  .rr-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .rr-gallery-grid figure:nth-child(3n+1) { grid-row: span 1; }
}

/* === Footer =============================================================== */

.rr-footer {
  border-top: 1px solid var(--rr-rawhide);
  padding: 40px 28px;
  text-align: center;
  color: var(--rr-cream-dim);
  font-size: 0.8rem;
}
.rr-footer a { color: var(--rr-cream-dim); }
.rr-footer a:hover { color: var(--rr-clay); }

/* === Motion / a11y ======================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rr-horse-card, .rr-gallery-grid img { transition: none; }
}

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--rr-clay);
  outline-offset: 2px;
}
