/* =====================================================================
   About Equine — Core stylesheet
   Design tokens, reset, base typography, layout primitives,
   header, navigation shell and footer.
   Pure CSS3. No framework. British English content.
   ===================================================================== */

/* ----------------------------------------------------------------- *
 * 1. Design tokens
 * ----------------------------------------------------------------- */
:root {
  /* Brand — primary */
  --forest:        #1e3a2c; /* deep forest green */
  --forest-deep:   #15271f;
  --forest-soft:   #2f5240;
  --charcoal:      #22262a; /* rich charcoal */
  --charcoal-soft: #343a3f;
  --ink:           #1a1d20;

  /* Brand — neutrals */
  --ivory:         #faf6ec; /* warm ivory */
  --ivory-soft:    #f2ecdd;
  --stone:         #d9d3c5; /* soft stone grey */
  --stone-light:   #e9e4d8;
  --stone-dark:    #b8b1a1;

  /* Accents (used sparingly) */
  --gold:          #c0a063; /* muted champagne gold */
  --gold-soft:     #d7c097;
  --bronze:        #9a6a3c; /* warm bronze */
  --sage:          #8fa393; /* subtle sage green */

  /* Functional text */
  --text:          #23282b;
  --text-muted:    #5d655f;
  --text-faint:    #878d85;
  --text-invert:   #f5f1e6;
  --line:          #ddd7c9;
  --line-strong:   #c7c0ae;

  /* Status */
  --sale:          #9a3b2e;
  --success:       #3f6b4e;

  /* Surfaces */
  --bg:            var(--ivory);
  --surface:       #fffdf7;
  --surface-alt:   var(--ivory-soft);

  /* Typography */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-hero:  clamp(2.6rem, 6vw, 4.75rem);
  --fs-h1:    clamp(2.1rem, 4.2vw, 3.3rem);
  --fs-h2:    clamp(1.65rem, 3vw, 2.4rem);
  --fs-h3:    clamp(1.25rem, 2vw, 1.55rem);
  --fs-h4:    1.125rem;
  --fs-body:  1.0625rem;
  --fs-small: 0.9375rem;
  --fs-tiny:  0.8125rem;

  --lh-tight: 1.1;
  --lh-snug:  1.3;
  --lh-body:  1.65;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Layout */
  --wrap:      1280px;
  --wrap-wide: 1480px;
  --wrap-text: 760px;
  --gutter:    clamp(1rem, 4vw, 2.75rem);

  /* Radii & shadow */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(21,39,31,.05), 0 4px 10px rgba(21,39,31,.05);
  --shadow-md: 0 2px 6px rgba(21,39,31,.05), 0 12px 28px rgba(21,39,31,.09);
  --shadow-lg: 0 8px 24px rgba(21,39,31,.10), 0 28px 60px rgba(21,39,31,.16);
  --shadow-glow: 0 10px 30px rgba(192,160,99,.28);

  /* Glass & glow (modern / futuristic layer) */
  --glass-bg: rgba(255,253,247,.72);
  --glass-bg-strong: rgba(255,253,247,.86);
  --glass-brd: rgba(255,255,255,.55);
  --glass-blur: 16px;
  --glass-dark: rgba(21,39,31,.42);
  --glass-dark-brd: rgba(216,193,150,.22);
  --gold-grad: linear-gradient(100deg, #e4cf9e 0%, #c0a063 45%, #9a6a3c 100%);
  --sheen: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: .3s;
  --dur-slow: .6s;

  --header-h: 112px;
}

/* ----------------------------------------------------------------- *
 * 2. Reset & base
 * ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
/* Inline icon SVGs carry only a viewBox; give them a safe default size so
   none can ever balloon. They are stroke-based (fill="none" stroke="currentColor"),
   so we must NOT force a fill here, or the outlines render as solid blobs.
   More specific rules below override per context. */
svg { width: 1.25em; height: 1.25em; flex: none; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--forest-soft);
  outline-offset: 2px;
  border-radius: 2px;
}

button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, select, textarea { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:target { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* ----------------------------------------------------------------- *
 * 3. Typography
 * ----------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--ink);
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.018em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-sans); font-weight: 650; letter-spacing: .01em; }

