/* ===========================
   WILTON PARK — MAIN STYLES
   =========================== */

/* ---------------------------
   COLOUR VARIABLES (Heritage)
---------------------------- */
:root{
  --bg:#f3f2ec;          /* page background (light cream-olive) */
  --surface:#edeadf;     /* section panels */
  --brand:#6c7a42;       /* main olive-green accent */
  --brand-ink:#283016;   /* dark olive text */
  --accent:#8c9859;      /* secondary green-gray */
  --accent2:#c6a356;     /* warm brass/gold for hovers */
  --text:#2e3320;        /* body text */
  --muted:#636a45;       /* muted subtext */
  --line:#d2d0c2;        /* soft divider */
  --tap:44px;            /* min tap target */
}

/* ---------------------------
   GLOBAL / TYPOGRAPHY
---------------------------- */
*{ box-sizing:border-box }
html,body{
  margin:0; padding:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
a{ color:var(--brand-ink); text-decoration:none }
a:hover{ color:var(--accent2) }
.container{ max-width:1100px; margin:0 auto; padding:0 20px }

/* ---------------------------
   HEADER / NAV
---------------------------- */
.header{
  position:sticky; top:0; z-index:10;
  background:rgba(255,255,255,.65);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0; gap:12px;
}
.logo{ font-weight:800; letter-spacing:.5px; color:var(--brand-ink) }
.nav a{
  margin-left:12px; font-weight:600;
  color:var(--brand-ink);
}
.nav a:hover{ color:var(--accent2) }

/* ---------------------------
   BUTTONS
---------------------------- */
.btn{
  display:inline-block;
  padding:12px 18px;
  border-radius:10px;
  border:1px solid var(--brand);
  background:var(--brand);
  color:#fff; font-weight:700;
  min-height:var(--tap);
  transition:background .2s ease, transform .15s ease;
}
.btn.primary{
  background:linear-gradient(135deg,var(--brand),#8b965a);
  border-color:var(--brand);
}
.btn:hover{ background:linear-gradient(135deg,#5f6b3a,#727f4a); transform:translateY(-1px) }
.cta{ display:flex; gap:12px; flex-wrap:wrap }

/* Petition button in header */
.petition-btn{
  margin-left:16px;
  padding:10px 18px; border-radius:10px; font-weight:700;
  border:1px solid #146c43;
  background:linear-gradient(135deg,#3ea072,#146c43);
  color:#fff;
  transition:background .2s ease, transform .15s ease;
}
.petition-btn:hover{ background:linear-gradient(135deg,#2c805a,#0f5235); transform:translateY(-1px) }
@media (max-width:800px){ .petition-btn{ display:none } }

/* ---------------------------
   SECTIONS / LAYOUT
---------------------------- */
.section{ padding:64px 0; border-top:1px solid var(--line); background:var(--surface) }
.section.alt{ background:#f8f7f2 }
.section h2{ font-size:clamp(24px,3.5vw,36px); margin:0 0 12px }
.kicker{
  letter-spacing:.08em; text-transform:uppercase;
  color:var(--brand); font-size:12px; margin-bottom:8px;
}

/* Footer */
footer{
  padding:40px 0; background:#eae7dc; border-top:1px solid var(--line);
  color:var(--brand-ink); font-size:15px; line-height:1.6;
}
footer .footer-section{ margin-bottom:18px }
footer .footer-section.socials a{
  text-decoration:none; color:var(--brand); font-weight:600;
}
footer .footer-section.socials a:hover{ color:var(--accent2) }
footer .footer-section.socials i{ margin-right:6px; color:var(--brand) }
footer .footer-section.socials a:hover i{ color:var(--accent2) }

/* Contact line in footer + copy UI */
footer .footer-section.contact{ margin-top:6px; font-weight:500 }
.copy-btn{
  margin-left:6px; background:none; border:none; cursor:pointer;
  color:var(--brand); font-size:15px; vertical-align:middle;
  transition:color .25s ease, transform .1s ease;
}
.copy-btn:hover{ color:var(--accent2); transform:scale(1.1) }
.copy-btn.copied{ color:var(--accent2); transform:scale(1.15); text-shadow:0 0 6px rgba(198,163,86,.6) }
.copy-msg{ margin-left:8px; font-size:14px; color:var(--accent2); font-weight:600 }

/* ---------------------------
   GRID
---------------------------- */
.grid{ display:grid; gap:24px }
.grid.cols-2{ grid-template-columns:repeat(2,minmax(0,1fr)) }
.grid.cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)) }
@media (max-width:900px){
  .grid.cols-2,.grid.cols-3{ grid-template-columns:1fr }
}

/* ---------------------------
   CARDS / TEXT ELEMENTS
---------------------------- */
.card{
  background:#fff; color:var(--brand-ink);
  border:1px solid #e6e3d7; border-radius:14px; padding:20px;
  box-shadow:0 4px 12px rgba(0,0,0,.04);
}
.card img{ display:block; width:100%; height:auto; border-radius:10px; object-fit:cover }
.card h3{ color:var(--brand-ink) }
.card p{ color:var(--text) }

blockquote{
  border-left:4px solid var(--brand);
  padding:10px 16px; margin:0;
  color:var(--brand-ink);
  background:rgba(255,255,255,.6);
  border-radius:8px;
}
.small{ color:#5b6040; font-size:14px }

/* Impact quote (Heritage) */
.impact-quote{
  background:rgba(255,255,255,.84);
  border-left:6px solid var(--brand);
  padding:28px 24px; border-radius:14px;
  font-size:20px; line-height:1.5; color:var(--brand-ink); font-weight:600;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  margin:20px 0 0;
}
.impact-quote footer{ margin-top:12px; font-size:15px; color:#6b7150; text-align:right }
/* Centered variant */
.impact-quote.centered{
  text-align:center; max-width:800px; margin:60px auto;
  background:rgba(255,255,255,.85);
  border-left:none; border-top:5px solid var(--brand); border-bottom:5px solid var(--brand);
  border-radius:16px; font-size:22px; line-height:1.6; font-style:italic;
  box-shadow:0 10px 25px rgba(0,0,0,.08); padding:40px 32px;
}
.impact-quote.centered footer{
  margin-top:20px; font-size:16px; font-style:normal; color:#5b6040; text-align:center; font-weight:600;
}

/* ---------------------------
   LISTS / TIMELINE
---------------------------- */
.list{ padding-left:18px }
.timeline{ border-left:2px solid #c7c3ad; margin-left:10px; padding-left:16px }
.timeline .item{ margin:12px 0 }

/* ---------------------------
   FIGURES / GALLERY
---------------------------- */
figure{ margin:0 }
figcaption{ font-size:12px; color:#666d4c; margin-top:6px }

/* ---------------------------
   HERO (photo background)
---------------------------- */
.hero{
  position:relative; overflow:hidden;
  padding:120px 0 96px;
  color:var(--brand-ink);
  background:
    linear-gradient(160deg, rgba(245,241,225,.78), rgba(230,225,200,.60) 70%),
    url('/assets/img/in-front-of-stable.png') center/cover no-repeat;
}
.hero h1{ font-size:clamp(36px,5vw,60px); line-height:1.1; margin:0 0 20px }
.hero p.lead{ font-size:clamp(17px,2.2vw,21px); color:#3d4324; max-width:850px; margin:0 0 28px }
.badges .badge{
  background:#e5e1cf; border:1px solid #cfc8a7; color:#2f3418;
  padding:8px 12px; border-radius:999px; font-size:13px;
}
.hero-ornament{ display:none }

/* ---------------------------
   PHOTO-BACKED SECTIONS
---------------------------- */
/* Vision (Map) */
.section.map{
  position:relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.70), rgba(245,243,234,.75)),
    url('/assets/img/1873-map.png') center/cover no-repeat;
}
.section.map .card{
  background:rgba(255,255,255,.86);
  border-color:#e6e3d7;
}

/* Story (From Stud Farm...) */
.story-bg{
  background:
    linear-gradient(to bottom right, rgba(255,255,255,.70), rgba(245,244,234,.72)),
    url('/assets/img/the-wilton-park-stud.png') center/cover no-repeat fixed;
  color:var(--brand-ink);
}
.story-bg .card{
  background:rgba(255,255,255,.88);
  border-color:#e6e3d7;
}
@media (max-width:900px){ .story-bg{ background-attachment:scroll } }

/* Heritage (Stables Today) */
#heritage{
  background:
    linear-gradient(to bottom, rgba(255,255,255,.70), rgba(245,243,234,.78)),
    url('/assets/img/stables-today.png') center/cover no-repeat fixed;
  color:var(--brand-ink);
}
#heritage .card{
  background:rgba(255,255,255,.88);
  border-color:#e6e3d7;
}
#heritage blockquote{ background:rgba(255,255,255,.85); border-left-color:var(--brand) }
@media (max-width:900px){ #heritage{ background-attachment:scroll } }

/* Get Involved (Stables 8–12) */
.involved-bg{
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(245,243,234,.88)),
    url('/assets/img/stables-8-12.png') center/cover no-repeat fixed;
  color:var(--brand-ink);
}
.involved-bg .card{
  background:rgba(255,255,255,.92);
  border-color:#e6e3d7;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
@media (max-width:900px){ .involved-bg{ background-attachment:scroll } }

/* Gallery (Sydney Mail 1898) */
.gallery-bg{
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(248,246,236,.90)),
    url('/assets/img/sydney-mail-article-may-1898.png') center/cover no-repeat fixed;
  color:var(--brand-ink);
}
.gallery-bg .card{
  background:#fff; border-color:#e6e3d7;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
}
@media (max-width:900px){ .gallery-bg{ background-attachment:scroll } }

/* ---------------------------
   LIGHTBOX (single, tidy)
---------------------------- */
#lightbox{
  position:fixed; inset:0; display:none;
  align-items:center; justify-content:center;
  background:rgba(0,0,0,.86); z-index:1000; padding:24px;
}
#lightbox.open{ display:flex }
#lightbox img{
  max-width:min(1200px,92vw); max-height:82vh;
  border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.6); display:block;
}
#lightbox .close{
  position:absolute; top:14px; right:18px;
  font-size:28px; color:#fff; cursor:pointer; user-select:none;
}
#lightbox .caption{
  max-width:min(1200px,92vw); margin-top:12px;
  color:#eef3fb; background:rgba(20,28,40,.75);
  border:1px solid rgba(255,255,255,.15);
  padding:10px 14px; border-radius:10px; font-size:14px; line-height:1.35; text-align:center;
}

/* ---------------------------
   ICONS (Font Awesome)
---------------------------- */
.fa-brands,.fa-solid{
  margin-right:6px; font-size:16px; vertical-align:-1px;
  color:var(--brand); transition:color .2s ease;
}
a:hover .fa-brands, a:hover .fa-solid{ color:var(--accent2) }

/* ---------------------------
   LIST LINKS (Get Involved)
---------------------------- */
.list a{ color:var(--brand-ink); font-weight:700 }
.list a:hover, .list a:hover i{ color:var(--accent2) }

/* ---------------------------
   RESPONSIVE POLISH
---------------------------- */
@media (max-width:600px){
  .nav{ flex-wrap:wrap; gap:10px; padding:10px 0 }
  .logo{ font-size:18px }
  .nav a{ margin-left:10px; font-size:14px }

  .hero{ padding:80px 0 58px }
  .hero h1{ font-size:clamp(28px,8vw,36px) }
  .hero p.lead{ font-size:15px; max-width:100% }

  .section{ padding:48px 0 }
  .card{ padding:16px; border-radius:12px }
  .btn{ padding:12px 16px; border-radius:10px; font-size:15px }

  .list{ padding-left:16px }
  .timeline{ margin-left:6px; padding-left:12px }

  .grid.cols-3{ grid-template-columns:1fr; gap:16px }
  figure img{ width:100%; height:auto; border-radius:12px }

  .impact-quote.centered{
    margin:40px auto; font-size:19px; line-height:1.55; padding:28px 22px;
  }
}

@media (prefers-reduced-motion:reduce){
  *{ scroll-behavior:auto !important }
  .btn{ transition:none }
}

/* ---------------------------
   CONCEPTS & STORIES
---------------------------- */
/* Concepts hero */
.concepts-hero{
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(245,243,234,.9)),
    url('/assets/img/stables-today.png') center/cover no-repeat fixed;
  color:var(--brand-ink);
}
@media (max-width:900px){ .concepts-hero{ background-attachment:scroll } }
.concepts-hero .container p{ max-width:780px }

