/* =============================================================
   Solmateria — Design Tokens
   Single source of truth. Palette sampled pixel-exact from the
   logo. The narrative scroll warms cold -> warm along the brand
   ramp: slate -> steel -> warm orange -> orange-red.
   ============================================================= */

:root {
  /* Dark site: native UI (select dropdowns, autofill, scrollbars) follows */
  color-scheme: dark;

  /* ---------------------------------------------------------
     1. BRAND — exact logo pixels
     --------------------------------------------------------- */
  --brand-slate:      #1F2E3E; /* bleu ardoise foncé  — dormant, constat */
  --brand-steel-deep: #294165; /* bleu acier profond  — transition       */
  --brand-steel:      #315787; /* bleu acier moyen    — accent froid      */
  --brand-orange:     #F68C38; /* orange chaud        — énergie active    */
  --brand-orange-red: #EE6043; /* orange-rouge        — accent le + chaud */

  /* ---------------------------------------------------------
     2. SEMANTIC ALIASES
     --------------------------------------------------------- */
  --color-bg:            var(--brand-slate);
  --color-bg-elevated:   #243750;            /* cards on dark            */
  --color-surface:       #0F1822;            /* deepest (hero top)       */
  --color-accent:        var(--brand-orange);
  --color-accent-strong: var(--brand-orange-red);
  --color-link:          var(--brand-orange);

  /* Text on dark backgrounds — tuned for mobile-in-sunlight legibility.
     Ratios measured on --brand-slate #1F2E3E. */
  --color-text:        #EEF2F7;  /* primary   — ~14.5:1 */
  --color-text-muted:  #B8C6D8;  /* secondary — ~8.1:1  */
  --color-text-subtle: #93A6BE;  /* tertiary  — ~5.4:1 (passes AA for body) */

  /* Hairlines / borders on dark — raised so they stay visible on bright screens */
  --color-border:        rgba(180, 197, 216, 0.22);
  --color-border-strong: rgba(180, 197, 216, 0.40);

  /* ---------------------------------------------------------
     3. NARRATIVE — the cold->warm scroll ramp
     --------------------------------------------------------- */
  --ramp-0: var(--brand-slate);       /* hero / constat            */
  --ramp-1: var(--brand-steel-deep);  /* BIPV                       */
  --ramp-2: var(--brand-steel);       /* gamme                      */
  --ramp-3: #8E6A57;                   /* pour qui — point de bascule */
  --ramp-4: var(--brand-orange);      /* étapes / preuves           */
  --ramp-5: var(--brand-orange-red);  /* CTA final                  */

  --gradient-narrative: linear-gradient(
    180deg,
    var(--ramp-0) 0%,
    var(--ramp-1) 22%,
    var(--ramp-2) 42%,
    var(--ramp-3) 62%,
    var(--ramp-4) 82%,
    var(--ramp-5) 100%
  );
  --gradient-warm: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-red) 100%);
  --gradient-cold: linear-gradient(135deg, var(--brand-steel) 0%, var(--brand-steel-deep) 100%);

  /* Filament guide */
  --filament-color: var(--brand-orange-red);
  --filament-glow:  0 0 12px rgba(238, 96, 67, 0.55);
  --filament-width: 2px;

  /* ---------------------------------------------------------
     4. TYPOGRAPHY — Inter variable
     --------------------------------------------------------- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Fluid scale (mobile-first; clamp grows to desktop). */
  --text-xs:   0.78rem;
  --text-sm:   0.88rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);   /* 16 -> 17 */
  --text-lg:   clamp(1.13rem, 1.05rem + 0.4vw, 1.25rem);
  --text-xl:   clamp(1.35rem, 1.2rem + 0.7vw, 1.6rem);
  --text-2xl:  clamp(1.7rem, 1.4rem + 1.4vw, 2.25rem);
  --text-3xl:  clamp(2.1rem, 1.6rem + 2.4vw, 3rem);
  --text-display: clamp(2.6rem, 1.7rem + 4.4vw, 4.5rem);

  --leading-tight: 1.12;
  --leading-snug:  1.3;
  --leading-body:  1.65;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.14em;   /* suraccroches / eyebrows */

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;

  /* ---------------------------------------------------------
     5. SPACING — 4px base
     --------------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 2.5rem;
  --space-16: 3.25rem;
  --space-24: 5rem;
  --space-32: 6.5rem;
  --section-pad: clamp(2.6rem, 1.5rem + 4.4vw, 5.25rem); /* vertical rhythm per section (~12% tighter than 3/1.75+5vw/6; clamp breakpoints preserved) */

  /* ---------------------------------------------------------
     6. LAYOUT
     --------------------------------------------------------- */
  --container: 1180px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 0.8rem + 3vw, 2.5rem);

  /* ---------------------------------------------------------
     7. RADIUS / SHADOW / Z
     --------------------------------------------------------- */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(8, 14, 22, 0.3);
  --shadow:    0 12px 30px -12px rgba(8, 14, 22, 0.5);
  --shadow-lg: 0 30px 60px -20px rgba(8, 14, 22, 0.6);

  --z-base: 1;
  --z-filament: 10;
  --z-nav: 30;
  --z-overlay: 40;
  --z-modal: 50;

  /* ---------------------------------------------------------
     8. MOTION
     --------------------------------------------------------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur:      320ms;
  --dur-slow: 700ms;
  --reveal-distance: 28px;
}