p { max-width: 72ch; }
.prose p + p { margin-top: var(--sp-4); }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-6); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: var(--sp-2); }
.prose a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--gold); }
.prose a:hover { text-decoration-color: var(--forest); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-tiny);
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze);
}
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 60ch; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }

/* ----------------------------------------------------------------- *
 * 4. Layout primitives
 * ----------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: var(--wrap-wide); }
.wrap--text { max-width: var(--wrap-text); }

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section--forest { background: var(--forest); color: var(--text-invert); }
.section--forest h1,.section--forest h2,.section--forest h3 { color: var(--text-invert); }
.section--charcoal { background: var(--charcoal); color: var(--text-invert); }
.section--charcoal h1,.section--charcoal h2,.section--charcoal h3 { color: var(--text-invert); }
.section--alt { background: var(--surface-alt); }
.section--stone { background: var(--stone-light); }

.section-head { max-width: 62ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); margin-top: var(--sp-3); }
.section--forest .section-head p,
.section--charcoal .section-head p { color: var(--stone); }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: var(--sp-6); }

.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: 2000;
  background: var(--forest); color: var(--text-invert);
  padding: .7rem 1.1rem; border-radius: var(--r-md); font-weight: 650;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ----------------------------------------------------------------- *
 * 5. Buttons & links
 * ----------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-sans); font-weight: 650; font-size: var(--fs-small);
  letter-spacing: .02em; line-height: 1;
  padding: .95rem 1.7rem; border-radius: var(--r-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease);
  text-align: center;
}
/* Sheen sweep on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--sheen); transform: translateX(-120%); transition: transform .6s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--forest); color: var(--text-invert); }
.btn--primary:hover { background: var(--forest-deep); box-shadow: var(--shadow-md); }
.btn--gold { background: var(--gold-grad); color: var(--forest-deep); background-size: 160% 100%; background-position: 0 0; }
.btn--gold:hover { background-position: 100% 0; box-shadow: var(--shadow-glow); }
.btn--outline { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn--outline:hover { background: var(--forest); color: var(--text-invert); box-shadow: var(--shadow-sm); }
.btn--ghost-invert { border-color: rgba(245,241,230,.5); color: var(--text-invert); }
.btn--ghost-invert:hover { background: var(--text-invert); color: var(--forest-deep); border-color: var(--text-invert); }
.btn--block { width: 100%; }
.btn--lg { padding: 1.1rem 2.1rem; font-size: 1rem; }
.btn--sm { padding: .6rem 1.1rem; font-size: var(--fs-tiny); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Animated underline link */
.link-underline {
  position: relative; font-weight: 600; color: var(--forest);
  display: inline-flex; align-items: center; gap: .4rem;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }
.link-underline svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease); }
.link-underline:hover svg { transform: translateX(3px); }

/* ----------------------------------------------------------------- *
 * 6. Announcement bar
 * ----------------------------------------------------------------- */
.announce {
  background: var(--forest-deep); color: var(--stone-light);
  font-size: var(--fs-tiny); letter-spacing: .04em;
}
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: var(--sp-5); min-height: 40px; text-align: center; }
.announce a { color: var(--gold-soft); font-weight: 600; }
.announce a:hover { color: #fff; }
.announce__item { display: inline-flex; align-items: center; gap: .5rem; }
.announce__item svg { width: 15px; height: 15px; color: var(--gold); }
.announce__sep { opacity: .4; }

/* ----------------------------------------------------------------- *
 * 7. Header
 * ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--gold-grad); opacity: .9;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); background: var(--glass-bg-strong); }
.site-header.is-scrolled .header-bar { min-height: 60px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--surface); }
}
.header-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: var(--sp-4); min-height: 72px; padding-block: .6rem;
  transition: min-height var(--dur) var(--ease);
}
.header-bar__left { display: flex; align-items: center; gap: var(--sp-4); }
.header-bar__right { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); }

.brand { display: inline-flex; align-items: center; gap: .55rem; justify-self: center; }
.brand__mark { height: 46px; width: auto; flex: none; transition: transform var(--dur) var(--ease-out); }
.brand:hover .brand__mark { transform: scale(1.04); }
.site-header.is-scrolled .brand__mark { height: 40px; }
/* On dark surfaces the green/gold emblem becomes a clean white silhouette */
.site-footer .brand__mark { filter: brightness(0) invert(1); opacity: .95; }
.brand__name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--forest-deep); letter-spacing: .01em; line-height: 1; }
.brand__name span { color: var(--gold); }
.brand__tag { display: block; font-family: var(--font-sans); font-size: .5rem; letter-spacing: .34em; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-pill); color: var(--charcoal);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--ivory-soft); color: var(--forest); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn__count {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--forest); color: #fff; font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; line-height: 1;
}
.icon-btn__count[hidden] { display: none; }

