/* Earth Returns — Colors + Type
   Import this file in any HTML page to get the full brand tokens and base typography.
   Depends on: fonts/ (local webfonts). No external CDN fonts required.
*/

/* ============================================================
   WEBFONTS
   ============================================================ */

/* Neue Haas Grotesk Display — Medium (headers) */
@font-face {
  font-family: "NeueHaasGroteskDisp Pro Md";
  src: url("fonts/NHaasGroteskDSPro-65Md.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Elza — full family under ONE name, using weight axis */
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Thin.woff2") format("woff2");
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Extralight.woff2") format("woff2");
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Light.woff2") format("woff2"),
       url("fonts/Elza-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-LightOblique.woff2") format("woff2");
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Regular.woff2") format("woff2"),
       url("fonts/Elza-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Medium.woff2") format("woff2"),
       url("fonts/Elza-Medium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-MediumOblique.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Semibold.woff2") format("woff2"),
       url("fonts/Elza-Semibold.woff") format("woff");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Bold.woff2") format("woff2"),
       url("fonts/Elza-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza";
  src: url("fonts/Elza-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}

/* Aliased names that match the SKILL document */
@font-face {
  font-family: "Elza Light";
  src: url("fonts/Elza-Light.woff2") format("woff2"),
       url("fonts/Elza-Light.woff") format("woff");
  font-weight: 300 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Elza Medium";
  src: url("fonts/Elza-Medium.woff2") format("woff2"),
       url("fonts/Elza-Medium.woff") format("woff");
  font-weight: 400 600; font-style: normal; font-display: swap;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
  /* ---------- Brand colors (raw) ---------- */
  --er-jungle-green:  #1B4332;   /* primary dark green — headers, dominant brand colour   */
  --er-plantation:    #2D5A3D;   /* supporting green   — secondary banners/footers        */
  --er-ocean:         #0699A8;   /* teal accent        — digital highlights, links        */
  --er-pacific-blue:  #00B4C5;   /* bright cyan        — light accents, hover             */
  --er-bush:          #072A1A;   /* deepest green      — dark sections, footer blocks     */

  --er-kini-aurum:    #C9A227;   /* gold accent — sparingly, key callouts / value signals */

  --er-alabaster:     #FDFBF7;   /* dominant warm near-white background */
  --er-outer-space:   #2D3436;   /* body text — NEVER used as a colored surface            */
  --er-white:         #FFFFFF;   /* typography on dark surfaces only                       */

  /* Support tints (computed, derived — use for low-contrast backgrounds, dividers, tables).
     Not part of the core palette; use only where tokens listed above are too strong. */
  --er-jungle-05:     color-mix(in srgb, var(--er-jungle-green) 5%,  var(--er-alabaster));
  --er-jungle-10:     color-mix(in srgb, var(--er-jungle-green) 10%, var(--er-alabaster));
  --er-jungle-20:     color-mix(in srgb, var(--er-jungle-green) 20%, var(--er-alabaster));
  --er-ocean-08:      color-mix(in srgb, var(--er-ocean)        8%,  var(--er-alabaster));
  --er-aurum-12:      color-mix(in srgb, var(--er-kini-aurum)   12%, var(--er-alabaster));
  --er-hairline:      color-mix(in srgb, var(--er-outer-space)  14%, var(--er-alabaster));
  --er-hairline-dark: color-mix(in srgb, var(--er-white)        22%, transparent);

  /* ---------- Semantic surface tokens ---------- */
  --er-bg:            var(--er-alabaster);
  --er-bg-sunk:       var(--er-jungle-05);        /* slightly recessed surfaces on light */
  --er-bg-dark:       var(--er-jungle-green);     /* primary dark surface                */
  --er-bg-deep:       var(--er-bush);             /* deepest dark surface                */
  --er-bg-accent:     var(--er-ocean);            /* feature banner                      */
  --er-bg-gold:       var(--er-kini-aurum);       /* rarest surface — value moments only */

  /* ---------- Semantic text tokens ---------- */
  --er-text:          var(--er-outer-space);      /* body on light                       */
  --er-text-muted:    color-mix(in srgb, var(--er-outer-space) 68%, var(--er-alabaster));
  --er-text-subtle:   color-mix(in srgb, var(--er-outer-space) 48%, var(--er-alabaster));
  --er-text-heading:  var(--er-jungle-green);     /* headings on light                   */
  --er-text-accent:   var(--er-kini-aurum);       /* rare callouts                       */
  --er-text-link:     var(--er-ocean);            /* links                               */

  --er-text-on-dark:  var(--er-white);            /* body on dark                        */
  --er-text-on-dark-muted: color-mix(in srgb, var(--er-white) 78%, transparent);
  --er-head-on-dark:  var(--er-white);            /* headline on dark                    */
  --er-head-on-dark-accent: var(--er-kini-aurum);

  /* ---------- Typography stacks ---------- */
  --er-font-display:  "NeueHaasGroteskDisp Pro Md", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --er-font-sub:      "Elza Medium", "Elza", "Calibri", "Segoe UI", sans-serif;
  --er-font-body:     "Elza Light",  "Elza", "Calibri", "Segoe UI", sans-serif;
  --er-font-ui:       "Elza", "Calibri", "Segoe UI", sans-serif;

  /* ---------- Type scale (display / body) ---------- */
  --er-size-display-xxl: clamp(64px, 9.5vw, 148px); /* cover-style "BRAND GUIDELINES"   */
  --er-size-display-xl:  clamp(48px, 6.4vw, 96px);
  --er-size-display-lg:  clamp(36px, 4.2vw, 64px);
  --er-size-h1:          44px;
  --er-size-h2:          32px;
  --er-size-h3:          24px;
  --er-size-h4:          18px;
  --er-size-eyebrow:     12px;   /* tracked uppercase meta */
  --er-size-body-lg:     20px;
  --er-size-body:        17px;
  --er-size-body-sm:     15px;
  --er-size-caption:     13px;

  --er-leading-tight:    1.05;
  --er-leading-snug:     1.18;
  --er-leading-normal:   1.45;
  --er-leading-loose:    1.65;

  --er-track-tight:      -0.015em;
  --er-track-normal:     0em;
  --er-track-wide:       0.06em;   /* eyebrows       */
  --er-track-xwide:      0.14em;   /* ALL CAPS meta  */

  /* ---------- Spacing (4pt base, named after ecological things we like) ---------- */
  --er-space-1:   4px;
  --er-space-2:   8px;
  --er-space-3:  12px;
  --er-space-4:  16px;
  --er-space-5:  24px;
  --er-space-6:  32px;
  --er-space-7:  48px;
  --er-space-8:  64px;
  --er-space-9:  96px;
  --er-space-10: 128px;

  /* ---------- Radii — refined, unflashy ---------- */
  --er-radius-xs: 2px;
  --er-radius-sm: 4px;
  --er-radius-md: 6px;    /* default for cards, inputs, buttons */
  --er-radius-lg: 10px;
  --er-radius-xl: 18px;
  --er-radius-pill: 999px;

  /* ---------- Shadows — muted, grounded. No floaty drop shadows. ---------- */
  --er-shadow-hairline: 0 0 0 1px var(--er-hairline);
  --er-shadow-1: 0 1px 0 rgba(7, 42, 26, 0.04), 0 0 0 1px var(--er-hairline);
  --er-shadow-2: 0 1px 2px rgba(7, 42, 26, 0.06), 0 0 0 1px var(--er-hairline);
  --er-shadow-3: 0 8px 24px -12px rgba(7, 42, 26, 0.22), 0 0 0 1px var(--er-hairline);

  /* ---------- Motion ---------- */
  --er-ease:      cubic-bezier(.32,.72,.28,1);      /* calm, grounded                     */
  --er-ease-out:  cubic-bezier(.22,.9,.28,1);
  --er-dur-fast:  140ms;
  --er-dur-med:   240ms;
  --er-dur-slow:  420ms;

  /* ---------- Layout ---------- */
  --er-container-sm: 640px;
  --er-container-md: 880px;
  --er-container-lg: 1200px;
  --er-container-xl: 1440px;
}

/* ============================================================
   BASE ELEMENTS
   Apply lightly — most apps will override. Included so a bare
   <h1>, <p>, <a> etc. look correct out of the box.
   ============================================================ */

.er-base, .er-base * { box-sizing: border-box; }

.er-base {
  background: var(--er-bg);
  color: var(--er-text);
  font-family: var(--er-font-body);
  font-weight: 300;
  font-size: var(--er-size-body);
  line-height: var(--er-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.er-base h1, .er-base h2, .er-base h3, .er-base h4,
.er-h1, .er-h2, .er-h3, .er-h4, .er-display {
  font-family: var(--er-font-display);
  color: var(--er-text-heading);
  font-weight: 500;
  letter-spacing: var(--er-track-tight);
  line-height: var(--er-leading-tight);
  margin: 0 0 var(--er-space-4);
}

.er-display { font-size: var(--er-size-display-xl); text-transform: none; }
.er-base h1, .er-h1 { font-size: var(--er-size-h1); }
.er-base h2, .er-h2 { font-size: var(--er-size-h2); }
.er-base h3, .er-h3 { font-size: var(--er-size-h3); line-height: var(--er-leading-snug); }

.er-base h4, .er-h4,
.er-subhead {
  font-family: var(--er-font-sub);
  font-weight: 500;
  font-size: var(--er-size-h4);
  line-height: var(--er-leading-snug);
  letter-spacing: 0;
  color: var(--er-text-heading);
}

.er-eyebrow {
  font-family: var(--er-font-sub);
  font-weight: 500;
  font-size: var(--er-size-eyebrow);
  letter-spacing: var(--er-track-xwide);
  text-transform: uppercase;
  color: var(--er-text-muted);
}

.er-base p, .er-body {
  font-family: var(--er-font-body);
  font-weight: 300;
  font-size: var(--er-size-body);
  line-height: var(--er-leading-loose);
  color: var(--er-text);
  max-width: 68ch;
  text-wrap: pretty;
}
.er-body-lg { font-size: var(--er-size-body-lg); line-height: var(--er-leading-normal); }
.er-body-sm { font-size: var(--er-size-body-sm); line-height: var(--er-leading-normal); }
.er-caption { font-size: var(--er-size-caption); color: var(--er-text-muted); }

.er-base a, .er-link {
  color: var(--er-text-link);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--er-text-link) 40%, transparent);
  transition: color var(--er-dur-fast) var(--er-ease), border-color var(--er-dur-fast) var(--er-ease);
}
.er-base a:hover, .er-link:hover {
  color: var(--er-jungle-green);
  border-color: var(--er-jungle-green);
}

/* Dark-surface inversion — add .er-on-dark to any container that sits on Jungle / Bush / Ocean / Outer Space */
.er-on-dark {
  color: var(--er-text-on-dark);
}
.er-on-dark h1, .er-on-dark h2, .er-on-dark h3, .er-on-dark h4,
.er-on-dark .er-h1, .er-on-dark .er-h2, .er-on-dark .er-h3, .er-on-dark .er-h4,
.er-on-dark .er-display, .er-on-dark .er-subhead {
  color: var(--er-head-on-dark);
}
.er-on-dark .er-eyebrow { color: var(--er-text-on-dark-muted); }
.er-on-dark p, .er-on-dark .er-body { color: var(--er-text-on-dark); }
.er-on-dark a, .er-on-dark .er-link {
  color: var(--er-kini-aurum);
  border-bottom-color: color-mix(in srgb, var(--er-kini-aurum) 50%, transparent);
}
.er-on-dark a:hover { color: var(--er-white); border-color: var(--er-white); }

/* Utility rule treatments the brand uses repeatedly */
.er-rule {
  display: block;
  height: 1px;
  background: var(--er-hairline);
  border: 0;
  margin: var(--er-space-5) 0;
}
.er-rule-ocean {
  background: var(--er-ocean);
  height: 2px;
}
.er-rule-vertical {
  width: 2px;
  background: var(--er-ocean);
  align-self: stretch;
}
