/* ================================================================
   STARTUPWEB.IO — Design System v1.0
   Aesthetic: editorial-tech (panna + verde + terracotta)
   Stack: HTML statico, CSS custom, zero framework
   ================================================================ */

/* ---------- 1. CUSTOM PROPERTIES ---------- */

:root {
  /* Color tokens — palette warm-gold (v2) */
  --ink:        #1a0f08;          /* nero caldo */
  --ink-2:      #2a1d12;          /* marrone scuro */
  --ink-3:      #5c4a37;          /* marrone medio (testi corrente) */
  --ink-4:      #8a7a65;          /* marrone chiaro (testi muted) */
  --ink-5:      #b3a690;          /* warm gray (placeholder) */

  --paper:      #ffffff;          /* bianco puro */
  --paper-2:    #faf6ec;          /* warm cream subtle (per surface secondarie) */
  --paper-3:    #f0e8d2;          /* warm sand (per separazioni) */

  --brand:      #c2410c;          /* terracotta primary */
  --brand-2:    #9a3309;          /* terracotta scuro (hover) */
  --brand-3:    #6b2306;          /* terracotta deep */
  --brand-tint: #fcebe2;          /* tint warm */

  --gold:       #b08d3a;          /* dorato medio (accent tipografico) */
  --gold-2:     #d4ad53;           /* dorato chiaro */
  --gold-deep:  #8a6e2d;          /* dorato scuro */
  --gold-tint:  #f5ecd0;          /* warm cream (icon-tile bg) */

  --amber:      #d97706;          /* ambra (terziario) */
  --amber-tint: #fef3c7;

  --accent-cool:     #5c6234;     /* verde oliva (rassicurazione, GEO featured) */
  --accent-cool-2:   #424828;
  --accent-cool-tint:#ebede0;

  --line:       rgba(26, 15, 8, 0.10);
  --line-2:     rgba(26, 15, 8, 0.18);
  --line-strong:rgba(26, 15, 8, 0.55);

  /* Typography */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Type scale (mobile-first) */
  --fs-xs:   0.75rem;     /* 12 */
  --fs-sm:   0.875rem;    /* 14 */
  --fs-base: 1rem;        /* 16 */
  --fs-md:   1.125rem;    /* 18 */
  --fs-lg:   1.25rem;     /* 20 */
  --fs-xl:   1.5rem;      /* 24 */
  --fs-2xl:  1.875rem;    /* 30 */
  --fs-3xl:  2.25rem;     /* 36 */
  --fs-4xl:  3rem;        /* 48 */
  --fs-5xl:  3.75rem;     /* 60 */
  --fs-6xl:  4.5rem;      /* 72 */

  /* Spacing scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.5rem;
  --sp-6:  2rem;
  --sp-8:  3rem;
  --sp-10: 4rem;
  --sp-12: 5rem;
  --sp-16: 7rem;
  --sp-20: 9rem;
  --sp-24: 12rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --container-wide: 1320px;

  /* Border radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Shadows — minimal, sharp, base warm */
  --shadow-sm: 0 1px 2px rgba(26,15,8,0.04), 0 1px 1px rgba(26,15,8,0.03);
  --shadow-md: 0 4px 12px rgba(26,15,8,0.06), 0 2px 4px rgba(26,15,8,0.04);
  --shadow-lg: 0 10px 30px rgba(26,15,8,0.10), 0 4px 8px rgba(26,15,8,0.05);

  /* Easing */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Header height */
  --header-h: 72px;
}

/* ---------- 2. RESET & BASE ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-weight: 400;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { vertical-align: middle; }

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

a {
  color: inherit;
  text-decoration: none;
  text-decoration-color: currentColor;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--gold); color: var(--ink); }

/* ---------- 3. TYPOGRAPHY ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "SOFT" 50, "WONK" 0;
}

h1 { font-size: clamp(2.25rem, 5vw + 1rem, 4.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 3rem);   letter-spacing: -0.03em; }
h3 { font-size: clamp(1.25rem, 1.5vw + 0.75rem, 1.75rem); letter-spacing: -0.02em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.015em; }
h5 { font-size: var(--fs-md); letter-spacing: -0.01em; font-family: var(--font-body); font-weight: 600; }
h6 { font-size: var(--fs-base); font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }

p { line-height: 1.65; }
p + p { margin-top: 1em; }

.lead {
  font-size: clamp(1.125rem, 1vw + 1rem, 1.375rem);
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 400;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

/* Inline link in body copy */
.prose a, p a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--gold);
}
.prose a:hover, p a:hover {
  color: var(--brand-2);
  text-decoration-color: var(--brand);
}