/* Primary nav (desktop) */
.primary-nav { display: none; }
@media (min-width: 1024px) {
  .primary-nav { display: block; border-top: 1px solid var(--line); }
  .primary-nav__list { display: flex; justify-content: center; gap: clamp(.5rem,1.8vw,1.75rem); list-style: none; padding: 0; }
  .primary-nav__link {
    display: inline-flex; align-items: center; gap: .3rem; padding: .95rem .2rem;
    font-family: var(--font-sans); font-size: .95rem; font-weight: 600; letter-spacing: .01em;
    color: var(--charcoal); position: relative;
  }
  .primary-nav__link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--gold); transform: scaleX(0); transition: transform var(--dur) var(--ease);
  }
  .primary-nav__item:hover .primary-nav__link,
  .primary-nav__item:focus-within .primary-nav__link { color: var(--forest); }
  .primary-nav__item:hover .primary-nav__link::after,
  .primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }
  .primary-nav__link--sale { color: var(--sale); }
  .primary-nav__link .chev { width: 13px; height: 13px; transition: transform var(--dur) var(--ease); }
  .primary-nav__item:hover .chev { transform: rotate(180deg); }
}

.header-search-desktop { display: none; }
@media (min-width: 1024px) {
  .header-search-desktop { display: flex; flex: 1; max-width: 300px; }
}

/* ----------------------------------------------------------------- *
 * 8. Footer
 * ----------------------------------------------------------------- */
.site-footer { position: relative; background: var(--forest-deep); color: var(--stone); font-size: var(--fs-small); }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,160,99,.7), transparent);
}
.site-footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 120% at 85% 0%, rgba(192,160,99,.10), transparent 60%);
}
.site-footer > * { position: relative; z-index: 1; }
.site-footer a { color: var(--stone); transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: clamp(1.5rem,3vw,2.5rem); padding-block: clamp(3rem,6vw,4.5rem); }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: var(--stone-dark); margin-top: var(--sp-4); max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: var(--fs-tiny); letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .65rem; }
.footer-contact { display: grid; gap: .6rem; margin-top: var(--sp-4); font-size: var(--fs-small); color: var(--stone-dark); }
.footer-contact a { color: var(--stone); }
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.footer-social a { display: inline-flex; width: 40px; height: 40px; border: 1px solid rgba(245,241,230,.2); border-radius: var(--r-pill); align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--forest-deep); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(245,241,230,.12); padding-block: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); align-items: center; justify-content: space-between; font-size: var(--fs-tiny); color: var(--stone-dark); }
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer-pay { display: flex; gap: .5rem; align-items: center; }
.footer-pay span { font-size: var(--fs-tiny); }
.footer-disclaimer { font-size: var(--fs-tiny); color: var(--stone-dark); opacity: .8; max-width: 70ch; }

/* ----------------------------------------------------------------- *
 * 9. Utilities
 * ----------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.flow-sm > * + * { margin-top: var(--sp-3); }

/* Fade-in on scroll (progressive, motion-safe) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- Modern / futuristic layer ---- */
/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--gold-grad); z-index: 1000; border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(192,160,99,.6); transition: width .1s linear; pointer-events: none;
}
/* Gradient text */
.text-gradient {
  background: linear-gradient(100deg, #fff 0%, #f0e2c0 55%, var(--gold-soft) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Aurora / mesh background for feature sections */
.has-aurora { position: relative; isolation: isolate; overflow: hidden; }
.has-aurora::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(143,163,147,.18), transparent 60%),
    radial-gradient(35% 45% at 85% 15%, rgba(192,160,99,.16), transparent 60%),
    radial-gradient(45% 55% at 75% 90%, rgba(47,82,64,.14), transparent 60%);
}
/* Fine grid overlay (subtle, decorative) */
.grid-overlay { position: relative; }
.grid-overlay::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(21,39,31,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,39,31,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
}
.hairline { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
