/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/

/* =====================================================================
   SISTEMA TIPOGRAFICO – GEIST VARIABLE
   =====================================================================

   ATTENZIONE: la tipografia globale è gestita da QUESTO file,
   non dal pannello di Avada.
   Modificare Font Size / Line Height / Letter Spacing / Variant
   in Avada > Options > Typography NON ha effetto su H1–H6 e body:
   i valori vengono sovrascritti qui sotto tramite le variabili
   --h1_typography-*, --body_typography-*, ecc.

   ---------------------------------------------------------------------
   FONT
   ---------------------------------------------------------------------
   - Geist Variable (TTF), pesi 100–900 in un unico file
   - File: /wp-content/uploads/2026/10/Geist-VariableFont-wght.ttf
   - Caricato anche in Avada > Options > Typography > Custom Fonts
     con nome "Geist" (serve solo per vederlo nei menu di Avada)
   - Preload: functions.php del child theme
   - Se si cambia file/percorso, aggiornare SIA la @font-face qui sotto
     SIA il preload in functions.php (devono puntare allo stesso file)
   - Avada mostra solo "Normal 400" per i font custom: è normale,
     i pesi reali sono gestiti da questo CSS

   ---------------------------------------------------------------------
   SCALA FLUIDA (clamp)
   ---------------------------------------------------------------------
   Mobile 375px: base 16px, ratio 1.2
   Desktop 1440px: base 18px, ratio 1.333

   Token       Uso           Mobile    Desktop   Peso
   --fs-6      Display       48px      101px     (eredita)
   --fs-5      H1            40px      76px      800
   --fs-4      H2            33px      57px      700
   --fs-3      H3            28px      43px      700
   --fs-2      H4            23px      32px      600
   --fs-1      H5            19px      24px      600
   --fs-base   H6 / body     16px      18px      500 / 400
   --fs-sm     Small/label   13px      13.5px    (eredita)

   ---------------------------------------------------------------------
   COME USARLO NEGLI ELEMENTI AVADA
   ---------------------------------------------------------------------
   1. Scegliere il tag (H1–H6, p) in base alla struttura/SEO
   2. Lasciare VUOTI i campi tipografici dell'elemento
      (Font Size, Line Height, Letter Spacing, Variant)
   3. Per le eccezioni usare il campo "CSS Class" con le classi sotto
      (più classi separate da spazio, es: "fs-display fw-300")

   Classi peso (peso esatto indicato dal numero):
   fw-100  fw-200  fw-300  fw-400  fw-500
   fw-600  fw-700  fw-800  fw-900
   (700 = grassetto classico, 800 = extra-bold)

   Classi dimensione (staccano la taglia visiva dal tag):
   fs-display  fs-h1  fs-h2  fs-h3  fs-h4  fs-h5  fs-body  fs-small

   Classe speciale:
   eyebrow  = testo piccolo, maiuscolo, spaziato, peso 600
              (label sopra i titoli)

   ---------------------------------------------------------------------
   NOTE
   ---------------------------------------------------------------------
   - Avada > Options > Responsive > Responsive Typography Sensitivity
     deve restare a 0, altrimenti interferisce con i clamp()
   - Dopo ogni modifica: Avada > Options > Performance >
     Reset Avada Caches + svuotare cache plugin/CDN
   - DA VERIFICARE: le variabili dei Typography set (--awb-typography*)
     non sono ancora state controllate in DevTools
   ===================================================================== */


/* =========================================
   1. FONT-FACE
   ========================================= */