/* Concepts grid (uniform desktop thumbnails) */
.concepts-grid figure.card{
  display:flex; flex-direction:column; padding:0; overflow:hidden;
  background:#fff; border:1px solid #e6e3d7; border-radius:14px;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
}
.concepts-grid figure.card img{
  width:100%; aspect-ratio:16/9; object-fit:cover; display:block;
  transition:transform .25s ease;
}
.concepts-grid figure.card:hover img{ transform:scale(1.02) }
.concepts-grid figure.card figcaption{
  padding:12px 14px; background:#fff; border-top:1px solid #e6e3d7;
  color:var(--brand-ink); font-size:14px; line-height:1.35;
}
@media (max-width:900px){
  .concepts-grid figure.card img{ aspect-ratio:auto; object-fit:contain }
}

/* Story article hero & body */
.story-article-hero{
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(245,243,234,.92)),
    url('/assets/img/stables-today.png') center/cover no-repeat fixed;
  color:var(--brand-ink);
}
@media (max-width:900px){ .story-article-hero{ background-attachment:scroll } }
.longform{ max-width:760px }
.longform .lede{
  font-size:20px; line-height:1.6; color:var(--brand-ink);
  background:rgba(255,255,255,.75); padding:14px 16px; border-radius:8px;
}
.longform h2{ margin-top:28px; color:var(--brand) }
.longform p{ line-height:1.7 }
.longform blockquote{ margin:18px 0 }

