/* =============================================================================
   FONT
   Marker Felt ships as a single weight (usWeightClass 500). The face is
   declared across the whole 400–800 range on purpose: that maps every weight
   the site asks for onto the one real file, so the browser never fakes a bold.
   Synthetic bold on a marker face smears the stroke ends and looks like a
   printing fault. Headings read as heavier through size, not weight.
   ========================================================================== */

@font-face {
  font-family: 'Marker Felt';
  src: url('../fonts/marker-felt.woff2') format('woff2'),
       url('../fonts/marker-felt.woff') format('woff'),
       url('../fonts/marker-felt.ttf') format('truetype');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* =============================================================================
   BASE — tokens, reset, typography, utilities
   Everything you might want to rebrand lives in :root. Nothing below :root
   hardcodes a colour, a font or a spacing value.
   ========================================================================== */

:root {
  /* ---- Colour ------------------------------------------------------------ */
  --red-400: #F0454C;   /* highlights, hover                                 */
  --red-600: #E8202A;   /* tomato red, the primary brand colour              */
  --red-700: #C20D16;   /* card bars, pressed states                         */
  --red-900: #7E060C;   /* deepest red, scrims and footer                    */

  --green: #33A02C;     /* the leaf in the logo, veg mark                    */
  --white: #FFFFFF;
  --sand: #F7F3EC;      /* page background, off-white so cards read as white */
  --sand-2: #EFE8DD;

  --ink-900: #231208;   /* warm near-black, headings                         */
  --ink-600: #5A4436;   /* body copy                                         */
  --ink-400: #8C7663;   /* captions, meta                                    */

  --cream: #FFF7EE;     /* type on red                                       */

  --bg: var(--sand);
  --fg: var(--ink-600);
  --fg-strong: var(--ink-900);
  --accent: var(--red-600);
  --line: color-mix(in srgb, var(--ink-900) 13%, transparent);
  --line-soft: color-mix(in srgb, var(--ink-900) 7%, transparent);
  --selection: color-mix(in srgb, var(--red-400) 35%, transparent);

  /* ---- Gradients ---------------------------------------------------------
     Named so a section can reference intent, not a colour recipe. */
  --grad-page: linear-gradient(180deg, var(--sand) 0%, var(--sand-2) 100%);
  --grad-dark: linear-gradient(180deg, #A00A11 0%, var(--red-900) 100%);
  --grad-accent: linear-gradient(135deg, var(--red-600) 0%, var(--red-700) 100%);

  /* Video overlay: dark enough at top and bottom to carry type, clear in the
     middle so the footage still reads. */
  --grad-scrim: linear-gradient(180deg,
                  rgba(45, 3, 6, 0.62) 0%,
                  rgba(45, 3, 6, 0.28) 38%,
                  rgba(45, 3, 6, 0.34) 62%,
                  rgba(45, 3, 6, 0.80) 100%);
  --grad-glow: radial-gradient(50% 50% at 50% 50%,
                  color-mix(in srgb, var(--red-400) 45%, transparent) 0%,
                  transparent 70%);
  --grad-card: linear-gradient(180deg, var(--white) 0%, #FBF7F1 100%);
  --grad-sheen: linear-gradient(100deg, transparent 25%, rgba(255,255,255,0.55) 50%, transparent 75%);
  --grad-fade-down: linear-gradient(180deg, transparent 0%, var(--sand) 100%);
  --grad-fade-up: linear-gradient(0deg, transparent 0%, var(--sand) 100%);
  --grad-hairline: linear-gradient(90deg, transparent, var(--line), transparent);

  /* ---- Type -------------------------------------------------------------- */
  --font-display: 'Marker Felt', 'Comic Sans MS', 'Trebuchet MS', cursive;
  --font-body: 'Marker Felt', 'Comic Sans MS', system-ui, -apple-system, sans-serif;
  /* Swap --font-body back to a sans stack if long copy or small legal text
     ever needs to be more readable than it is on-brand. */
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  /* Fluid scale: mobile floor → desktop ceiling, no breakpoint jumps */
  --fs-xs: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --fs-sm: clamp(0.84rem, 0.81rem + 0.15vw, 0.94rem);
  --fs-base: clamp(1rem, 0.96rem + 0.20vw, 1.10rem);
  --fs-lg: clamp(1.18rem, 1.10rem + 0.40vw, 1.42rem);
  --fs-xl: clamp(1.55rem, 1.35rem + 0.95vw, 2.35rem);
  --fs-2xl: clamp(2.10rem, 1.70rem + 1.95vw, 3.75rem);
  --fs-3xl: clamp(2.80rem, 2.05rem + 3.60vw, 6.00rem);

  --lh-tight: 1.04;
  --lh-snug: 1.22;
  --lh-body: 1.62;
  --tracking-wide: 0.16em;

  /* ---- Space ------------------------------------------------------------- */
  --sp-2xs: 0.375rem;
  --sp-xs: 0.75rem;
  --sp-sm: 1.125rem;
  --sp-md: 1.75rem;
  --sp-lg: 2.75rem;
  --sp-xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  --sp-2xl: clamp(5rem, 3.2rem + 8vw, 11rem);

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --container: 78rem;
  --container-narrow: 46rem;

  /* ---- Form -------------------------------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(35, 18, 8, 0.06);
  --shadow-md: 0 14px 32px -16px rgba(35, 18, 8, 0.32);
  --shadow-lg: 0 34px 60px -28px rgba(35, 18, 8, 0.38);

  /* ---- Motion ------------------------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur-mid: 380ms;
  --dur-slow: 720ms;

  --z-atmosphere: 0;
  --z-content: 1;
  --z-header: 60;
  --z-menu: 70;

  --header-h: 4rem;
}

@media (min-width: 62em) {
  :root { --header-h: 5.25rem; }
}

/* Dark sections opt in by setting these on themselves — see .u-dark */

/* =============================================================================
   RESET
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis owns scrolling; native smooth would fight it */
}

body {
  min-height: 100svh;
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

p, h1, h2, h3, h4, li, figcaption { overflow-wrap: break-word; }

::selection { background: var(--selection); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Locks the page while the mobile menu is open. Lenis is stopped in JS too. */
body.is-locked { overflow: hidden; }

/* =============================================================================
   TYPOGRAPHY
   ========================================================================== */

.display,
.heading,
.subheading {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--fg-strong);
  letter-spacing: -0.01em;
}

.display {
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
}

.heading {
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
}

.subheading {
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
}

.lead {
  font-size: var(--fs-lg);
  font-weight: 300;
  line-height: 1.5;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-400);
}

.caption {
  font-size: var(--fs-sm);
  color: var(--ink-400);
}

/* Second line of a headline, lighter than the display weight */
.hand-accent {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
}

/* =============================================================================
   BUTTONS
   ========================================================================== */

.btn {
  --btn-bg: var(--red-600);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2xs);
  min-height: 2.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--accent { --btn-bg: var(--accent); }

/* Primary CTA over the video */
.btn--solid {
  --btn-bg: var(--white);
  --btn-fg: var(--red-700);
  font-weight: 700;
  box-shadow: 0 12px 28px -14px rgba(45, 3, 6, 0.8);
}

.btn--solid:hover { --btn-bg: var(--cream); }

/* Secondary CTA on red */
.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  border: 1.5px solid color-mix(in srgb, var(--cream) 45%, transparent);
}

.btn--outline-light:hover {
  border-color: var(--cream);
  --btn-bg: color-mix(in srgb, var(--cream) 12%, transparent);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg-strong);
  border: 1px solid var(--line);
}

.btn--sm {
  min-height: 2.375rem;
  padding: 0.5rem 1.125rem;
  font-size: var(--fs-xs);
}

/* =============================================================================
   UTILITIES
   ========================================================================== */

.u-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.u-measure { max-width: 38ch; }
.u-measure-wide { max-width: 58ch; }
.u-center { margin-inline: auto; }
.u-text-center { text-align: center; }

/* Offset anchor targets so the fixed header never covers them */
.u-anchor {
  display: block;
  position: relative;
  top: calc(var(--header-h) * -1);
}

/* Flip a block to the dark palette */
.u-dark {
  --bg: var(--red-900);
  --fg: color-mix(in srgb, var(--cream) 80%, transparent);
  --fg-strong: var(--cream);
  --ink-400: color-mix(in srgb, var(--cream) 60%, transparent);
  --line: color-mix(in srgb, var(--cream) 20%, transparent);
  background: var(--grad-dark);
  color: var(--fg);
}

.skip-link {
  position: fixed;
  top: var(--sp-xs);
  left: var(--sp-xs);
  z-index: 100;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--cream);
  font-size: var(--fs-sm);
  transform: translateY(-160%);
  transition: transform var(--dur-mid) var(--ease-out);
}

.skip-link:focus-visible { transform: translateY(0); }

/* =============================================================================
   REDUCED MOTION
   JS also reads this and skips scrub/float entirely — see animations.js
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-anim] { opacity: 1 !important; transform: none !important; }
}