/* =====================================================================
   Stable Ground — brand stylesheet
   Animal-assisted & equine therapy for children with autism and ASN
   East Renfrewshire · Renfrewshire · North Ayrshire
   Palette: earthy green + warm brown + cream (per launch plan §8.2)
   ===================================================================== */

:root {
  --forest: #3f5137;
  --sage: #6b7f5e;
  --moss: #8a9a7b;
  --bark: #6f5844;
  --tan: #b98c63;
  --terracotta: #c26b4a;
  --sky: #9fbcc0;
  --cream: #f7f2e8;
  --sand: #efe6d4;
  --paper: #fffdf8;
  --ink: #2c2a26;
  --ink-soft: #514c43;
  --line: #e2d8c4;
  --ok: #4b7a52;

  --maxw: 1140px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(51, 43, 30, 0.10);
  --shadow-sm: 0 4px 14px rgba(51, 43, 30, 0.08);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--forest); line-height: 1.15; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-top: 0; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
a { color: var(--bark); text-decoration-color: var(--tan); text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }

/* ---- Accessibility helpers ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--forest); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 800;
  padding: 13px 26px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; font-size: 1rem; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: #ab5a3c; color: #fff; }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: #33422d; color: #fff; }
.btn-outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 242, 232, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--forest); line-height: 1; }
.brand-tag { display: block; font-family: var(--font-body); font-size: .72rem; color: var(--ink-soft); letter-spacing: .02em; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem;
  padding: 9px 12px; border-radius: 8px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--sand); color: var(--forest); }
.nav-links .btn { color: #fff; margin-left: 6px; }
.nav-links .btn:hover { color: #fff; }
.nav-toggle { display: none; background: var(--forest); color: #fff; border: 0; border-radius: 10px; padding: 10px 12px; font-size: 1.1rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 70px; right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; background: var(--paper);
    border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-links .btn { text-align: center; margin: 6px 0 0; }
}

/* ---- Hero ---- */
.hero { position: relative; }
.hero-media { position: relative; min-height: 560px; display: flex; align-items: center; }
.hero-media::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(35,44,30,.82) 0%, rgba(35,44,30,.55) 45%, rgba(35,44,30,.12) 100%);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-inner { position: relative; z-index: 2; color: #fff; max-width: 640px; padding: 60px 0; }
.hero-inner h1 { color: #fff; }
.hero-inner p { font-size: 1.2rem; color: #f4efe4; }
.eyebrow {
  display: inline-block; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4);
  padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .8rem; letter-spacing: .05em;
  text-transform: uppercase; margin-bottom: 18px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---- Sections ---- */
section { padding: 68px 0; }
.section-sand { background: var(--sand); }
.section-forest { background: var(--forest); color: #fff; }
.section-forest h1, .section-forest h2, .section-forest h3 { color: #fff; }
.section-cream { background: var(--cream); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 1.22rem; color: var(--ink-soft); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--terracotta); font-size: .82rem; margin-bottom: 10px; }

/* ---- Grid & cards ---- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card .ic { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.card-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-sm); }
.card-media img { width: 100%; height: 210px; object-fit: cover; }
.card-media .body { padding: 22px; }
.card-media .body h3 { margin: 0 0 8px; }

/* ---- Split feature ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.reverse .split-media { order: 0; } }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }

/* ---- Stat band ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .num { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3rem); color: var(--terracotta); font-weight: 700; line-height: 1; }
.section-forest .stat .num { color: #f0c9a6; }
.stat .lab { font-size: .98rem; margin-top: 8px; color: var(--ink-soft); }
.section-forest .stat .lab { color: #e7ecdf; }

/* ---- Ladder / steps ---- */
.ladder { counter-reset: step; display: grid; gap: 16px; }
.ladder li { list-style: none; display: flex; gap: 18px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.ladder li::before {
  counter-increment: step; content: counter(step);
  background: var(--forest); color: #fff; font-family: var(--font-head); font-weight: 700;
  width: 40px; height: 40px; min-width: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem;
}
.ladder li strong { color: var(--forest); }

/* ---- Callout ---- */
.callout { background: var(--paper); border-left: 5px solid var(--terracotta); border-radius: var(--radius-sm); padding: 22px 26px; box-shadow: var(--shadow-sm); }
.note { background: #fbf6e9; border: 1px dashed var(--tan); border-radius: var(--radius-sm); padding: 16px 20px; font-size: .96rem; color: var(--ink-soft); }
.pill { display: inline-block; background: var(--sand); color: var(--forest); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .82rem; margin: 0 4px 4px 0; }
.pill-open { background: #e2efdc; color: var(--ok); }
.pill-soon { background: #f6e6d6; color: var(--bark); }

/* ---- Forms ---- */
.form-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--forest); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sage); outline: none; box-shadow: 0 0 0 3px rgba(107,127,94,.18); }
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: .96rem; }
table.data th, table.data td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--forest); color: #fff; font-family: var(--font-body); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr:nth-child(even) td { background: #fbf8f1; }

/* ---- Sponsor tiers ---- */
.tier { text-align: center; }
.tier .price { font-family: var(--font-head); color: var(--terracotta); font-size: 2rem; font-weight: 700; }
.tier .per { font-size: .9rem; color: var(--ink-soft); }
.badge-featured { border: 2px solid var(--terracotta); position: relative; }
.badge-featured::after { content: "Most loved"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--terracotta); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; letter-spacing: .04em; }

/* ---- Breadcrumb / page hero ---- */
.page-hero { background: var(--forest); color: #fff; padding: 54px 0; }
.page-hero h1 { color: #fff; margin: 0 0 10px; }
.page-hero p { color: #e7ecdf; font-size: 1.15rem; margin: 0; max-width: 720px; }
.page-hero .eyebrow { margin-bottom: 14px; }

/* ---- Footer ---- */
.site-footer { background: #2b352400; }
.footer { background: var(--forest); color: #e7ecdf; padding: 56px 0 26px; }
.footer a { color: #fff; }
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 1.05rem; }
.footer .grid { gap: 30px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer .small { font-size: .86rem; color: #c9d3bd; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 34px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .84rem; color: #c9d3bd; }

/* ---- Utility ---- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1.4rem; }
.mb-0 { margin-bottom: 0; }
.tag-list { margin: 10px 0 0; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.list-clean li::before { content: "\2713"; position: absolute; left: 0; color: var(--sage); font-weight: 900; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.divider { height: 1px; background: var(--line); border: 0; margin: 40px 0; }
.anchor-offset { scroll-margin-top: 90px; }