/* STORIES GRID (equal height) */
.stories-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
  gap:32px; align-items:stretch;
}
.stories-grid .card{
  display:flex; flex-direction:column; justify-content:space-between;
  background:#f7f5ed; border:1px solid #d6d3c4; border-radius:14px; padding:20px;
  transition:transform .2s ease, box-shadow .2s ease;
}
.stories-grid .card:hover{ transform:translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,.12) }
.stories-grid .card img{
  border-radius:10px; width:100%; height:180px; object-fit:cover; margin-bottom:14px;
}
.stories-grid .card .btn{ margin-top:auto; align-self:flex-start }
/* Vision teaser link under the Vision section heading */
.subtle-link {
  margin: 4px 0 14px;
}
.subtle-link a {
  font-weight: 700;
  color: var(--brand-ink);
  border-bottom: 2px solid rgba(198,163,86,.35);
  padding-bottom: 2px;
}
.subtle-link a:hover {
  color: var(--accent2);
  border-bottom-color: var(--accent2);
}
.subtle-link span { white-space: nowrap; }
#gallery img { min-height: 160px; background:#f4f1e6; display:block }
#gallery img::before { content:""; }
/* ---------------------------
   CONTACT FORM (Light Theme)
---------------------------- */
form.card input,
form.card textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-ink);
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05) inset;
  transition: border-color .2s ease, box-shadow .2s ease;
}

form.card input:focus,
form.card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140,152,89,.25);
}

form.card button[type="submit"] {
  margin-top: 8px;
}
