/* =========================================================
   Poppyfield Equestrian — Design tokens
   ========================================================= */
:root {
  --ink:        #20241c;
  --hunter:     #2c3e2d;
  --hunter-dk:  #1c2a1d;
  --saddle:     #7a4b32;
  --parchment:  #f1eee2;
  --parchment-dk: #e6e1d0;
  --gold:       #b8862b;
  --gold-lt:    #d9ad55;
  --cream-line: #d8d2bd;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --radius: 4px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.55;
  font-size: 16px;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 var(--space-2);
  color: var(--hunter-dk);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 var(--space-2); }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--saddle);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--hunter); color: var(--parchment); }
.btn-primary:hover { background: var(--hunter-dk); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--hunter); color: var(--hunter-dk); }
.btn-outline:hover { background: var(--hunter); color: var(--parchment); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-lt); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--hunter);
  border-bottom: none;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  gap: var(--space-3);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  white-space: nowrap;
}
.logo-mark { height: 52px; width: auto; display: block; }
.logo-text {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--parchment);
  line-height: normal;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
nav.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: normal;
  color: var(--parchment);
  position: relative;
  padding: 0.3em 0;
}
nav.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gold-lt);
  transition: right 0.2s ease;
}
nav.main-nav a:hover::after { right: 0; }
nav.main-nav a[aria-current="page"] { color: var(--gold-lt); }

/* Info dropdown */
.has-dropdown { position: relative; }
.dropdown-toggle {
  background: none;
  border: none;
  margin: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: normal;
  color: var(--parchment);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.3em 0;
  -webkit-appearance: none;
  appearance: none;
}
.dropdown-toggle::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--gold-lt);
  flex-shrink: 0;
}
.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0.4em 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--hunter-dk);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,0.5);
  display: none;
  z-index: 60;
}
.dropdown-menu.open,
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  display: block;
}
.dropdown-menu li { width: 100%; }
nav.main-nav .dropdown-menu a {
  display: block;
  padding: 0.65em 1.1em;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: normal;
  color: var(--parchment);
}
nav.main-nav .dropdown-menu a:hover { background: rgba(255,255,255,0.08); }
nav.main-nav .dropdown-menu a::after { display: none; content: none; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  nav.main-nav > ul {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--hunter-dk);
    border-bottom: 1px solid #14200f;
    padding: var(--space-2) var(--space-3) var(--space-3);
  }
  nav.main-nav > ul.open { display: flex; }
  nav.main-nav > ul li { width: 100%; }
  nav.main-nav > ul a { display: block; padding: 0.6em 0; }
  .has-dropdown .dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,0.15);
    margin-top: 0.3em;
    border-radius: var(--radius);
  }
  .has-dropdown .dropdown-menu.open { display: block; }
  .dropdown-toggle { width: 100%; justify-content: space-between; padding: 0.6em 0; }
  .nav-toggle {
    display: inline-flex;
    background: none; border: 1px solid var(--parchment);
    color: var(--parchment);
    border-radius: var(--radius);
    padding: 0.5em 0.8em;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
  }
}
@media (min-width: 901px) {
  .nav-toggle { display: none; }
}

/* =========================================================
   Hero — "stable nameplate" concept
   ========================================================= */
.hero {
  position: relative;
  background: var(--hunter);
  color: var(--parchment);
  overflow: hidden;
  padding: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  min-height: 460px;
}
.hero-copy {
  padding: var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.hero-copy .eyebrow { color: var(--gold-lt); }
.hero-copy .eyebrow::before { background: var(--gold-lt); }
.hero h1 { color: var(--parchment); }
.hero-copy p.lede {
  font-size: 1.15rem;
  max-width: 34em;
  color: #dfe3d6;
}
.hero-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }

.hero-photo {
  position: relative;
  height: 100%;
  min-height: 100%;
  background-size: cover;
  background-position: center;
}
.hero-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--hunter) 0%, rgba(44,62,45,0) 30%);
}

/* Rosette signature element */
.rosette {
  width: 84px; height: 108px;
  position: relative;
  flex-shrink: 0;
}
.rosette svg { width: 100%; height: 100%; }

