/* =========================================================
   Analytics Canary — Colors & Type
   Soft-summer portfolio palette · Fraunces + Inter + IBM Plex Mono
   ========================================================= */

:root {
  /* =========================================================
     COLOR TOKENS — primitive (soft-summer-ecommerce palette)
     ========================================================= */
  --color-cream:    #F9F8FB;
  --color-lilac:    #E8D9F0;
  --color-sage:     #C8D4C4;
  --color-lavender: #B0A8C4;
  --color-charcoal: #85807A;

  --ink-900: #2A262F;
  --ink-700: #4A4550;
  --ink-500: #85807A;
  --ink-400: #A29DA6;
  --ink-300: #C9C5CC;

  --surface-0:    #FFFFFF;
  --surface-1:    #F9F8FB;
  --surface-2:    #F2EEF6;
  --surface-3:    #ECE7F1;
  --surface-line: #E4DEEA;

  --accent-berry:    #B8657A;
  --accent-honey:    #D4B483;
  --accent-deepsage: #8AA38C;
  --accent-tomato:   #E26B4C;

  /* =========================================================
     COLOR TOKENS — semantic
     ========================================================= */
  --fg-1:           var(--ink-900);
  --fg-2:           var(--ink-700);
  --fg-3:           var(--ink-500);
  --fg-4:           var(--ink-400);
  --fg-on-primary:  var(--color-cream);

  --bg-1:           var(--surface-0);
  --bg-2:           var(--surface-2);
  --bg-3:           var(--surface-3);
  --bg-inverse:     var(--ink-900);

  --accent:         var(--accent-berry);
  --accent-hover:   #9e4f63;
  --accent-soft:    #F2E0E5;
  --success:        var(--accent-deepsage);

  /* =========================================================
     LEGACY ALIAS — old CRO design system → soft-summer palette
     ========================================================= */
  --cro-white:        #FFFFFF;
  --cro-green:        #62C4A0;
  --cro-gray-25:      var(--surface-line);
  --cro-blue-25:      var(--accent-soft);
  --cro-blue-50:      rgba(184, 101, 122, 0.25);
  --cro-primary-dark: var(--accent-hover);

  --border:         var(--surface-line);
  --border-strong:  var(--ink-300);
  --divider:        var(--surface-line);

  /* =========================================================
     TYPOGRAPHY TOKENS
     ========================================================= */
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-accent:  'Caveat', cursive;
  --font-mono:    'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    600;
  --weight-black:   700;

  /* =========================================================
     SPACING / LAYOUT
     ========================================================= */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  --container-max:      1000px;
  --section-padding-y:  96px;
  --section-padding-x:  32px;

  /* =========================================================
     BORDERS / RADIUS / SHADOW
     ========================================================= */
  --radius:      6px;
  --radius-sm:   4px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(42,38,47,.04), 0 1px 3px rgba(42,38,47,.05);
  --shadow:    0 4px 12px rgba(42,38,47,.06), 0 2px 4px rgba(42,38,47,.04);
  --shadow-lg: 0 12px 32px rgba(42,38,47,.08), 0 4px 8px rgba(42,38,47,.04);

  /* =========================================================
     MOTION
     ========================================================= */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:   cubic-bezier(.34, 1.56, .64, 1);
  --duration-fast: 150ms;
  --duration:      200ms;
  --duration-slow: 300ms;
}

/* =========================================================
   BASE TYPE STYLES
   ========================================================= */
html, body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: var(--weight-regular);
  color: var(--fg-2);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 50px;
  font-weight: 500;
  color: var(--fg-1);
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 120, "SOFT" 30;
  text-wrap: balance;
  margin: 0 0 var(--space-5);
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 38px;
  font-weight: 500;
  color: var(--fg-1);
  font-variation-settings: "opsz" 72, "SOFT" 20;
  margin: 0 0 var(--space-5);
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  color: var(--fg-1);
  font-variation-settings: "opsz" 36;
  margin: 0 0 var(--space-4);
}

h4, .h4 {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--weight-bold);
  color: var(--fg-1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
}

.display {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 58px;
  font-weight: 500;
  color: var(--fg-1);
  font-variation-settings: "opsz" 144, "SOFT" 40;
}

.body-lg  { font-size: 18px; line-height: 28px; }
.body-md  { font-size: 15px; line-height: 24px; }

p, .body {
  font-size: 15px;
  line-height: 24px;
  font-weight: var(--weight-regular);
  margin: 0 0 var(--space-4);
}

.body-sm, small {
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--weight-regular);
}

.caption {
  font-size: 12px;
  line-height: 18px;
  font-weight: var(--weight-regular);
  color: var(--fg-3);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 16px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration) var(--ease-standard);
}
a:hover { color: var(--accent-hover); }

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

code {
  background: var(--bg-3);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--fg-1);
}

pre {
  background: var(--bg-3);
  padding: var(--space-5);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
}
pre code { background: transparent; padding: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: var(--space-7) 0;
}

::selection { background: var(--color-lilac); color: var(--fg-1); }
