/* ============================================================
   EVOLVABLE — CORE TOKENS
   Colors, typography, spacing, radii, and texture primitives.
   Read this file first. Every artifact in this system consumes it.
   ============================================================ */

/* ---------- FONTS ----------
   Evolvable runs three faces:
   1. ABC Camera     — display / all-caps H1 (distinctive, slightly geometric)
   2. Acumin Pro     — body, UI, buttons (Typekit kit mov4cer)
   3. Adobe Garamond Pro — italic editorial pull-quote (Typekit)
   We load Camera locally, and the two Adobe faces via Typekit. A safe
   sans + serif fallback is provided so designs still read well
   offline or if Typekit fails. */

@font-face {
  font-family: "ABC Camera";
  src: url("../fonts/camera/ABCCamera-Regular.woff2") format("woff2"),
       url("../fonts/camera/ABCCamera-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ============================================================
     COLOR TOKENS
     Evolvable's palette is warm, airy, close-to-neutral.
     Surfaces are soft creams and sages; accents are cool teal.
     Black is used as a hairline — everything is outlined, never
     filled with heavy color.
     ============================================================ */

  /* Ink + ground */
  --ink:           #000000;    /* all text, all hairlines */
  --ink-soft:      #171717;
  --ink-60:        rgba(0,0,0,0.6);
  --ink-40:        rgba(0,0,0,0.4);
  --paper:         #ffffff;    /* default app background */
  --paper-warm:    #F5F4F5;    /* mobile menu ground */

  /* Warm surfaces (bottom-left of every hero wash) */
  --warm-cream:    #f4efe5;
  --ivory:         #fffff8;
  --olive-mist:    #d9d8af;

  /* Sage surfaces (interior, calming mid) */
  --sage-1:        #e6ece6;
  --sage-2:        #d8e3dc;
  --sage-wash:     #cfdacb;
  --sage-deep:     #98a691;
  --grass:         #a8c05b;

  /* Cool accents (top-right of wash, analytical moments) */
  --teal-mid:      #9ec6cc;
  --teal-edge:     #7bbec8;
  --cool-blue:     #6ea8b3;
  --sky-pale:      #b8d0e0;

  /* Panel tones (used as base for the metallic washes) */
  --panel-grey:    #C0C6B7;   /* WhatsApp results base */
  --panel-olive:   #6C705C;   /* deep accent corner */
  --midnight:      #060033;   /* dark-mode ramp start */
  --obsidian:      #050505;   /* dark-mode ramp end   */

  /* Semantic */
  --hairline:      #000000;   /* NEVER use a gray hairline in Evolvable */
  --divider:       rgba(0,0,0,0.12);
  --scrim-dark:    rgba(0,0,0,0.06);

  /* ============================================================
     TYPOGRAPHY TOKENS
     Evolvable sets html { font-size: 12px } as its root — this is
     intentional; all rem-based values inherit that. Raw px sizes
     below ALREADY assume this. When lifting a token into a fresh
     page, set the same root size.
     ============================================================ */
  --font-display:  "ABC Camera", "Canela", "Söhne", Georgia, serif;
  --font-body:     "acumin-pro", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-italic:   "adobe-garamond-pro", "EB Garamond", Georgia, serif;

  --fw-light:    300;
  --fw-regular:  400;
  --fw-semibold: 600;

  /* Desktop scale (matches tailwind.config.ts max ends of clamp) */
  --fs-h1: 60px;  --lh-h1: 68px;
  --fs-h2: 30px;  --lh-h2: 36px;
  --fs-h3: 20px;  --lh-h3: 24px;
  --fs-h4: 18px;  --lh-h4: 22px;   --ls-h4: 0.12em;
  --fs-p1: 22px;  --lh-p1: 29px;
  --fs-p2: 18px;  --lh-p2: 21.6px;
  --fs-p3: 16px;  --lh-p3: 20px;
  --fs-p4: 9.5px; --lh-p4: 11.5px; --ls-p4: 0.15em;
  --fs-btn: 15px; --lh-btn: 22px;  --ls-btn: 0.12em;
  --fs-nav: 13px;                  --ls-nav: 0.12em;

  /* Mobile scale */
  --fs-h1m: 40px; --lh-h1m: 1.25em;
  --fs-h2m: 22px; --lh-h2m: 26px;
  --fs-h3m: 18px;
  --fs-h4m: 18px; --ls-h4m: 0.12em;
  --fs-p1m: 22px;
  --fs-btnm: 14.5px; --ls-btnm: 0.12em;
  --fs-menum: 36px;

  /* ============================================================
     SPACING (s-scale — match tailwind spacing tokens)
     ============================================================ */
  --s-0:  0px;
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-7:  30px;
  --s-8:  35px;
  --s-9:  40px;
  --s-10: 48px;
  --s-11: 56px;
  --s-12: 64px;

  /* Radii — Evolvable almost never rounds. The rare exception is
     feature cards (19px) and form inputs (11px). */
  --r-card:  19px;
  --r-input: 11px;
  --r-pill:  128px;  /* legacy CTA pill; modern CTA is square */

  /* Shadows — design is shadow-less. A tiny lift exists on
     overlayed popouts only. */
  --lift-pop: 0 12px 40px rgba(0,0,0,0.10);
}

/* ============================================================
   BASE RESET  (optional — include only on demo pages, not when
   the host app already has its own reset)
   ============================================================ */
.evo-reset *,
.evo-reset *::before,
.evo-reset *::after { box-sizing: border-box; padding: 0; margin: 0; }

.evo-reset {
  font-size: 12px;                 /* CRITICAL — root rem base */
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.evo-reset a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY UTILITY CLASSES
   Use these to lift type into a mockup without re-deriving sizes.
   ============================================================ */
.evo-display-h1 { font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: var(--fs-h1); line-height: var(--lh-h1); text-transform: uppercase; letter-spacing: 0; }
.evo-display-h1.mobile { font-size: var(--fs-h1m); line-height: var(--lh-h1m); }

.evo-h2 { font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: var(--fs-h2); line-height: var(--lh-h2); text-transform: uppercase; }

.evo-h3 { font-family: var(--font-body); font-weight: var(--fw-regular);
  font-size: var(--fs-h3); line-height: var(--lh-h3); }

.evo-h4-eyebrow { font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--ls-h4); text-transform: uppercase; }

.evo-p1 { font-family: var(--font-body); font-weight: var(--fw-light);
  font-size: var(--fs-p1); line-height: var(--lh-p1); }

.evo-p2 { font-family: var(--font-body); font-weight: var(--fw-regular);
  font-size: var(--fs-p2); line-height: var(--lh-p2); }

.evo-p3 { font-family: var(--font-body); font-weight: var(--fw-regular);
  font-size: var(--fs-p3); line-height: var(--lh-p3); }

.evo-italic-lead { font-family: var(--font-italic); font-style: italic;
  font-weight: var(--fw-regular); font-size: var(--fs-p1); line-height: 1.25em; }

.evo-btn-label { font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-btn); line-height: var(--lh-btn); letter-spacing: var(--ls-btn); text-transform: uppercase; }