/* Drop cap (editorial accent) */
.drop-cap::first-letter {
  font-family: var(--font-display);
  font-size: 4em;
  float: left;
  line-height: 0.85;
  margin: 0.1em 0.1em 0 0;
  font-weight: 400;
  color: var(--gold-deep);
}

/* ---------- 4. LAYOUT PRIMITIVES ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container-wide {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .container, .container-narrow, .container-wide { padding-inline: var(--sp-6); }
}

.section { padding-block: var(--sp-12); }
.section-lg { padding-block: var(--sp-16); }

@media (min-width: 768px) {
  .section { padding-block: var(--sp-16); }
  .section-lg { padding-block: var(--sp-20); }
}

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin-block: var(--sp-8);
}

/* Brand-mark divider (decorative) */
.divider-mark {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block: var(--sp-10);
  color: var(--ink-4);
}
.divider-mark::before, .divider-mark::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider-mark .ico { width: 28px; height: auto; opacity: 0.5; }

/* ---------- 5. HEADER & NAV ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.site-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--ink);
  text-decoration: none;
}
.brand__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Wordmark elegante: Fraunces light + dot dorato + io italic */
.brand__wordmark {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: var(--ink);
}
.brand__wordmark .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 4px;
  align-self: center;
  flex-shrink: 0;
}
.brand__wordmark .io {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.brand:hover .brand__wordmark { color: var(--ink-2); }
.brand:hover .brand__wordmark .io { color: var(--brand-2); }

.nav { display: flex; align-items: center; gap: var(--sp-6); }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
}
.nav__link {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  font-weight: 500;
  position: relative;
  padding-block: var(--sp-2);
}
.nav__link:hover { color: var(--brand); }
.nav__link[aria-current="page"] { color: var(--brand); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--ink);
}
.nav-toggle:hover { background: var(--paper-2); }
.nav-toggle .ico { width: 22px; height: 22px; }

/* Mobile: dropdown si trasforma in accordion inline */
@media (max-width: 880px) {
  .nav {
    /* RESET POSIZIONALE ASSOLUTO */
    position: fixed !important;
    top: var(--header-h) !important;
    left: 0 !important;
    width: 100vw !important; /* Forza la larghezza totale del viewport */
    height: calc(100vh - var(--header-h)) !important;
    
    /* SFONDO E STRATI */
    background-color: #ffffff !important;
    z-index: 999999 !important; /* Valore estremo per vincere su tutto */
    
    /* RESET FLEX */
    margin: 0 !important;
    flex: none !important; 
    display: block !important; /* Rimuove flex dal contenitore principale */
    
    /* ANIMAZIONE */
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    
    /* SCROLL */
    overflow-y: auto !important;
    padding: var(--sp-6) !important;
  }

  /* Stato APERTO */
  .nav[data-open="true"] {
    transform: translateX(0) !important;
  }

  /* LISTA INTERNA */
  .nav__list {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .nav__item {
    width: 100% !important;
    border-bottom: 1px solid var(--paper-3);
  }

  .nav__link {
    display: block !important;
    padding: var(--sp-4) 0 !important;
    font-size: var(--fs-lg) !important;
    color: var(--ink) !important;
  }
}
  /* IL CONTENITORE DEL MENU */
  .nav {
    position: fixed;
    /* Si ancora perfettamente sotto la tua site-header */
    top: var(--header-h); 
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important; /* Forza la larghezza totale dello schermo */
    
    /* BACKGROUND SOLIDO: Fondamentale per coprire la Hero sottostante */
    background-color: #ffffff !important; 
    
    display: flex;
    flex-direction: column;
    padding: var(--sp-6);
    
    /* GESTIONE VISIBILITÀ E LIVELLI */
    z-index: 9999 !important; /* Appena sotto la site-header (10000) */
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto; /* Permette lo scroll se i sottomenu sono lunghi */
  }

  /* Stato quando clicchi sull'hamburger */
  .nav[data-open="true"] {
    transform: translateX(0) !important;
  }

  /* RESET LISTA */
  .nav__list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--paper-2);
  }

  .nav__link {
    display: block;
    padding: var(--sp-4) 0;
    font-size: var(--fs-xl);
    color: var(--ink) !important;
    font-weight: 500;
  }

  /* ACCORDEON DEI SOTTOMENU */
  .nav__dropdown {
    position: static; /* Sposta il contenuto verso il basso */
    width: 100%;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s;
    border-left: 2px solid var(--paper-3);
    padding-left: var(--sp-4);
  }

  .nav__item--dropdown[data-open="true"] .nav__dropdown {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    margin-top: var(--sp-2);
    padding-bottom: var(--sp-4);
  }