.accreditations {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-4);
  flex-wrap: wrap;
}
.accreditation-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.accreditation-item .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--gold-lt);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.accreditation-item .label strong {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--parchment);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-photo { height: 320px; order: -1; }
  .hero-photo::after { background: linear-gradient(0deg, var(--hunter) 0%, rgba(44,62,45,0) 40%); }
  .hero-copy { padding: var(--space-4) var(--space-3); }
}

/* =========================================================
   Section rhythm
   ========================================================= */
section { padding: var(--space-6) 0; }
section.tight { padding: var(--space-5) 0; }
.section-head { max-width: 42em; margin-bottom: var(--space-4); }

.band-parchment-dk { background: var(--parchment-dk); }
.band-ink { background: var(--ink); color: var(--parchment); }
.band-ink h2, .band-ink h3 { color: var(--parchment); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 130px;
  gap: var(--space-1);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.gallery-grid a:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.gallery-grid a:nth-child(2) { grid-column: span 3; grid-row: span 1; }
.gallery-grid a:nth-child(3) { grid-column: span 3; grid-row: span 1; }
.gallery-grid a:nth-child(4) { grid-column: span 2; grid-row: span 1; }
.gallery-grid a:nth-child(5) { grid-column: span 2; grid-row: span 1; }
.gallery-grid a:nth-child(6) { grid-column: span 2; grid-row: span 1; }

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .gallery-grid a { grid-column: span 1 !important; grid-row: span 1 !important; }
}

/* About / two-col */
.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* Cards (lessons, team, docs) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}
.card {
  background: var(--parchment);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -16px rgba(32,36,28,0.3); }
.card .price {
  font-family: var(--font-mono);
  color: var(--saddle);
  font-size: 1.1rem;
  margin-top: var(--space-1);
}

/* Profile cards — Meet the Team (circular photo, centered text, no box) */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4) var(--space-3);
  justify-items: center;
}
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .profile-grid { grid-template-columns: 1fr; }
}
.profile-card {
  text-align: center;
  width: 100%;
  max-width: 230px;
}
.profile-photo-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 auto var(--space-2);
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.profile-photo-btn:hover { transform: scale(1.04); }
.profile-photo-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.profile-photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--hunter);
  display: block;
}
.profile-photo-empty {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px dashed var(--cream-line);
  margin: 0 auto var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--saddle);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-align: center;
  padding: 0 var(--space-1);
}
.profile-card h3 {
  font-size: 1.05rem;
  color: var(--hunter-dk);
  margin-bottom: 0.15em;
}
.profile-role {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: none;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 0.6em;
}
.profile-card p.bio {
  font-size: 0.85rem;
  color: #4b5040;
  line-height: 1.6;
  margin: 0;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: rgba(32,36,28,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-3);
}
.lightbox-overlay.open { display: flex; }
.lightbox-box {
  max-width: min(90vw, 640px);
  text-align: center;
}
.lightbox-box img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}
.lightbox-caption {
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: var(--space-2);
}
.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: 1px solid var(--parchment);
  color: var(--parchment);
  border-radius: var(--radius);
  padding: 0.4em 0.8em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cfd3c6;
  padding: var(--space-5) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: var(--space-4);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-footer h4 {
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5em; }
.site-footer a { text-decoration: none; color: #cfd3c6; }
.site-footer a:hover { color: var(--gold-lt); }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid #39402f;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.82rem;
  color: #8a9080;
}

/* Newsletter form */
.newsletter-form { display: flex; gap: 0.5em; max-width: 340px; }
.newsletter-form input {
  flex: 1;
  padding: 0.7em 0.9em;
  border-radius: var(--radius);
  border: 1px solid #454b3c;
  background: #2a2f24;
  color: var(--parchment);
  font-family: var(--font-body);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: var(--space-3); right: var(--space-3); bottom: var(--space-3);
  max-width: 560px;
  background: var(--ink);
  color: var(--parchment);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
  z-index: 100;
  font-size: 0.9rem;
}
.cookie-banner .actions { display: flex; gap: 0.6em; margin-top: var(--space-2); flex-wrap: wrap; }
.cookie-banner.hidden { display: none; }
