/* ============================================
   EVO SOLUTIONS — Colors & Type
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* ——— Core palette (monochrome foundation) ——— */
  --evo-black:       #050504;   /* off-black canvas for depth */
  --evo-ink:         #0C0B0A;   /* near-black — primary surface */
  --evo-ink-2:       #151310;   /* secondary surface */
  --evo-ink-3:       #1E1B17;   /* tertiary surface / hover */
  --evo-line:        #2A2722;   /* hairline border on dark */
  --evo-line-2:      #373229;   /* stronger border on dark */

  --evo-white:       #FFFFFF;   /* pure white */
  --evo-paper:       #FAFAF7;   /* warm off-white — editorial pages */
  --evo-paper-2:     #F2F1ED;   /* secondary paper */
  --evo-rule:        #E6E4DE;   /* hairline on paper */
  --evo-rule-2:      #D4D1C8;   /* stronger rule on paper */

  /* ——— Neutral text scale (dark mode) ——— */
  --fg-1-dark:       #FFFFFF;   /* primary text on dark */
  --fg-2-dark:       #B8B8B3;   /* secondary text on dark (warm gray) */
  --fg-3-dark:       #7A7A75;   /* tertiary / metadata */
  --fg-4-dark:       #4A4A47;   /* disabled / quietest */

  /* ——— Neutral text scale (light mode) ——— */
  --fg-1-light:      #0A0A0A;
  --fg-2-light:      #4A4A47;
  --fg-3-light:      #7A7A75;
  --fg-4-light:      #B8B8B3;

  /* ——— Semantic (defaults to dark) ——— */
  --bg:              var(--evo-ink);
  --bg-elevated:     var(--evo-ink-2);
  --bg-hover:        var(--evo-ink-3);
  --fg-1:            var(--fg-1-dark);
  --fg-2:            var(--fg-2-dark);
  --fg-3:            var(--fg-3-dark);
  --fg-4:            var(--fg-4-dark);
  --border:          var(--evo-line);
  --border-strong:   var(--evo-line-2);

  /* ——— Accent (whisper-level; max one per view — never decorative) ——— */
  --evo-accent:      #CC785C;   /* muted coral (Anthropic Book Cloth family) */
  --evo-accent-ink:  #0C0B0A;   /* text on accent */

  /* ——— Status (functional only, never decorative) ——— */
  --evo-success:     #6B8E6F;   /* muted sage */
  --evo-warn:        #C9A66B;   /* muted ochre */
  --evo-error:       #B26A5F;   /* muted terracotta */

  /* ——— Typography ——— */
  --font-sans:       'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-serif:      'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-mono:       'Geist Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale — editorial; values are px for predictability */
  --text-xs:         12px;   /* metadata, eyebrow */
  --text-sm:         14px;   /* captions, labels */
  --text-base:       16px;   /* body small */
  --text-md:         18px;   /* body */
  --text-lg:         22px;   /* lead / subhead */
  --text-xl:         32px;   /* H3 */
  --text-2xl:        48px;   /* H2 */
  --text-3xl:        72px;   /* H1 */
  --text-4xl:        112px;  /* display */
  --text-5xl:        160px;  /* hero display */

  /* Line heights */
  --lh-tight:        1.02;
  --lh-snug:         1.15;
  --lh-normal:       1.45;
  --lh-relaxed:      1.6;

  /* Letter spacing */
  --tracking-tight:  -0.03em;
  --tracking-snug:   -0.015em;
  --tracking-normal: 0;
  --tracking-wide:   0.08em;
  --tracking-wider:  0.18em;   /* eyebrow / all-caps labels */

  /* ——— Spacing (8pt grid) ——— */
  --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;
  --space-11:  192px;
  --space-12:  256px;

  /* ——— Layout ——— */
  --container:       1280px;
  --container-wide:  1440px;
  --container-text:  680px;    /* editorial reading width */
  --gutter:          32px;

  /* ——— Borders & radii ——— */
  --radius-none:     0;
  --radius-sm:       2px;      /* used rarely — inputs, tags */
  --radius-md:       4px;      /* buttons */
  /* No large radii — Evo prefers sharp corners */

  --border-hairline: 1px solid var(--border);
  --border-strong-1: 1px solid var(--border-strong);

  /* ——— Shadows (barely perceptible — we prefer borders) ——— */
  --shadow-none:     none;
  --shadow-subtle:   0 1px 2px rgba(5,5,4,0.4);
  --shadow-raised:   0 8px 24px rgba(5,5,4,0.5);

  /* ——— Motion ——— */
  --ease-out:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:        120ms;
  --dur-base:        200ms;
  --dur-slow:        400ms;
  --dur-slower:      700ms;
}

/* ============================================
   Light-mode override (editorial/paper pages)
   ============================================ */
[data-theme="light"] {
  --bg:            var(--evo-paper);
  --bg-elevated:   var(--evo-white);
  --bg-hover:      var(--evo-paper-2);
  --fg-1:          var(--fg-1-light);
  --fg-2:          var(--fg-2-light);
  --fg-3:          var(--fg-3-light);
  --fg-4:          var(--fg-4-light);
  --border:        var(--evo-rule);
  --border-strong: var(--evo-rule-2);
}

/* ============================================
   Base element styles — semantic tokens
   ============================================ */
html, body {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--lh-normal);
  font-weight: 400;
  letter-spacing: var(--tracking-snug);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, .h1 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 400;
  margin: 0;
}

h2, .h2 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  font-weight: 400;
  margin: 0;
}

h3, .h3 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  font-weight: 400;
  margin: 0;
}

h4, .h4 {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  line-height: var(--lh-snug);
  font-weight: 500;
  letter-spacing: var(--tracking-snug);
  margin: 0;
}

p, .p {
  font-size: var(--text-md);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  max-width: var(--container-text);
  margin: 0;
}

.lead {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  letter-spacing: var(--tracking-normal);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--fg-3);
  font-weight: 400;
}

.meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg-3);
  letter-spacing: var(--tracking-normal);
}

.display {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 400;
}

.hero {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 400;
}

code, kbd, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0;
}

em, .italic {
  font-family: var(--font-serif);
  font-style: italic;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--fg-4);
  transition: border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
a:hover { border-bottom-color: var(--fg-1); }
a:focus-visible {
  outline: 1px solid rgba(250,250,247,0.82);
  outline-offset: 4px;
}

hr, .rule {
  border: 0;
  border-top: var(--border-hairline);
  margin: 0;
}

/* ——— Utility: editorial container ——— */
.container      { max-width: var(--container);      margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }
.container-text { max-width: var(--container-text); margin: 0 auto; padding: 0 var(--gutter); }

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