/* ==========================================================================
   Bio-Lec Health — Design Tokens
   Colors, type, spacing, radii, shadows, motion.
   Import this file once at the top of any page.
   --------------------------------------------------------------------------
   Font loading: pulls Source Serif 4 + IBM Plex Sans/Mono from Google Fonts.
   Icon loading: use Lucide from CDN:
     <script src="https://unpkg.com/lucide@latest"></script>
     <i data-lucide="heart"></i>   then  lucide.createIcons()
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* ---------- Brand colors ---------- */
  --green-primary:  #2BA528;   /* logo outer panels — CTAs, links, accent */
  --green-deep:     #1E6B1A;   /* logo inner/overlap panels — headers, hover */
  --green-leaf:     #7FC97F;   /* soft tint — backgrounds, tags, illustrations */
  --green-wash:     #EAF5E9;   /* very pale green — section tints */
  --green-ink:      #0F3D0D;   /* text on leaf/wash backgrounds */

  /* ---------- Neutrals ---------- */
  --cream:          #FAF7F0;   /* default page background (warm off-white) */
  --cream-2:        #F3EFE4;   /* subtle card fill / alternating section */
  --ink:            #1A1F1A;   /* primary text (greened near-black) */
  --ink-2:          #2E332D;   /* strong secondary text */
  --stone:          #6B7269;   /* secondary text / captions */
  --stone-2:        #9AA09A;   /* disabled text / hints */
  --line:           #E6E4DC;   /* hairlines, card borders */
  --line-2:         #D5D2C7;   /* stronger dividers */
  --white:          #FFFFFF;   /* used sparingly (inputs, popovers) */

  /* ---------- Semantic ---------- */
  --success:        #2BA528;   /* same as primary — success feels on-brand */
  --warning:        #C97A1A;   /* warm amber, not yellow */
  --danger:         #B3261E;
  --info:           #3A6FAE;   /* reserved for partner-brand crossover */

  --success-bg:     #EAF5E9;
  --warning-bg:     #FBF0E2;
  --danger-bg:      #F8E6E4;
  --info-bg:        #E6EEF7;

  /* ---------- Type families ---------- */
  --font-serif:     'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans:      'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:      'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---------- Type scale ---------- */
  --fs-micro:       0.75rem;   /* 12 */
  --fs-small:       0.875rem;  /* 14 */
  --fs-body:        1rem;      /* 16 */
  --fs-lead:        1.125rem;  /* 18 */
  --fs-h4:          1.25rem;   /* 20 */
  --fs-h3:          1.5rem;    /* 24 */
  --fs-h2:          2rem;      /* 32 */
  --fs-h1:          2.75rem;   /* 44 */
  --fs-display:     3.5rem;    /* 56 */

  --lh-tight:       1.15;
  --lh-snug:        1.3;
  --lh-normal:      1.55;
  --lh-loose:       1.75;

  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-label: 0.08em;    /* uppercase eyebrows */

  /* ---------- Spacing (8-pt grid) ---------- */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* ---------- Radii ---------- */
  --r-xs:   4px;
  --r-sm:   6px;   /* inputs, tags */
  --r-md:   12px;  /* buttons, small cards */
  --r-lg:   20px;  /* feature cards, partner tiles */
  --r-xl:   28px;  /* hero panels */
  --r-pill: 999px;

  /* ---------- Shadows ---------- */
  --shadow-1: 0 1px 2px rgba(30,107,26,0.04), 0 8px 24px rgba(30,107,26,0.06);
  --shadow-2: 0 2px 4px rgba(30,107,26,0.06), 0 16px 32px rgba(30,107,26,0.08);
  --shadow-3: 0 4px 8px rgba(30,107,26,0.08), 0 32px 48px rgba(30,107,26,0.10);
  --shadow-focus: 0 0 0 2px var(--cream), 0 0 0 4px var(--green-primary);

  /* ---------- Motion ---------- */
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1);
  --dur-fast:    160ms;
  --dur-med:     240ms;
  --dur-slow:    400ms;

  /* ---------- Layout ---------- */
  --maxw-prose: 1040px;
  --maxw-full:  1200px;
}

/* ==========================================================================
   Base / reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Semantic type
   ========================================================================== */
h1, .h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}
h2, .h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin: 0 0 var(--sp-3);
  text-wrap: pretty;
}
h3, .h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  color: var(--ink);
  margin: 0 0 var(--sp-3);
}
h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  color: var(--ink);
  margin: 0 0 var(--sp-2);
}

.eyebrow, .overline {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 var(--sp-2);
}

p, .body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--ink-2);
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}
.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-loose);
  color: var(--ink-2);
}
.small   { font-size: var(--fs-small); line-height: var(--lh-snug); color: var(--stone); }
.micro   { font-size: var(--fs-micro); line-height: var(--lh-snug); color: var(--stone); }
.display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}

code, kbd, samp, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

a {
  color: var(--green-deep);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--r-xs); }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-6) 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-5);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:active        { transform: scale(0.98); transition-duration: 100ms; }

.btn--primary {
  background: var(--green-primary);
  color: var(--cream);
  border-color: var(--green-primary);
}
.btn--primary:hover { background: var(--green-deep); border-color: var(--green-deep); }

.btn--secondary {
  background: var(--cream);
  color: var(--green-deep);
  border-color: var(--green-deep);
}
.btn--secondary:hover { background: var(--green-wash); }

.btn--ghost {
  background: transparent;
  color: var(--green-deep);
  padding: 0 var(--sp-3);
}
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn--sm { min-height: 36px; padding: 0 var(--sp-4); font-size: var(--fs-small); }
.btn--lg { min-height: 52px; padding: 0 var(--sp-6); font-size: var(--fs-lead); }

/* ==========================================================================
   Form fields
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.field__label {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
}
.input, .textarea, .select {
  width: 100%;
  min-height: 44px;
  padding: 10px var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--stone-2); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--stone); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(43, 165, 40, 0.18);
}
.textarea { min-height: 120px; padding-top: 12px; resize: vertical; }

/* ==========================================================================
   Card / surface
   ========================================================================== */
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out);
}
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* ==========================================================================
   Badge / tag
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  border-radius: var(--r-pill);
  background: var(--green-wash);
  color: var(--green-deep);
  border: 1px solid transparent;
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warn    { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge--neutral { background: var(--cream-2);    color: var(--stone);   }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
