/* ==========================================================================
   EcoFlow Cleaning — Design Tokens v1.0
   Palette and typography rebuilt from the company brand materials
   (logo, 2026 brochure). Layers: primitive, semantic, component.
   Components use var() only, never a hard-coded hex value.
   ========================================================================== */

:root {
  /* ---------- 1. PRIMITIVES ---------------------------------------------- */

  /* ── Exact colors taken from the vector logo (Logo/ecoflow-logo.svg) ──
     #010066 silhouette and brush, #008AC8 house, sparkles and wordmark, #8FBB48 leaves and the word EcoFlow */

  /* Navy, the main brand color: headings and the primary action */
  --ef-navy-950: #01004A;
  --ef-navy-900: #010066;   /* from the logo */
  --ef-navy-700: #2A2F8A;
  --ef-navy-400: #7B80C0;
  --ef-navy-200: #C6C8E5;
  --ef-navy-100: #E9EAF6;

  /* Sky, the blue from the logo: icons, info panels, links */
  --ef-sky-700: #00679A;    /* darkened, usable for text */
  --ef-sky-500: #008AC8;    /* from the logo */
  --ef-sky-200: #B3DFF3;
  --ef-sky-100: #E5F4FC;

  /* Leaf, the green from the logo: accents, tags, highlights. Not for small text */
  --ef-leaf-700: #4E6B21;   /* darkened, for text on light surfaces */
  --ef-leaf-600: #6E9433;
  --ef-leaf-500: #8FBB48;   /* from the logo */
  --ef-leaf-200: #DCEAC3;
  --ef-leaf-100: #F2F7E9;

  /* Forest, the dark green from the brochure cover: background of dark sections */
  --ef-forest-900: #0E3A2F;
  --ef-forest-800: #144A3C;
  --ef-forest-600: #1F6B57;
  --ef-forest-200: #BFD8CF;
  --ef-forest-100: #E4EFEA;

  /* Cream, warm backgrounds */
  --ef-cream-50:  #FBF8F4;
  --ef-cream-100: #F5F0E9;
  --ef-cream-200: #EDE3D6;
  --ef-cream-300: #DCCDBA;

  /* Ink */
  --ef-ink-900: #16193A;
  --ef-ink-700: #383D5E;
  --ef-ink-500: #5E6380;
  --ef-ink-400: #8A8FA6;

  /* Status */
  --ef-danger-600: #B3392C;
  --ef-danger-100: #F8E5E2;
  --ef-success-600: var(--ef-forest-600);

  /* Type families */
  --ef-font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --ef-font-body:    "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Type scale, ratio 1.25, rounded to whole pixels */
  --ef-text-2xs: 12px;
  --ef-text-xs:  13px;
  --ef-text-sm:  15px;
  --ef-text-md:  17px;
  --ef-text-lg:  20px;
  --ef-text-xl:  26px;
  --ef-text-2xl: 34px;
  --ef-text-3xl: 44px;
  --ef-text-4xl: 56px;

  --ef-leading-tight: 1.1;
  --ef-leading-snug:  1.28;
  --ef-leading-body:  1.6;

  --ef-tracking-tight: -0.015em;
  --ef-tracking-flat:  0;
  --ef-tracking-wide:  0.1em;

  /* Spacing, 4px base */
  --ef-space-1: 4px;
  --ef-space-2: 8px;
  --ef-space-3: 12px;
  --ef-space-4: 16px;
  --ef-space-5: 24px;
  --ef-space-6: 32px;
  --ef-space-7: 48px;
  --ef-space-8: 64px;
  --ef-space-9: 96px;
  --ef-space-10: 128px;

  /* Radius: brand materials use soft corners, never full capsules */
  --ef-radius-sm: 4px;
  --ef-radius-md: 8px;
  --ef-radius-lg: 16px;
  --ef-radius-pill: 999px;

  /* Elevation, soft with a blue undertone */
  --ef-shadow-sm: 0 1px 2px rgba(20, 27, 58, .08);
  --ef-shadow-md: 0 8px 20px -12px rgba(20, 27, 58, .28);
  --ef-shadow-lg: 0 24px 56px -32px rgba(20, 27, 58, .40);

  /* Motion */
  --ef-ease: cubic-bezier(.2, .8, .3, 1);
  --ef-duration-fast: 140ms;
  --ef-duration-base: 220ms;

  /* Layout */
  --ef-container: 1200px;
  --ef-gutter: 24px;
  --ef-measure: 66ch;

  /* ---------- 2. SEMANTIC ------------------------------------------------- */

  --ef-bg:             var(--ef-cream-50);
  --ef-bg-subtle:      var(--ef-cream-100);
  --ef-surface:        #FFFFFF;
  --ef-surface-sunk:   var(--ef-cream-100);
  --ef-surface-invert: var(--ef-forest-800);

  --ef-text:           var(--ef-ink-900);
  --ef-text-muted:     var(--ef-ink-500);
  --ef-text-invert:    var(--ef-cream-50);
  --ef-text-heading:   var(--ef-navy-900);

  --ef-border:         var(--ef-cream-300);
  --ef-border-strong:  var(--ef-navy-400);

  --ef-brand:          var(--ef-navy-900);   /* primary action, logo color */
  --ef-brand-hover:    var(--ef-navy-950);
  --ef-brand-soft:     var(--ef-navy-100);

  --ef-accent:         var(--ef-leaf-500);     /* accent: highlights, call button */
  --ef-accent-hover:   var(--ef-leaf-600);
  --ef-accent-text:    var(--ef-leaf-700);   /* green that works for small text */
  --ef-accent-soft:    var(--ef-leaf-100);

  --ef-info:           var(--ef-sky-500);      /* secondary accent: icons, info */
  --ef-info-text:      var(--ef-sky-700);      /* sky blue that works for text */
  --ef-info-soft:      var(--ef-sky-100);

  --ef-link:           var(--ef-sky-700);
  --ef-focus:          var(--ef-sky-700);
  --ef-danger:         var(--ef-danger-600);
  --ef-success:        var(--ef-success-600);

  /* ---------- 3. COMPONENT ------------------------------------------------ */

  --ef-btn-height:        52px;
  --ef-btn-height-sm:     44px;
  --ef-btn-padding-x:     var(--ef-space-5);
  --ef-btn-radius:        var(--ef-radius-md);
  --ef-btn-primary-bg:    var(--ef-brand);
  --ef-btn-primary-fg:    #FFFFFF;
  --ef-btn-primary-hover: var(--ef-brand-hover);
  --ef-btn-accent-bg:     var(--ef-accent);
  --ef-btn-accent-fg:     var(--ef-navy-900);
  --ef-btn-accent-hover:  var(--ef-accent-hover);
  --ef-btn-secondary-fg:  var(--ef-brand);
  --ef-btn-secondary-border: var(--ef-brand);

  --ef-card-bg:      var(--ef-surface);
  --ef-card-border:  var(--ef-border);
  --ef-card-radius:  var(--ef-radius-lg);
  --ef-card-padding: var(--ef-space-5);

  --ef-input-height: 52px;
  --ef-input-size:   16px;        /* below 16px iOS zooms the page on focus */
  --ef-input-border: var(--ef-border);
  --ef-input-focus:  var(--ef-focus);

  --ef-price-size:   var(--ef-text-2xl);

  /* The logo is always SVG. PNG only where SVG is not accepted, such as some directories. */
  --ef-logo-src:         url("Logo/ecoflow-logo.svg");
  --ef-logo-inverse-src: url("Logo/ecoflow-logo-inverse.svg");
  --ef-logo-mark-src:    url("Logo/ecoflow-mark.svg");
  --ef-logo-height:      52px;   /* in the site header */
  --ef-logo-height-sm:   42px;   /* on mobile */
  --ef-logo-min-height:  40px;   /* below this, use the mark without the wordmark */
  --ef-divider:      var(--ef-sky-500);      /* brand divider line */
  --ef-divider-mark: var(--ef-leaf-500);     /* leaf in the middle of the divider */
}

/* Dark surface. Applied to a section, never to the whole page. */
[data-theme="invert"] {
  --ef-bg:            var(--ef-forest-900);
  --ef-bg-subtle:     var(--ef-forest-800);
  --ef-surface:       var(--ef-forest-800);
  --ef-surface-sunk:  var(--ef-forest-900);
  --ef-text:          var(--ef-cream-50);
  --ef-text-muted:    var(--ef-forest-200);
  --ef-text-heading:  #FFFFFF;
  --ef-border:        rgba(255, 255, 255, .18);
  --ef-border-strong: var(--ef-leaf-500);
  --ef-link:          var(--ef-leaf-500);
  --ef-focus:         var(--ef-leaf-500);
  --ef-btn-primary-bg: var(--ef-accent);
  --ef-btn-primary-fg: var(--ef-navy-900);
  --ef-btn-primary-hover: var(--ef-accent-hover);
  --ef-logo-src: var(--ef-logo-inverse-src);
  --ef-btn-secondary-fg: var(--ef-cream-50);
  --ef-btn-secondary-border: rgba(255, 255, 255, .45);
}

@media (prefers-reduced-motion: reduce) {
  :root { --ef-duration-fast: 0ms; --ef-duration-base: 0ms; }
}
