/* Biomes Adventures design tokens.
   The single source of colour, type, spacing and motion values for the public site
   and the CRM. Components read these variables; nothing else hardcodes a colour.
   Contrast (WCAG 2.2) is verified by apps/core/tests/test_design_system.py. */

/* Cascade layers, in order of priority (later wins, whatever the selector's weight):
   tokens < base < components < layout < pages < utilities. Declared here because
   tokens.css is the first stylesheet on every page. */
@layer tokens, base, components, layout, pages, utilities;

@layer tokens {

@font-face {
  font-family: "Fraunces";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("../fonts/fraunces-latin-400-normal.15ccd91d7a8f.woff2") format("woff2");
}
/* Italic carries the accent line of section headings ("Kenya and beyond, <em>planned here</em>"). */
@font-face {
  font-family: "Fraunces";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("../fonts/fraunces-latin-400-italic.b02d32cd59dc.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("../fonts/hanken-grotesk-latin-400-normal.78c2be80e151.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("../fonts/hanken-grotesk-latin-600-normal.0c156079a0be.woff2") format("woff2");
}

:root {
  /* ---- colour: brand ---- */
  --color-primary: #18452e;        /* deep forest green */
  --color-primary-dark: #0f2d1e;
  --color-night: #0b1f15;          /* darkest surface: footer, drawer, overlays */
  --color-secondary: #56633a;      /* olive */
  --color-sage: #566650;           /* muted green: accent text, icons */
  --color-sage-tint: #e6eadf;      /* muted green surface */
  --color-accent: #d6a24a;         /* restrained ochre: fills and text on dark surfaces only */
  --color-accent-hover: #e2b462;
  --color-accent-text: #7f5418;    /* ochre-family text on light surfaces */
  --color-accent-tint: #f6ead3;    /* ochre surface behind accent-text labels */
  --color-earth: #6b4a2f;          /* earthy brown */
  --color-sand: #e9dfcb;
  --color-sand-light: #f2ebdd;

  /* ---- colour: surfaces and text ---- */
  --color-background: #f8f4ec;     /* warm ivory */
  --color-surface: #fffdf9;
  --color-text: #1c2420;           /* charcoal */
  --color-muted: #545c55;
  --color-placeholder: #6c736c;    /* form placeholders (4.5:1 on surface) */
  --color-border: #ddd4c2;
  --color-border-strong: #8a8f86;  /* form controls: 3:1 against surfaces */
  --color-on-dark: #fffdf9;
  --color-on-dark-soft: #e6eee8;   /* body text over photographs */
  --color-on-dark-muted: #b9c7bd;
  /* Colour channels for see-through shades: rgb(var(--rgb-night) / 0.6). Each overlay
     keeps its own opacity; only the colour is shared. */
  --rgb-night: 11 31 21;           /* = --color-night */
  --rgb-night-deep: 8 24 16;       /* deeper green-black for photo overlays */
  --rgb-on-dark: 255 253 249;      /* = --color-on-dark */
  --rgb-white: 255 255 255;
  --color-line-on-dark: rgb(var(--rgb-white) / 0.14);
  --color-scrim: rgb(var(--rgb-night) / 0.62); /* text over photographs */

  /* ---- colour: feedback ---- */
  --color-success: #2c6b46;
  --color-success-bg: #e5efe7;
  --color-error: #a4261c;
  --color-error-bg: #fbecea;
  --color-focus: #d6a24a;
  --focus-glow: 0 0 0 3px rgb(229 159 31 / 0.55); /* soft ring around focused fields */

  /* ---- typography ---- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale (360px to 1440px viewport). */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --text-2xl: clamp(1.875rem, 1.5rem + 1.6vw, 3rem);
  --text-3xl: clamp(2.25rem, 1.7rem + 2.5vw, 4rem);
  --text-4xl: clamp(2.75rem, 1.9rem + 4.2vw, 6rem);

  --leading-tight: 1.08;
  --leading-snug: 1.3;
  --leading-body: 1.65;
  --tracking-label: 0.16em;        /* uppercase eyebrows and labels */

  /* ---- spacing ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);

  /* ---- layout ---- */
  --container-max: 1320px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --container: min(var(--container-max), 100% - 2 * var(--gutter));
  --container-narrow: min(46rem, 100% - 2 * var(--gutter));
  --header-height: 76px;           /* main bar */
  --utility-height: 0px;           /* utility bar; shown on desktop */
  --offer-height: 0px;             /* offer bar above it, when one shows (components.css) */
  --tap-target: 48px;

  /* ---- shape ---- */
  --radius: 4px;                   /* inputs, small controls */
  --radius-sm: var(--radius);      /* older name, same value */
  --radius-lg: 12px;               /* cards, panels, images */
  --radius-pill: 999px;            /* buttons, chips, tags */

  /* ---- icons ---- */
  --icon-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2318452e'%3E%3Cpath d='M1.6 5.1a.6.6 0 0 1 .8 0L8 10.7l5.6-5.6a.6.6 0 1 1 .8.8l-6 6a.6.6 0 0 1-.8 0l-6-6a.6.6 0 0 1 0-.8'/%3E%3C/svg%3E");

  /* ---- elevation (used sparingly) ---- */
  --shadow-card: 0 1px 2px rgb(11 31 21 / 0.06), 0 8px 24px rgb(11 31 21 / 0.06);
  --shadow-panel: 0 24px 48px rgb(11 31 21 / 0.18);

  /* ---- motion ---- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration-fast: 160ms;
  --duration: 280ms;
  --duration-slow: 600ms;

  /* ---- layering ---- */
  --z-banner: 80;                  /* staff preview banner */
  --z-float: 90;                   /* back-to-top button */
  --z-header: 100;
  --z-dropdown: 110;
  --z-skip: 1000;
}

/* ---- breakpoints (media queries cannot read variables; the values in use) ----
   480   small phones up
   640   large phones up (two-column cards)
   720   tablets portrait up (719 for "below")
   900   tablets landscape up (footer, filters)
   960   detail pages: sidebar beside content
   1000  footer columns, wide grids
   1024  desktop navigation (1023 for "below")
   1200  wide desktop: utility bar (1199 for "below")
   900, 960 and 1000 stay separate: merging them would move layouts at those widths. */

@media (min-width: 1200px) {
  :root {
    --utility-height: 40px;
  }
}

@media (max-width: 1199px) {
  :root {
    --header-height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration: 0ms;
    --duration-slow: 0ms;
  }
}

} /* end @layer tokens */