/* ---------- 5.b NAV DROPDOWN ---------- */

.nav__item--dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.nav__toggle-dropdown {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  line-height: 0;
}
.nav__toggle-dropdown:hover { color: var(--brand); background: var(--paper-2); }
.nav__toggle-dropdown:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.nav__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s var(--ease-out);
}

.nav__item--dropdown:hover .nav__chevron,
.nav__item--dropdown:focus-within .nav__chevron,
.nav__item--dropdown[data-open="true"] .nav__chevron {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: -8px;
  min-width: 260px;
  list-style: none;
  margin: 0;
  padding: var(--sp-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 32px rgba(26, 15, 8, 0.10), 0 2px 8px rgba(26, 15, 8, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s var(--ease-out), transform 0.15s var(--ease-out), visibility 0.15s;
  z-index: 60;
}

.nav__item--dropdown:hover .nav__dropdown,
.nav__item--dropdown:focus-within .nav__dropdown,
.nav__item--dropdown[data-open="true"] .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown li { margin: 0; }
.nav__dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.4;
  transition: background-color 0.15s, color 0.15s;
}
.nav__dropdown a:hover,
.nav__dropdown a:focus-visible {
  background: var(--paper-2);
  color: var(--brand);
}

/* Mobile: dropdown si trasforma in accordion inline */
@media (max-width: 880px) {
  /* 1. SFONDO E POSIZIONAMENTO NAV */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background-color: var(--paper) !important; /* Forza sfondo bianco pieno per contrasto */
    flex-direction: column;
    padding: var(--sp-6);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    border-top: 1px solid var(--paper-3);
    overflow-y: auto; /* Permette lo scroll se il sottomenu è lungo */
    z-index: 1000;
  }

  .nav[data-open="true"] {
    transform: translateX(0);
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: var(--sp-2);
  }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--paper-2);
  }

  /* 2. LINK E TESTO */
  .nav__link {
    color: var(--ink) !important;
    font-size: var(--fs-lg);
    padding: var(--sp-4) 0;
    width: 100%;
    display: block;
    font-weight: 500;
  }

  /* 3. DROPDOWN (ACCORDEON) */
  .nav__item--dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav__toggle-dropdown {
    display: flex;
    padding: var(--sp-4);
    margin-left: auto; /* Spinge il toggle a destra */
  }

  .nav__dropdown {
    position: static; /* Fondamentale: spinge giù il contenuto sottostante */
    width: 100%;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--brand-tint);
    margin: 0;
    padding: 0 0 0 var(--sp-4);
    box-shadow: none;
    transform: none;
    transition: max-height 0.3s var(--ease-out), opacity 0.2s;
    display: block;
  }

  /* 4. STATI DI APERTURA */
  
  /* Reset Hover: impedisce conflitti su touch screen */
  .nav__item--dropdown:hover .nav__dropdown {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
  }

  /* Apertura tramite data-open (gestito da JS) */
  .nav__item--dropdown[data-open="true"] .nav__dropdown {
    max-height: 1000px; /* Valore alto per contenere tutti i link */
    opacity: 1;
    visibility: visible;
    margin-bottom: var(--sp-4);
    margin-top: var(--sp-2);
  }

  /* Rotazione freccia */
  .nav__item--dropdown[data-open="true"] .nav__chevron {
    transform: rotate(180deg);
  }

  .nav__dropdown a {
    font-size: var(--fs-base);
    padding: var(--sp-2) 0;
    color: var(--ink-3);
    display: block;
  }

  /* 5. CTA IN BASSO AL MENU */
  .nav .btn {
    margin-top: var(--sp-6);
    width: 100%;
    justify-content: center;
  }
}