@font-face {
  font-family: 'Geist';
  src: url('/wp-content/uploads/2026/10/Geist-VariableFont-wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* =========================================
   2. TOKEN + OVERRIDE GLOBALI AVADA
   ========================================= */
html:root {

  /* --- Token dimensioni (scala fluida) --- */
  --fs-sm:   clamp(0.8333rem, 0.8296rem + 0.0160vw, 0.8438rem);
  --fs-base: clamp(1.0000rem, 0.9560rem + 0.1878vw, 1.1250rem);
  --fs-1:    clamp(1.2000rem, 1.0944rem + 0.4507vw, 1.5000rem);
  --fs-2:    clamp(1.4400rem, 1.2428rem + 0.8413vw, 2.0000rem);
  --fs-3:    clamp(1.7280rem, 1.3983rem + 1.4066vw, 2.6644rem);
  --fs-4:    clamp(2.0736rem, 1.5531rem + 2.2207vw, 3.5520rem);
  --fs-5:    clamp(2.4883rem, 1.6972rem + 3.3756vw, 4.7350rem);
  --fs-6:    clamp(2.9860rem, 1.8150rem + 4.9962vw, 6.3110rem);

  /* --- H1 --- */
  --h1_typography-font-size: var(--fs-5);
  --h1_typography-font-weight: 800;
  --h1_typography-line-height: 1.05;
  --h1_typography-letter-spacing: -0.035em;

  /* --- H2 --- */
  --h2_typography-font-size: var(--fs-4);
  --h2_typography-font-weight: 700;
  --h2_typography-line-height: 1.1;
  --h2_typography-letter-spacing: -0.03em;

  /* --- H3 --- */
  --h3_typography-font-size: var(--fs-3);
  --h3_typography-font-weight: 700;
  --h3_typography-line-height: 1.15;
  --h3_typography-letter-spacing: -0.02em;

  /* --- H4 --- */
  --h4_typography-font-size: var(--fs-2);
  --h4_typography-font-weight: 600;
  --h4_typography-line-height: 1.2;
  --h4_typography-letter-spacing: -0.015em;

  /* --- H5 --- */
  --h5_typography-font-size: var(--fs-1);
  --h5_typography-font-weight: 600;
  --h5_typography-line-height: 1.3;
  --h5_typography-letter-spacing: -0.01em;

  /* --- H6 --- */
  --h6_typography-font-size: var(--fs-base);
  --h6_typography-font-weight: 500;
  --h6_typography-line-height: 1.3;
  --h6_typography-letter-spacing: 0em;

  /* --- Body --- */
  --body_typography-font-size: var(--fs-base);
  --body_typography-font-weight: 400;
  --body_typography-line-height: 1.55;
  --body_typography-letter-spacing: 0em;

  /* --- Global Typography set (Typography 1–5) ---
     DA VERIFICARE in DevTools al primo utilizzo */
  --awb-typography1-font-weight: 700;
  --awb-typography2-font-weight: 600;
  --awb-typography3-font-weight: 500;
  --awb-typography4-font-weight: 400;
  --awb-typography5-font-weight: 400;
}


/* =========================================
   3. CLASSI PESO
   Uso: campo "CSS Class" dell'elemento Avada
   ========================================= */
.fw-100, .fw-100 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 100 !important; }
.fw-200, .fw-200 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 200 !important; }
.fw-300, .fw-300 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 300 !important; }
.fw-400, .fw-400 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 400 !important; }
.fw-500, .fw-500 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 500 !important; }
.fw-600, .fw-600 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 600 !important; }
.fw-700, .fw-700 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 700 !important; }
.fw-800, .fw-800 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 800 !important; }
.fw-900, .fw-900 :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-weight: 900 !important; }


/* =========================================
   4. CLASSI DIMENSIONE
   Uso: campo "CSS Class" dell'elemento Avada
   (stacca la taglia visiva dal tag SEO,
   es. un H2 grande come un display)
   ========================================= */
.fs-display, .fs-display :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-6) !important;    line-height: 1 !important;    letter-spacing: -0.04em !important; }
.fs-h1,      .fs-h1      :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-5) !important;    line-height: 1.05 !important; letter-spacing: -0.035em !important; }
.fs-h2,      .fs-h2      :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-4) !important;    line-height: 1.1 !important;  letter-spacing: -0.03em !important; }
.fs-h3,      .fs-h3      :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-3) !important;    line-height: 1.15 !important; letter-spacing: -0.02em !important; }
.fs-h4,      .fs-h4      :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-2) !important;    line-height: 1.2 !important;  letter-spacing: -0.015em !important; }
.fs-h5,      .fs-h5      :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-1) !important;    line-height: 1.3 !important;  letter-spacing: -0.01em !important; }
.fs-body,    .fs-body    :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-base) !important; line-height: 1.55 !important; letter-spacing: 0em !important; }
.fs-small,   .fs-small   :is(h1,h2,h3,h4,h5,h6,p,a,span,li) { font-size: var(--fs-sm) !important;   line-height: 1.45 !important; letter-spacing: 0.01em !important; }


/* =========================================
   5. EYEBROW
   Label piccola maiuscola sopra i titoli
   ========================================= */
.eyebrow, .eyebrow :is(h1,h2,h3,h4,h5,h6,p,a,span,li) {
  font-size: var(--fs-sm) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}