/* ==========================================================================
   ECOWASH — design tokens v1.0
   Brandbook chapter 07. Loaded first; no component may hardcode a colour.
   ========================================================================== */

@font-face{
  font-family:'Montserrat';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('../fonts/montserrat-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Montserrat';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'Aboreto';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('../fonts/aboreto-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Aboreto';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('../fonts/aboreto-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root{
  /* --- Brand palette. Never redefined. --- */
  --ew-sorgente:#65D8F8;
  --ew-flusso:#0374E4;
  --ew-corrente:#004CB7;
  --ew-profondo:#06355F;
  --ew-abisso:#000F25;
  --ew-acciaio:#42789E;
  --ew-foglia:#7ABA3B;
  --ew-bosco:#33743F;
  --ew-segnale:#FF0000;

  /* --- Interface semantics --- */
  --ew-bg:#FFFFFF;
  --ew-bg-alt:#EEF3F9;
  --ew-bg-dark:var(--ew-abisso);
  --ew-ink:#04142B;
  --ew-body:#3B5271;
  /* Muted carries tile descriptions and help text, so it is body copy in
     practice. #6C8299 measured 3.97:1 on white and 3.5:1 on Bg-alt — both
     under AA. This passes on both grounds (5.18 and 4.65). */
  --ew-muted:#59708A;
  --ew-line:#DDE7F1;
  --ew-line-2:#C4D6E5;

  --ew-primary:var(--ew-flusso);
  --ew-primary-hover:var(--ew-corrente);
  --ew-primary-soft:#E8F1FD;
  --ew-primary-ink:var(--ew-profondo);

  /* Foglia is a fill colour, never a text colour: white on #7ABA3B fails WCAG
     at 2.36. Green text and green buttons use Bosco, which passes at 5.66. */
  --ew-success:var(--ew-bosco);
  --ew-success-soft:#EDF6E4;
  --ew-danger:#D40000;
  --ew-danger-soft:#FDECEC;

  --ew-focus:0 0 0 4px var(--ew-primary-soft);

  /* --- Gradients --- */
  --ew-grad-acqua:linear-gradient(160deg,#65D8F8,#004CB7);
  --ew-grad-abisso:linear-gradient(160deg,#000F25,#0374E4);
  --ew-grad-foglia:linear-gradient(160deg,#33743F,#7ABA3B);
  --ew-grad-filo:linear-gradient(90deg,#65D8F8,#0374E4 42%,#7ABA3B);

  /* --- Brand graphics. Paths are relative to this stylesheet. --- */
  --ew-pattern:url('../img/pattern.png');
  --ew-mark:url('../img/mark.png');
  --ew-mark-white:url('../img/mark-white.png');

  /* --- Type --- */
  --ew-font-display:'Aboreto',Georgia,'Times New Roman',serif;
  --ew-font-ui:'Montserrat',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;

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

  /* --- Radii --- */
  --r-sm:10px; --r-md:16px; --r-lg:24px; --r-xl:34px; --r-pill:999px;

  /* --- Elevation. Built on Profondo, not black, to stay in the cool range. --- */
  --ring:0 0 0 1px rgba(6,53,95,.06);
  --sh-1:0 1px 2px rgba(6,53,95,.05);
  --sh-2:0 2px 8px rgba(6,53,95,.07),0 16px 36px -20px rgba(6,53,95,.30);
  --sh-3:0 4px 14px rgba(6,53,95,.09),0 30px 64px -24px rgba(6,53,95,.36);

  /* --- Motion --- */
  --mo-fast:120ms ease-out;
  --mo-base:180ms cubic-bezier(.2,.7,.3,1);
  --mo-slow:320ms cubic-bezier(.2,.7,.3,1);

  /* --- Layers --- */
  --z-header:100; --z-sticky:200; --z-overlay:900; --z-modal:1000; --z-toast:1100;

  /* --- Layout --- */
  --container:1200px;
  --container-narrow:760px;
  --gutter:20px;
  --section-y:var(--sp-8);
}

@media (min-width:768px){
  :root{ --gutter:32px; --section-y:80px; }
}
@media (min-width:1024px){
  :root{ --gutter:40px; --section-y:var(--sp-9); }
}
@media (min-width:1280px){
  :root{ --gutter:48px; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}