/* ---------- 6. BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.875rem 1.5rem;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn .ico { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--brand-3);
  transform: translateY(-1px);
}
.btn-primary:hover .ico { transform: translateX(2px); }

.btn-brand {
  background: var(--brand);
  color: var(--paper);
}
.btn-brand:hover {
  background: var(--brand-2);
  transform: translateY(-1px);
}

.btn-cool {
  background: var(--accent-cool);
  color: var(--paper);
}
.btn-cool:hover {
  background: var(--accent-cool-2);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover {
  background: var(--gold-deep);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--ink);
  padding: 0;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.btn-link:hover { border-bottom-color: var(--ink); }
.btn-link .ico { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.btn-link:hover .ico { transform: translate(2px, -2px); }

.btn-lg { padding: 1.05rem 1.875rem; font-size: var(--fs-base); }

/* ---------- 7. ICONS ---------- */

.ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.ico-lg { width: 32px; height: 32px; }
.ico-xl { width: 48px; height: 48px; }

/* Service icon container with subtle background */
.ico-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--gold-tint);
  color: var(--brand-2);
  margin-bottom: var(--sp-4);
}
.ico-tile .ico { width: 28px; height: 28px; }

.ico-tile--cool { background: var(--accent-cool-tint); color: var(--accent-cool-2); }
.ico-tile--featured { background: rgba(255,255,255,0.08); margin: 0; }

/* Stack verticale di info-card con gap (usato in pagina contatti) */
.info-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ---------- 8. HERO ---------- */

.hero {
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-12);
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero { padding-top: var(--sp-16); padding-bottom: var(--sp-16); }
}

.hero__inner {
  display: grid;
  gap: var(--sp-10);
  align-items: center;
}
@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.2fr 1fr; gap: var(--sp-12); }
}

.hero h1 {
  margin-bottom: var(--sp-5);
}
.hero .lead { margin-bottom: var(--sp-6); max-width: 36ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}
@media (min-width: 960px) {
  .hero__visual { min-height: 480px; }
}

/* SVG hero animato — brand mark con anelli irradianti */
.hero-animated {
  width: 100%;
  max-width: 520px;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hero-animated * { animation: none !important; }
  .hero-animated animate, .hero-animated animateTransform { display: none; }
}

/* SVG illustrazione SERP vs AI Overview — usata in home */
.serp-illu {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Decorative venn watermark — usato in hero (legacy) */
.venn-mark {
  width: 60%;
  max-width: 320px;
  color: var(--gold);
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

/* Decorative brand mark watermark — F1 multi-arc, usato in hero/visual */
.brand-mark-deco {
  width: 60%;
  max-width: 280px;
  position: relative;
  z-index: 1;
}

/* ---------- 9. METRICS / STATS ROW ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--sp-6);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--gold-deep);
  margin-bottom: var(--sp-2);
}
.stat__num sup {
  font-size: 0.5em;
  font-weight: 400;
  color: var(--ink-3);
  vertical-align: super;
  margin-left: 0.1em;
}
.stat__label {
  font-size: var(--fs-sm);
  color: var(--ink-3);
  line-height: 1.4;
}

/* ---------- 10. CARDS / SERVICE BLOCKS ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--ink-4); }

.card h3 {
  margin-bottom: var(--sp-3);
}
.card p { color: var(--ink-3); }

.card .btn-link { margin-top: auto; padding-top: var(--sp-5); }

.card--featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.card--featured h3, .card--featured .ico-tile { color: var(--paper); }
.card--featured .ico-tile { background: rgba(212,173,83,0.15); color: var(--gold-2); }
.card--featured p { color: var(--ink-5); }
.card--featured .btn-link { color: var(--paper); border-bottom-color: rgba(212,173,83,0.4); }
.card--featured .btn-link:hover { border-bottom-color: var(--gold-2); }

/* Service hub grid — first card spans 2, asymmetric */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 720px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid > .card:first-child { grid-column: span 1; }
}

/* ---------- 11. FAQ (accordion) ---------- */

.faq { display: flex; flex-direction: column; gap: 0; }

.faq__item {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-5);
}
.faq__item:last-child { border-bottom: 1px solid var(--line); }

