/* ==========================================================================
   Ratio42 -- Brand override "Evergreen" (dark)
   Allinea il tema compilato (theme.css) alle Brand Guidelines v1.0.
   Caricato DOPO theme.css: ridefinisce palette e font senza toccare il
   file generato da YOOtheme.

   Palette Evergreen:
     Pine   #0B2B28  primario -- sfondi, testo scuro
     Teal   #0F6B68  secondario -- pannelli, sezioni
     Lime   #CDF35A  accento -- bottoni, highlight
     Dew    #F0F7E8  mute -- testo chiaro, pannelli tintati
     Paper  #FBFCF8  base
   Font: Instrument Sans (display e testo) + IBM Plex Mono (label, dati, codice)
   ========================================================================== */

/* ---- Font self-hosted (coerente con il resto del sito, no CDN) ---- */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/instrument-sans-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: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/instrument-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Token di brand ---- */
:root {
  --r42-pine:  #0B2B28;
  --r42-teal:  #0F6B68;
  --r42-lime:  #CDF35A;
  --r42-dew:   #F0F7E8;
  --r42-paper: #FBFCF8;
  /* Pannelli: Pine piu' profondo per lo sfondo pagina, Pine standard per le card */
  --r42-pine-deep: #072420;
  --r42-pine-panel: #103833; /* card su sfondo pagina, leggermente staccata */
  --r42-dew-70: rgba(240, 247, 232, 0.78); /* body text su Pine -- resta AA */
  --r42-dew-55: rgba(240, 247, 232, 0.6);  /* testo muted */
  --r42-hair:  rgba(240, 247, 232, 0.14);  /* bordi/divider */
}

/* ---- Base: sfondo e testo ---- */
html {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--r42-pine-deep);
  color: var(--r42-dew-70);
}

/* ---- Tipografia ---- */
.uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6,
h1, h2, h3, h4, h5, h6,
.uk-heading-small, .uk-heading-medium, .uk-heading-large,
.uk-heading-xlarge, .uk-heading-2xlarge, .uk-heading-3xlarge,
blockquote,
.uk-description-list > dt {
  font-family: 'Instrument Sans', sans-serif;
  color: var(--r42-dew);
}

/* La parola "design"/"integrate" dell'hero (serif-thin) resta accento tipografico */
.serif-thin { font-family: 'Instrument Sans', sans-serif; font-weight: 400; font-style: italic; }

/* Label, metadati, cifre, codice -> IBM Plex Mono */
.uk-text-meta,
.uk-table th,
figcaption,
blockquote footer,
:not(pre) > code, :not(pre) > kbd, :not(pre) > samp,
pre, pre code {
  font-family: 'IBM Plex Mono', monospace;
}

/* ---- Link e accento ---- */
.uk-link, a { color: var(--r42-lime); }
.uk-link:hover, a:hover,
.uk-link-toggle:hover .uk-link { color: var(--r42-dew); }
.uk-link-heading a:hover,
.uk-link-toggle:hover .uk-link-heading,
a.uk-link-heading:hover { color: var(--r42-lime); }
.uk-link-text a:hover,
.uk-link-toggle:hover .uk-link-text,
a.uk-link-text:hover { color: var(--r42-dew); }

em, :not(pre) > code { color: var(--r42-lime); }
.uk-list-primary > ::marker { color: var(--r42-lime) !important; }

/* ---- Sezioni ---- */
.uk-section-default { background: var(--r42-pine); }
.uk-section-default.uk-inverse-light,
.uk-section-primary { background: var(--r42-pine); }
.uk-section-muted { background: var(--r42-teal); }

/* ---- Card ---- */
.uk-card-default {
  background: var(--r42-pine-panel);
  color: var(--r42-dew-70);
}
.uk-card-primary {
  background: var(--r42-teal);
  color: var(--r42-dew);
}
.uk-card-default .uk-card-title,
.uk-card-primary .uk-card-title { color: var(--r42-dew); }
/* Testo e citazioni dentro la card Teal: il tema li scurisce (inverse), li riporto a Dew.
   Selettore allineato a quello del tema (.uk-card-primary.uk-card-body ...) + !important
   per vincere la specificita' delle regole inverse generate. */
