/* =====================================================
   The Horse and Hound — Design tokens
   Architecture mirrors the Fox at Walton (tokens.css);
   palette and typography are Horse brand. Never hardcode
   colours/spacing in templates — consume these tokens.
   ===================================================== */

/* ---------- Self-hosted fonts (latin subsets) ---------- */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/plex-serif-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/plex-serif-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/raleway-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/raleway-600.woff2') format('woff2');
}

:root {
  /* ---------- Palette ---------- */
  /* Papers (page surfaces, alt sections) */
  --c-paper:        #F6F7F9;   /* default page surface — cool paper */
  --c-paper-warm:   #F6F4EF;   /* warm stone — Sunday/Christmas alt sections */
  --c-paper-deep:   #E9EDF2;   /* deeper alt, dividers on paper */
  --c-pure:         #FCFCFD;   /* near-white for photo-led sections */

  /* Inks (text, dark surfaces) */
  --c-ink:          #0F172A;   /* headings, dark CTA band bg */
  --c-text:         #364151;   /* primary body text */
  --c-ink-soft:     #526272;   /* brand slate — secondary text, quiet UI.
                                  AA large-text only on paper: never body copy */
  --c-ink-mute:     #7B8794;   /* captions, tertiary */
  --c-hairline:     #D1DAE5;   /* hairline rules on paper */
  --c-rule:         #E5E9EF;   /* hairline rules on white */

  /* Brand accent */
  --c-navy:         #16365d;   /* primary CTA, brand accent */
  --c-navy-deep:    #0F2746;   /* hover, pressed */
  --c-navy-mute:    rgba(22, 54, 93, 0.10); /* tag/badge backgrounds */
  --c-slate:        #526272;   /* secondary accent (eyebrow ticks, icons) */

  /* States */
  --c-focus:        var(--c-navy);
  --c-error:        #B14747;

  /* ---------- Typography ---------- */
  --font-display: 'IBM Plex Serif', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-label:   'Raleway', 'Inter', system-ui, sans-serif; /* eyebrows, labels */

  /* Type scale — fluid via clamp() */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-md:    1.0625rem;
  --text-lg:    clamp(1.125rem, 0.95rem + 0.4vw, 1.25rem);
  --text-xl:    clamp(1.25rem, 1rem + 0.8vw, 1.5rem);
  --text-2xl:   clamp(1.5rem, 1.1rem + 1.3vw, 2rem);
  --text-3xl:   clamp(2rem, 1.4rem + 2vw, 2.75rem);
  --text-4xl:   clamp(2.5rem, 1.6rem + 3vw, 3.75rem);
  --text-5xl:   clamp(3rem, 1.6rem + 5vw, 5rem);
  /* Plex Serif runs wider than DM Serif Display — hero capped at 6rem */
  --text-hero:  clamp(3rem, 1.4rem + 6vw, 6rem);

  /* Line heights */
  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-base:    1.6;
  --lh-loose:   1.75;

  /* Letter spacing */
  --tracking-tight:   -0.015em;
  --tracking-normal:  0;
  --tracking-wide:    0.08em;
  --tracking-eyebrow: 0.22em;

  /* ---------- Spacing ---------- */
  --s-1:   0.25rem;
  --s-2:   0.5rem;
  --s-3:   0.75rem;
  --s-4:   1rem;
  --s-5:   1.25rem;
  --s-6:   1.5rem;
  --s-8:   2rem;
  --s-10:  2.5rem;
  --s-12:  3rem;
  --s-16:  4rem;
  --s-20:  5rem;
  --s-24:  6rem;
  --s-32:  8rem;

  /* Section rhythm */
  --s-section:        clamp(3rem, 6.5vw, 5rem);
  --s-section-tight:  clamp(2rem, 4vw, 3rem);
  --s-section-loose:  clamp(4rem, 8.5vw, 6.5rem);

  /* ---------- Containers ---------- */
  --container-narrow: 760px;
  --container:        1200px;
  --container-wide:   1440px;
  --gutter:           clamp(1.25rem, 4vw, 2.5rem);

  /* ---------- Radii ---------- */
  --r-xs:    2px;
  --r-sm:    4px;
  --r:       6px;
  --r-md:    8px;
  --r-lg:    12px;
  --r-pill:  9999px;

  /* ---------- Shadows (Horse ink #0F172A) ---------- */
  --shadow-rise:        0 12px 28px -18px rgba(15, 23, 42, 0.22);
  --shadow-rise-hover:  0 22px 44px -22px rgba(15, 23, 42, 0.30);
  --shadow-card:        0 18px 40px -24px rgba(15, 23, 42, 0.25);
  --shadow-photo:       0 30px 60px -25px rgba(15, 23, 42, 0.35);
  --shadow-pinned:      0 1px 0 0 var(--c-rule);

  /* ---------- Motion ---------- */
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart:  cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-soft:       cubic-bezier(0.33, 1, 0.68, 1);

  --dur-fast:     180ms;
  --dur:          320ms;
  --dur-slow:     600ms;
  --dur-reveal:   600ms;
  --dur-photo:    1200ms;

  /* ---------- Z-index scale ---------- */
  --z-base:      1;
  --z-rise:      10;
  --z-overlay:   20;
  --z-nav:       50;
  --z-modal:     100;
}

/* ---------- Honour reduced motion globally ---------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast:   0.01ms;
    --dur:        0.01ms;
    --dur-slow:   0.01ms;
    --dur-reveal: 0.01ms;
    --dur-photo:  0.01ms;
  }
}