.faq__q {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1vw + 0.875rem, 1.375rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  cursor: pointer;
  color: var(--ink);
  line-height: 1.3;
}
.faq__q::-webkit-details-marker { display: none; }

.faq__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.faq__icon .ico { width: 14px; height: 14px; }

details[open] .faq__icon {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: rotate(45deg);
}

.faq__a {
  margin-top: var(--sp-4);
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 64ch;
}

/* ---------- 12. STEPS / METHOD ---------- */

.steps {
  display: grid;
  gap: var(--sp-6);
  counter-reset: step;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.step {
  border-top: 1px solid var(--ink);
  padding-top: var(--sp-4);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
  color: var(--gold-deep);
  margin-bottom: var(--sp-3);
}
.step h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
  letter-spacing: -0.01em;
}
.step p {
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

/* ---------- 13. FEATURE LIST (with check) ---------- */

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  line-height: 1.55;
  color: var(--ink-2);
}
.feature-list li::before {
  content: "";
  width: 22px; height: 22px;
  background: var(--gold-tint);
  color: var(--brand-2);
  border-radius: var(--r-full);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a3309' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12 5 5L20 7'/></svg>");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- 14. PULL QUOTE / ANSWER BOX ---------- */

.answer-box {
  background: var(--paper-2);
  border-left: 3px solid var(--gold);
  padding: var(--sp-5) var(--sp-6);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  font-weight: 400;
  margin-block: var(--sp-6);
}

.callout {
  background: var(--ink);
  color: var(--paper);
  padding: var(--sp-8);
  border-radius: var(--r-lg);
  margin-block: var(--sp-8);
}
.callout h2 { color: var(--paper); margin-bottom: var(--sp-3); }
.callout p { color: var(--ink-5); margin-bottom: var(--sp-5); }

/* ---------- 15. BREADCRUMBS ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--ink-4);
  margin-bottom: var(--sp-6);
}
.breadcrumbs a {
  color: var(--ink-3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.breadcrumbs a:hover { border-bottom-color: var(--ink-3); }
.breadcrumbs__sep { color: var(--ink-5); }
.breadcrumbs [aria-current="page"] { color: var(--ink-2); }

/* ---------- 16. KPI TABLE ---------- */

.kpi-table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--sp-6);
  font-size: var(--fs-sm);
}
.kpi-table th,
.kpi-table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.kpi-table thead th {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
}
.kpi-table tbody tr:hover td { background: var(--paper-2); }
.kpi-table .num {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  color: var(--gold-deep);
}

/* ---------- 17. TAGS / PILL ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.tag--brand { background: var(--brand-tint); color: var(--brand-3); border-color: transparent; }
.tag--gold { background: var(--gold-tint); color: var(--gold-deep); border-color: transparent; }
.tag--cool { background: var(--accent-cool-tint); color: var(--accent-cool-2); border-color: transparent; }

/* ---------- 18. FORMS ---------- */

.form { display: flex; flex-direction: column; gap: var(--sp-5); }

.form__row {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 720px) {
  .form__row.cols-2 { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
}
.field__hint {
  font-size: var(--fs-xs);
  color: var(--ink-4);
}
.field input,
.field select,
.field textarea {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 0.875rem 1rem;
  font-size: var(--fs-base);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--gold);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--gold-tint);
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }

.field--invalid input,
.field--invalid textarea,
.field--invalid select {
  border-color: var(--brand-2);
}
.field__error {
  color: var(--brand-2);
  font-size: var(--fs-xs);
}

/* honeypot */
.field--honey { position: absolute; left: -10000px; opacity: 0; pointer-events: none; }