.uk-card-primary,
.uk-card-primary p,
.uk-card-primary li,
.uk-card-primary.uk-card-body blockquote,
.uk-card-primary.uk-card-body blockquote p,
.uk-card-primary.uk-card-body blockquote footer,
.uk-card-primary blockquote,
.uk-card-primary blockquote p,
.uk-card-primary cite { color: var(--r42-dew) !important; }
.uk-card-primary blockquote footer,
.uk-card-primary blockquote cite { color: var(--r42-dew-70) !important; }
/* Heading, testo forte e descrizioni dentro la card Teal: il tema li rende scuri (inverse) */
.uk-card-primary h1, .uk-card-primary h2, .uk-card-primary h3,
.uk-card-primary h4, .uk-card-primary h5, .uk-card-primary h6,
.uk-card-primary .uk-h1, .uk-card-primary .uk-h2, .uk-card-primary .uk-h3,
.uk-card-primary dt, .uk-card-primary strong, .uk-card-primary summary {
  color: var(--r42-dew) !important;
}
/* Link dentro la card Teal: il tema inverse li colora di blu, li riporto a Lime */
.uk-card-primary a,
.uk-card-primary .uk-link {
  color: var(--r42-lime) !important;
}
.uk-card-primary a:hover,
.uk-card-primary .uk-link:hover {
  color: var(--r42-dew) !important;
}

/* ---- Bottoni ---- */
.uk-button-primary,
.uk-button-primary:not(.uk-hack) {
  background: var(--r42-lime) !important;
  color: var(--r42-pine) !important;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  border-radius: 500px;
  box-shadow: none !important;
}
/* Neutralizza il glow neon (pseudo-elementi) del tema sul bottone primario */
.uk-button-primary::before,
.uk-button-primary::after { display: none !important; }
.uk-button-primary:hover,
.uk-button-primary:focus {
  background: var(--r42-dew) !important;
  color: var(--r42-pine) !important;
}
.uk-button-default {
  color: var(--r42-dew);
  border: 1px solid var(--r42-hair);
  border-radius: 500px;
}
.uk-button-default:hover,
.uk-button-default:focus {
  color: var(--r42-pine);
  background: var(--r42-lime);
  border-color: var(--r42-lime);
}

/* ---- Tabelle, divider, bordi ---- */
.uk-table th { color: var(--r42-dew); }
.uk-table-divider > :first-child > tr:not(:first-child),
.uk-table-divider > :not(:first-child) > tr,
.uk-table-divider > tr:not(:first-child),
.uk-hr, hr { border-top-color: var(--r42-hair); }
.uk-table-striped tbody tr:nth-of-type(odd),
.uk-table-striped > tr:nth-of-type(odd) { background: rgba(240, 247, 232, 0.06); }
.uk-table-hover tbody tr:hover { background: rgba(205, 243, 90, 0.08); }

/* Accento su divider decorativi: gradiente Growth (Teal -> Lime) */
.uk-divider-small::after,
.uk-divider-vertical {
  border-image: linear-gradient(90deg, var(--r42-teal) 0%, var(--r42-lime) 100%);
  border-image-slice: 1;
}

/* ---- Navbar / header ---- */
.uk-logo, .uk-navbar-item .uk-logo {
  color: var(--r42-dew);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
}
.uk-navbar-item, .uk-navbar-nav > li > a, .uk-navbar-toggle {
  font-family: 'Instrument Sans', sans-serif;
}
.uk-navbar-nav > li > a { color: var(--r42-dew-70); }
.uk-navbar-nav > li > a:hover,
.uk-navbar-nav > li.uk-active > a { color: var(--r42-lime); }

/* ---- Selezione testo ---- */
::selection { background: var(--r42-lime); color: var(--r42-pine); text-shadow: none; }

/* ---- Switch lingua (bandierina) ---- */
.tm-lang-switch {
  display: inline-flex;
  align-items: center;
  color: var(--r42-dew-70) !important;
  text-transform: none;
}
.tm-lang-switch svg {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--r42-hair);
}
.tm-lang-switch span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.tm-lang-switch:hover,
.tm-lang-switch:focus { color: var(--r42-lime) !important; }
/* Nelle liste navbar il li del selettore non deve avere lo stile link di default del tema */
.uk-navbar-nav > li > a.tm-lang-switch { padding-left: 20px; }

/* ---- Utility: eleva il blocco CTA sopra lo sfondo decorativo (sostituisce lo style inline) ---- */
.tm-cta-raised { z-index: 1; }
