/* ============================================================
   BeeGroup — Base tokens, reset, typography
   Tokens derived from Beegroup Brandbook (Marzo 2025).
   ============================================================ */

:root {
  /* --- Palette (official RGB from brandbook) ----------------
     Overrides the Phase 01 approximations extracted from the PDF's
     CMYK operators — these are the authoritative sRGB values.      */
  --bg-orange:        #F37321;  /* Orange Impact */
  --bg-orange-dark:   #B66612;  /* Autumn        */
  --bg-green:         #00391F;  /* Green Forest  */
  --bg-green-mid:     #395D44;  /* Green Olive   */
  --bg-beige:         #DAD3CC;  /* Brand Gray    */
  --bg-white:         #FFFFFF;
  --bg-off-white:     #F3F3F3;
  --bg-grey-200:      #E6E6E6;
  --bg-grey-500:      #676767;
  --bg-grey-800:      #343434;
  --bg-black:         #000000;

  /* --- Semantic aliases --------------------------------------- */
  --color-bg:         var(--bg-white);
  --color-surface:    var(--bg-off-white);
  --color-text:       var(--bg-grey-800);
  --color-text-muted: var(--bg-grey-500);
  --color-text-inv:   var(--bg-white);
  --color-primary:    var(--bg-orange);
  --color-primary-h:  var(--bg-orange-dark);
  --color-accent:     var(--bg-green);
  --color-accent-mid: var(--bg-green-mid);
  --color-border:     var(--bg-grey-200);

  /* --- Typography -------------------------------------------- */
  --font-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.5rem;
  --fs-xl:   2rem;
  --fs-2xl:  2.75rem;
  --fs-3xl:  clamp(2.5rem, 5vw + 1rem, 4.5rem);

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-base:  1.5;
  --lh-loose: 1.75;

  /* --- Spacing scale (4px base) ------------------------------ */
  --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;

  /* --- Radii -------------------------------------------------- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* --- Layout ------------------------------------------------- */
  --container-max: 1200px;
  --container-wide: 1440px;
  --container-pad: clamp(1rem, 3vw, 2rem);
  --navbar-h: 70px;

  /* --- Motion / FX ------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --ease:      cubic-bezier(.2, .7, .3, 1);
  --dur-fast:  150ms;
  --dur-base:  250ms;
}

/* --- Breakpoints (reference, use via media queries) -----------
   sm: 390px   (mobile baseline)
   md: 768px   (tablet)
   lg: 1024px  (small desktop)
   xl: 1440px  (design canvas)
----------------------------------------------------------------- */

/* --- Minimal reset ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--color-primary); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Headings ------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-4);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }
h5 { font-size: var(--fs-md);  }
h6 { font-size: var(--fs-base); }

p { margin: 0 0 var(--sp-4); }

/* --- Visually hidden (a11y) --------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* --- Skip link ---------------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px; left: 1rem;
  padding: var(--sp-2) var(--sp-4);
  background: var(--color-accent);
  color: var(--color-text-inv);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

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