.form__status {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.form__status--success { background: var(--accent-cool-tint); color: var(--accent-cool-2); }
.form__status--error { background: var(--brand-tint); color: var(--brand-3); }

/* ---------- 19. CONTENT BLOCKS (image + text) ---------- */

.split {
  display: grid;
  gap: var(--sp-8);
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
  .split--reverse > :first-child { order: 2; }
}

.split__visual {
  background: var(--paper-2);
  border-radius: var(--r-lg);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

/* ---------- 20. FOOTER ---------- */

.site-footer {
  background: var(--ink);
  color: var(--ink-5);
  padding-block: var(--sp-12) var(--sp-6);
  margin-top: var(--sp-16);
}

.footer-grid {
  display: grid;
  gap: var(--sp-8);
  grid-template-columns: 1fr;
  margin-bottom: var(--sp-10);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.footer-grid h6 {
  color: var(--paper);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  font-family: var(--font-body);
  font-weight: 500;
}

.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-grid a {
  color: var(--ink-5);
  font-size: var(--fs-sm);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 1px;
}
.footer-grid a:hover { color: var(--paper); border-bottom-color: rgba(255,255,255,0.3); }

.footer-brand p {
  font-size: var(--fs-sm);
  line-height: 1.6;
  max-width: 32ch;
  margin-top: var(--sp-3);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--ink-4);
}

/* Wordmark in footer (sfondo scuro): inverti i colori */
.site-footer .brand__wordmark { color: var(--paper); }
.site-footer .brand__wordmark .io { color: var(--gold-2); font-style: italic; }
.site-footer .brand__wordmark .dot { background: var(--gold-2); }
.site-footer .brand:hover .brand__wordmark { color: var(--paper); }
.site-footer .brand:hover .brand__wordmark .io { color: var(--gold); }

/* ---------- 21. UTILITIES ---------- */

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.text-muted { color: var(--ink-3); }
.text-brand { color: var(--brand); }
.text-gold { color: var(--gold-deep); }

.no-underline { text-decoration: none; }

.mx-auto { margin-inline: auto; }
.mn-0 { margin: 0; }

/* Max-width containers per blocchi prose */
.max-w-prose   { max-width: 42rem; }
.max-w-content { max-width: 52rem; }
.max-w-wide    { max-width: 60rem; }

.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.bg-paper-2 { background: var(--paper-2); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: var(--paper); }

/* Surface calda con padding generoso (sezioni "highlight") */
.surface-warm {
  background: var(--paper-2);
  border-radius: var(--r-xl);
  padding: var(--sp-10) var(--sp-6);
}

/* Card orizzontale: icona/elemento a sinistra + contenuto a destra */
.card--horizontal {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-6);
  align-items: start;
}
.card--horizontal .ico-tile { margin: 0; }
.card--featured .ico-tile { margin: 0; }

/* Info card (usata in pagina contatti per le tessere email/telefono/orari) */
.info-card {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.info-card__icon {
  color: var(--brand-2);
  flex-shrink: 0;
}
.info-card__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.info-card__text {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}
.info-card__text--muted { color: var(--ink-3); }

/* Caption / meta uppercase (usata in pagina contatti per "Ragione sociale", ecc.) */
.caption-meta {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}

/* Display value (numero/valore in font-display, usato sotto le caption) */
.display-value {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
}

/* Eyebrow con icona inline */
.eyebrow__ico {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

/* Tabella in container con scroll orizzontale su mobile */
.table-scroll { overflow-x: auto; }

/* Box agent-info (usato in pagina contatti per gli agent AI) */
.agent-info {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--gold-tint);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--gold-deep);
}
.agent-info a { color: var(--gold-deep); text-decoration: underline; }
.agent-info code { background: rgba(176,141,58,0.2); padding: 1px 5px; border-radius: 3px; font-family: var(--font-mono); font-size: 0.9em; }

/* Placeholder visuale (per immagini ancora da caricare) */
.placeholder-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
}

/* Privacy checkbox label */
.privacy-label {
  display: flex;
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  line-height: 1.5;
}
.privacy-label input { margin-top: 4px; }
.privacy-label a { color: var(--brand); text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 22. ANIMATIONS (subtle, GPU-friendly) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

/* ---------- 23. PRINT ---------- */

@media print {
  .site-header, .site-footer, .nav, .btn, form { display: none !important; }
  body { background: white; color: black; }
  .container { max-width: 100%; }
}