/* =========================================================
   CoPowr Design System — colors + type
   Source of truth: CoPowr brand presentation (© 2025 Softriver)
   ========================================================= */

/* ---------- Fonts ----------
   Brand display (wordmark, headlines): Poppins
   UI / body: Inter
   NOTE: exact foundry fonts used in the final wordmark are
   unknown — Poppins is a close visual match for the rounded
   geometric sans in the CoPowr logotype. Flag for confirmation.
*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---------- Brand colors (primary, from brand book) ---------- */
  --copowr-white:   #ffffff;   /* Paper */
  --copowr-mint:    #73cf87;   /* Mint — optimistic, growth */
  --copowr-teal:    #199a8e;   /* Teal — signature, trust */
  --copowr-blue:    #076484;   /* Deep blue — confidence */

  /* ---------- Extended neutrals (derived, for UI surfaces) ---------- */
  --ink-900: #0a1f2a;   /* Near-black, darkened from brand blue */
  --ink-800: #13323f;
  --ink-700: #1f4a5a;
  --ink-500: #4f6b77;   /* Body */
  --ink-400: #7a8e97;   /* Secondary text */
  --ink-300: #b5c1c7;   /* Borders, muted */
  --ink-200: #dbe3e7;   /* Hairline */
  --ink-100: #eef2f4;   /* Muted surface */
  --ink-50:  #f6f8f9;   /* App background */

  /* ---------- Surface tints (very soft brand washes) ---------- */
  --mint-50:  #eef9f1;
  --mint-100: #d7f0dd;
  --teal-50:  #e6f4f3;
  --teal-100: #c7e7e3;
  --blue-50:  #e6eff3;
  --blue-100: #c7dae3;

  /* ---------- Supporting neutrals (derived from the brand hues) ----------
     These extend the Paper / Mint / Teal / Deep-Blue core; no warm browns.
     Cream pulls from mint's yellow-green side; Cloud and Mist pull from teal/blue. */
  --cream:  #f4f2e6;   /* Soft paper alt, mint-adjacent */
  --cloud:  #eef4f4;   /* Cool surface wash, teal-adjacent */
  --mist:   #d7e2e5;   /* Mid cool neutral */

  /* ---------- Semantic tokens ---------- */
  --bg:          var(--copowr-white);
  --bg-muted:    var(--ink-50);
  --surface:     var(--copowr-white);
  --surface-alt: var(--ink-50);

  --fg:          var(--ink-900);         /* Primary text */
  --fg-2:        var(--ink-700);         /* Secondary text */
  --fg-3:        var(--ink-500);         /* Tertiary text */
  --fg-muted:    var(--ink-400);
  --fg-inverse:  var(--copowr-white);

  --border:      var(--ink-200);
  --border-strong: var(--ink-300);

  --accent:           var(--copowr-teal);
  --accent-hover:     #157f75;           /* 8% darker */
  --accent-pressed:   #106961;
  --accent-soft:      var(--teal-50);

  --primary:          var(--copowr-blue);
  --primary-hover:    #065472;
  --primary-pressed:  #054660;

  --success:          var(--copowr-mint);
  --warning:          #d9a441;           /* warm amber, muted */
  --danger:           #c15455;           /* warm red, muted */
  --info:             var(--copowr-blue);

  --focus-ring: 0 0 0 3px color-mix(in oklch, var(--copowr-teal) 35%, transparent);

  /* ---------- Type tokens ---------- */
  --font-display: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Scale (perfect fourth at 1rem = 16px) */
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  32px;
  --text-3xl:  42px;
  --text-4xl:  56px;
  --text-5xl:  72px;
  --text-6xl:  96px;

  --leading-tight: 1.1;
  --leading-snug:  1.25;
  --leading-body:  1.55;
  --leading-loose: 1.7;

  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:  0.04em;
  --tracking-eyebrow: 0.14em;

  /* ---------- Spacing (4px base) ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* ---------- Radii — soft, approachable ---------- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;

  /* ---------- Elevation — quiet, no harsh shadows ---------- */
  --shadow-xs: 0 1px 2px rgba(10, 31, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(10, 31, 42, 0.06), 0 1px 2px rgba(10, 31, 42, 0.04);
  --shadow-md: 0 8px 24px -6px rgba(10, 31, 42, 0.08), 0 2px 6px rgba(10, 31, 42, 0.05);
  --shadow-lg: 0 20px 48px -16px rgba(10, 31, 42, 0.16), 0 4px 12px rgba(10, 31, 42, 0.06);
  --shadow-focus: var(--focus-ring);

  /* Inner shadow for recessed surfaces (rare) */
  --shadow-inset: inset 0 1px 2px rgba(10, 31, 42, 0.05);

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.3, 0, 0, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0, 1);

  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* ---------- Layout ---------- */
  --container: 1200px;
  --container-narrow: 860px;
}

/* =========================================================
   Semantic type styles
   Use classes OR inherit via the <h1..h6>/<p> defaults.
   ========================================================= */

html { font-family: var(--font-body); color: var(--fg); background: var(--bg); }
body { font-size: var(--text-base); line-height: var(--leading-body); -webkit-font-smoothing: antialiased; }

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.5vw, var(--text-4xl));
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
  margin: 0;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, var(--text-3xl));
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
  margin: 0;
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--fg);
  margin: 0;
}

h4, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  line-height: 1.35;
  color: var(--fg);
  margin: 0;
}

p, .body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--fg-2);
  margin: 0;
  text-wrap: pretty;
}

.lede {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--fg-2);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
}

.caption {
  font-size: var(--text-sm);
  color: var(--fg-3);
  line-height: 1.5;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--ink-100);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--ink-800);
}

/* Small brand-tinted link default */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
