/* ==========================================================
   Fabled Flow — Liberty Horsemanship
   One stylesheet for every page. Colours & fonts live in :root.
   ========================================================== */

:root {
  --forest: #1f3a32;       /* deep eucalyptus */
  --moss: #3f6b55;         /* lush green */
  --sage: #9db8a2;         /* soft sage */
  --mist: #eef3ec;         /* pale morning mist */
  --cream: #faf7f0;        /* page background */
  --gold: #c9a45c;         /* warm gold accent */
  --dusk: #b8a6c9;         /* magical lilac */
  --ink: #23302b;          /* body text */
  --muted: #5d6e66;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Mulish", system-ui, sans-serif;

  --radius: 28px;
  --wrap: 1140px;
  --shadow: 0 18px 45px -20px rgba(31, 58, 50, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); }
a:hover { color: var(--forest); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--forest);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.2em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: .8rem;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s, box-shadow .4s;
}
.site-header.scrolled,
.site-header.solid {
  background: rgba(250, 247, 240, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px -12px rgba(0,0,0,.25);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo {
  font-family: var(--serif); font-size: 1.7rem; font-style: italic;
  text-decoration: none; color: #fff; letter-spacing: .02em;
}
.logo span { color: var(--gold); }
.scrolled .logo, .solid .logo { color: var(--forest); }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a.link {
  text-decoration: none; color: #fff; font-size: .9rem; letter-spacing: .08em;
  text-transform: uppercase; position: relative;
}
.scrolled .nav a.link, .solid .nav a.link { color: var(--forest); }
.nav a.link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width .35s;
}
.nav a.link:hover::after, .nav a.link[aria-current="page"]::after { width: 100%; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 26px; height: 2px; margin: 6px 0; background: #fff; transition: .3s; }
.scrolled .menu-btn span, .solid .menu-btn span { background: var(--forest); }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav ul {
    position: fixed; inset: 0; flex-direction: column; align-items: center; justify-content: center;
    gap: 30px; background: var(--forest); transform: translateX(100%); transition: transform .45s ease;
  }
  .nav ul.open { transform: none; }
  .nav a.link, .scrolled .nav a.link, .solid .nav a.link { color: var(--cream); font-size: 1.2rem; }
  .menu-btn { position: relative; z-index: 60; }
  .menu-btn.open span { background: var(--cream); }
  .menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-btn.open span:nth-child(2) { opacity: 0; }
  .menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: grid; place-items: center;
  color: #fff; text-align: center; overflow: hidden; isolation: isolate;
}
.hero.small { min-height: 62vh; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2; object-fit: cover; width: 100%; height: 100%;
  animation: drift 26s ease-in-out infinite alternate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(184,166,201,.35), transparent 55%),
    linear-gradient(180deg, rgba(20,40,34,.55) 0%, rgba(20,40,34,.35) 45%, rgba(20,40,34,.75) 100%);
}
.hero h1 { color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.hero p.lead { font-size: 1.2rem; max-width: 640px; margin: 0 auto 2rem; opacity: .95; }
.hero .eyebrow { color: #f1dca8; }
.hero-content { padding: 140px 16px 120px; }
@keyframes drift { from { transform: scale(1.05) translateY(0); } to { transform: scale(1.14) translateY(-2%); } }

/* Floating light motes — the "magic" */
.motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.motes i {
  position: absolute; bottom: -20px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff7d6 0%, rgba(255,240,190,.0) 70%);
  box-shadow: 0 0 12px 4px rgba(255, 236, 170, .55);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translate(40px, -105vh); opacity: 0; }
}

/* Flowing wave divider at the bottom of hero / sections */
.wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.wave svg { width: 100%; height: 90px; }
.wave path { fill: var(--cream); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 34px; border-radius: 999px; text-decoration: none;
  font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  background: var(--gold); color: var(--forest); transition: transform .3s, box-shadow .3s, background .3s;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--forest); background: #d8b872; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); margin-left: 10px; }
.btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn.green { background: var(--moss); color: #fff; }
.btn.green:hover { background: var(--forest); color: #fff; }

/* ---------- Sections ---------- */
section { padding: 100px 0; position: relative; }
.mist { background: linear-gradient(180deg, var(--cream), var(--mist) 30%, var(--mist) 70%, var(--cream)); }
.forest-bg { background: var(--forest); color: #e9efe9; }
.forest-bg h2, .forest-bg h3 { color: #fff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } .split.reverse > :first-child { order: 0; } }

/* Organic "blob" photo frames */
.blob {
  border-radius: 62% 38% 46% 54% / 48% 56% 44% 52%;
  overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1;
  animation: morph 14s ease-in-out infinite;
}
.blob img { width: 100%; height: 100%; object-fit: cover; }
@keyframes morph {
  0%,100% { border-radius: 62% 38% 46% 54% / 48% 56% 44% 52%; }
  50% { border-radius: 42% 58% 60% 40% / 58% 42% 58% 42%; }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 34px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.card:hover { transform: translateY(-8px); color: inherit; }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s; }
.card:hover .thumb img { transform: scale(1.07); }
.card .body { padding: 26px 28px 30px; }
.card h3 { font-size: 1.5rem; margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.card .meta { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; display: block; margin-bottom: 8px; }

/* Horse profile cards */
.horse { text-align: center; }
.horse .blob { max-width: 360px; margin: 0 auto 28px; }
.horse .tag { color: var(--gold); font-style: italic; font-family: var(--serif); font-size: 1.25rem; }

/* Values / pillars */
.pillar { text-align: center; padding: 10px 20px; }
.pillar .icon {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.8rem;
  background: radial-gradient(circle at 30% 30%, #fff, var(--mist)); box-shadow: 0 0 0 1px var(--sage), 0 0 30px rgba(201,164,92,.25);
}

/* Quote */
.quote {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.4; color: #fff; max-width: 820px; margin: 0 auto;
}
.quote cite { display: block; margin-top: 18px; font-size: 1rem; font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

/* ---------- Gallery (masonry) ---------- */
.gallery { columns: 3 260px; column-gap: 18px; }
.gallery figure { margin: 0 0 18px; break-inside: avoid; border-radius: 20px; overflow: hidden; position: relative; cursor: zoom-in; }
.gallery img { width: 100%; transition: transform .9s; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 30px 16px 12px; font-size: .85rem; color: #fff;
  background: linear-gradient(transparent, rgba(20,40,34,.8)); opacity: 0; transition: opacity .4s;
}
.gallery figure:hover figcaption { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,30,26,.92);
  display: none; place-items: center; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; border-radius: 14px; }
.lightbox p { color: #e9efe9; text-align: center; margin-top: 14px; }

/* ---------- Blog article ---------- */
.article { padding-top: 60px; }
.article p, .article li { font-size: 1.1rem; }
.article h2 { font-size: 2.1rem; margin-top: 1.6em; }
.article h3 { margin-top: 1.4em; }
.article figure { margin: 40px 0; }
.article figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.article figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 10px; font-style: italic; }
.article .intro { font-family: var(--serif); font-size: 1.55rem; line-height: 1.5; color: var(--forest); }
.article blockquote {
  margin: 40px 0; padding: 10px 0 10px 28px; border-left: 3px solid var(--gold);
  font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--forest);
}
.post-meta { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #f1dca8; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 30px; }
.breadcrumbs a { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0; padding: 0; list-style: none; }
.tags li { background: var(--mist); border-radius: 999px; padding: 6px 16px; font-size: .82rem !important; color: var(--moss); }
.faq details { background: #fff; border-radius: 16px; padding: 18px 24px; margin-bottom: 14px; box-shadow: 0 6px 20px -14px rgba(0,0,0,.3); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--forest); }
.faq details p { margin: 12px 0 0; }
.related { border-top: 1px solid #e3e8e2; margin-top: 70px; padding-top: 50px; }

/* ---------- Contact ---------- */
.social-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.social-links a {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 30px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--forest); font-weight: 700;
}
.social-links svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: #c9d6cd; padding: 80px 0 40px; position: relative; }
.site-footer .wave-top { position: absolute; top: -89px; left: 0; right: 0; line-height: 0; }
.site-footer .wave-top svg { width: 100%; height: 90px; }
.site-footer .wave-top path { fill: var(--forest); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--serif); font-size: 1.4rem; color: #fff; font-weight: 500; margin: 0 0 14px; }
.site-footer a { color: #c9d6cd; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; line-height: 2.1; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 50px; padding-top: 24px; font-size: .85rem; text-align: center; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