.evo-nav-label { font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-nav); letter-spacing: var(--ls-nav); text-transform: uppercase; }

.evo-caption { font-family: var(--font-body); font-weight: var(--fw-regular);
  font-size: var(--fs-p4); letter-spacing: var(--ls-p4); text-transform: uppercase; }

/* ============================================================
   THE EVOLVABLE "WASHES"
   Every screen surface in the product is one of these layered
   gradient stacks. They're what makes the product feel like
   Evolvable. Use them as full-bleed panel backgrounds. NEVER
   pair with a heavy shadow — they are the focal treatment.

   1. wash--hero      : warm cream → teal diagonal, sage corners
   2. wash--profile   : airy ivory → sky blue w/ olive corner
   3. wash--butterfly : central panel, turquoise-left
   4. wash--assessment: deep navy with aqua bottom
   5. wash--dark      : night / dark-mode variant
   ============================================================ */
.evo-wash {
  position: relative;
  isolation: isolate;
}
.evo-wash::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.evo-wash > * { position: relative; z-index: 1; }

/* HERO — the rightPanel wash (warm → teal) */
.wash--hero::before {
  background:
    radial-gradient(120% 120% at 92% 86%, rgba(255,255,255,.32) 0%, rgba(255,255,255,0) 56%),
    radial-gradient(120% 120% at 10% 12%, rgba(168,192,91,.44) 0%, rgba(207,218,203,0) 60%),
    radial-gradient(130% 120% at 86% 8%,  rgba(50,162,185,.54) 0%, rgba(94,190,209,0) 64%),
    linear-gradient(to top right,
      var(--warm-cream) 0%,
      var(--sage-1) 26%,
      var(--sage-2) 52%,
      var(--teal-mid) 100%);
}

/* PROFILE — ivory centre, cool halo */
.wash--profile::before {
  background:
    radial-gradient(circle at 0% 5%,   rgba(253,253,253,.65) 0%, rgba(152,166,145,0) 62%),
    radial-gradient(circle at 100% 100%, rgba(233,238,230,.6) 0%, rgba(185,202,175,0) 62%),
    radial-gradient(circle at 89% 5%,  rgba(46,46,41,1) 0%, rgba(138,140,113,0) 57%),
    linear-gradient(200deg, #b3b397 0%, #6da4bf 100%);
  background-blend-mode: soft-light, normal, normal, normal;
}

/* BUTTERFLY — turquoise-left analytical centre panel */
.wash--butterfly::before {
  background-color: rgb(192,198,183);
  background-image:
    radial-gradient(circle at 0% 0%,   rgb(248,249,250), transparent 60%),
    radial-gradient(circle at 100% 0%, rgb(112,115,106), transparent 60%),
    radial-gradient(circle at 100% 100%, rgb(226,232,201), transparent 50%),
    radial-gradient(circle at 0% 100%,  rgb(122,167,172), transparent 80%);
}

/* ASSESSMENT — deep-blue reflective ground */
.wash--assessment::before {
  background:
    radial-gradient(circle at 51% 100%, rgba(161,210,211,.94) 0%, rgba(161,210,211,0) 77%),
    linear-gradient(90deg, #02071d 0%, #020128 100%);
}

/* DARK — night variant used behind the loggedOut hero */
.wash--dark::before {
  background:
    radial-gradient(circle at 0% 100%, rgba(179,255,254,.24) 0%, rgba(179,255,254,0) 62%),
    radial-gradient(circle at 100% 100%, rgba(24,140,111,.21) 0%, rgba(24,140,111,0) 53%),
    linear-gradient(200deg, #060033 0%, #050505 100%);
}

/* ============================================================
   GRAIN — Every wash gets a soft fractal noise overlay.
   This is part of the brand. Do not skip it.
   ============================================================ */
.evo-grain {
  position: relative;
  isolation: isolate;
}
.evo-grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.19;
  filter: contrast(1.4);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  z-index: 0;
}
.evo-grain > * { position: relative; z-index: 1; }
