/* ==========================================================================
   Axura — Foglio di stile condiviso delle pagine di APPROFONDIMENTO
   Servito da /it/assets/approfondimenti.css

   PERCHÉ ESTERNO E NON INLINE
   La CSP in .htaccess autorizza gli stili inline solo tramite hash SHA-256,
   che cambia a ogni singolo carattere modificato. Servendo questo file da
   'self' (già consentito da style-src) le pagine di approfondimento si
   modificano liberamente senza mai ricalcolare un hash.

   PERCORSI ASSOLUTI
   I @font-face usano /it/fonts/… e non fonts/… : le pagine di
   approfondimento vivono in sottocartella (/it/brand-journalism/) e i
   percorsi relativi della home si romperebbero.

   I token, la navbar, il footer, la skip-link, l'accordion FAQ, la CTA e il
   pulsante "torna su" sono allineati 1:1 a /it/index.html per garantire
   parità visiva e di accessibilità. Le classi con prefisso .appro- sono
   invece specifiche degli approfondimenti.
   ========================================================================== */

/* ============ Font ============ */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/it/fonts/inter-v20-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/it/fonts/inter-v20-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/it/fonts/inter-v20-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/it/fonts/inter-v20-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Sora';  font-style: normal; font-weight: 600; font-display: swap; src: url('/it/fonts/sora-v17-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Sora';  font-style: normal; font-weight: 700; font-display: swap; src: url('/it/fonts/sora-v17-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Sora';  font-style: normal; font-weight: 800; font-display: swap; src: url('/it/fonts/sora-v17-latin-800.woff2') format('woff2'); }

/* Fallback con metric override: riduce il layout shift durante lo swap. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Sora Fallback';
  src: local('Arial');
  size-adjust: 96%; ascent-override: 98%; descent-override: 27%; line-gap-override: 0%;
}

/* ============ Design tokens — palette derivata dal logo ============ */
:root {
  --green:      #06a139;  /* barra 1 del logo */
  --green-acid: #9fc41f;  /* barra 2 del logo */
  --lime:       #e2df1f;  /* barra 3 del logo */
  --grad: linear-gradient(120deg, var(--green) 0%, var(--green-acid) 55%, var(--lime) 100%);

  --bg:        #0a0e0b;
  --bg-soft:   #0e130f;
  --card:      rgba(255,255,255,0.035);
  --card-edge: rgba(255,255,255,0.08);
  --text:      #e8ece8;
  --muted:     #a7b0a8;

  --radius: 20px;
  --font-body: 'Inter', 'Inter Fallback', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora', 'Sora Fallback', 'Inter Fallback', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* sfondo ambientale: bagliori nei colori del logo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(6,161,57,0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 35%, rgba(159,196,31,0.10), transparent 60%),
    radial-gradient(800px 600px at 70% 110%, rgba(226,223,31,0.06), transparent 60%);
}

::selection { background: rgba(159,196,31,0.35); }

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -100%;
  background: var(--green); color: #fff; padding: .6rem 1rem;
  border-radius: 10px; z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* Focus visibile uniforme: la home si affida al ring di default del browser,
   qui lo rendiamo esplicito perché su sfondo scuro il default è poco leggibile. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green-acid);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ Navbar — glassmorphism (identica alla home) ============ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(10,14,11,0.65);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: padding .3s, background .3s, box-shadow .3s;
}
.navbar.scrolled {
  padding-top: .55rem; padding-bottom: .55rem;
  background: rgba(10,14,11,0.85);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.navbar .logo { display: flex; align-items: center; }
.navbar .logo img { display: block; height: 38px; width: auto; }

nav#main-nav { display: flex; gap: .25rem; }
nav#main-nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: .5rem .85rem; border-radius: 999px;
  transition: color .2s, background .2s;
}
nav#main-nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
nav#main-nav a[aria-current="page"] { color: var(--text); background: rgba(6,161,57,0.18); }

.mobile-menu-toggle {
  display: none; background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-edge); color: var(--text);
  font-size: 1.25rem; line-height: 1; padding: .5rem .75rem;
  border-radius: 12px; cursor: pointer;
}

@media (max-width: 860px) {
  .mobile-menu-toggle { display: block; }
  nav#main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: .25rem; padding: 1rem 1.2rem 1.4rem;
    background: rgba(10,14,11,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: none;
  }
  nav#main-nav.open { display: flex; }
  nav#main-nav a { padding: .8rem 1rem; border-radius: 12px; }
}

/* ============ Layout ============ */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.2rem, 4vw, 2rem);
}

/* marcatore di sezione: le tre barre del logo.
   Negli approfondimenti è decorativo e NON interattivo (nella home apre
   un'animazione GSAP): niente cursor:pointer, per non promettere un click. */
.bars {
  display: block;
  margin-bottom: 1.2rem;
  overflow: visible;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; }

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
}

p.intro { color: var(--muted); max-width: 62ch; }
p.intro + p.intro { margin-top: .5rem; }

a { color: var(--green-acid); }
a:hover { color: var(--lime); }

.cta {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 1rem 2.1rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: #08210c;
  text-decoration: none;
  background: var(--grad);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(6,161,57,0.35);
  transition: transform .25s cubic-bezier(.2,.8,.3,1.2), box-shadow .25s;
}
.cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 40px rgba(159,196,31,0.45);
  color: #08210c;
}

/* ==========================================================================
   COMPONENTI SPECIFICI DEGLI APPROFONDIMENTI (.appro-*)
   ========================================================================== */

/* ---- Hero della pagina ---- */
.appro-hero {
  min-height: auto;
  padding-top: 9rem;
  position: relative;
}
.appro-hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  max-width: 20ch;
  margin-bottom: 1.6rem;
  background: linear-gradient(120deg, #ffffff 30%, var(--green-acid) 75%, var(--lime) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.appro-hero p.sommario {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 62ch;
}
.appro-hero p.sommario + p.sommario { margin-top: .9rem; }

/* ---- Breadcrumb visibile ---- */
.breadcrumb {
  margin-bottom: 1.6rem;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  margin: 0;
  padding: 0;
}
.breadcrumb li { display: flex; align-items: center; gap: .5rem; }
.breadcrumb li + li::before {
  content: "›";
  color: rgba(167,176,168,0.55);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-acid); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---- Corpo redazionale ---- */
.appro-body p { color: var(--muted); max-width: 68ch; }
.appro-body p + p { margin-top: 1rem; }
.appro-body strong { color: var(--text); }
.appro-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.4rem;
  margin-bottom: .8rem;
}
.appro-body ul, .appro-body ol {
  margin: 1rem 0 1rem 1.2rem;
  color: var(--muted);
  max-width: 68ch;
}
.appro-body li { margin-bottom: .5rem; }
.appro-body li::marker { color: var(--green-acid); }
.appro-body li strong { color: var(--text); }

/* Definizione estraibile: il primo blocco che un motore generativo cita.
   Reso graficamente distinto per invogliarne anche la lettura umana. */
.definizione {
  margin: 2rem 0 2.4rem;
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 20px 60px rgba(6,161,57,0.18);
}
.definizione p {
  color: var(--text);
  font-size: clamp(1.05rem, 1.7vw, 1.18rem);
  line-height: 1.75;
  max-width: 66ch;
}
.definizione p + p { margin-top: .9rem; }

/* ---- Griglia "cos'è / cosa non è" ---- */
.confronto-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}
.confronto-grid article {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform .3s, border-color .3s, background .3s;
  overflow: hidden;
}
.confronto-grid article::before {
  content: "";
  position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .3s;
}
.confronto-grid article:hover {
  transform: translateY(-6px);
  border-color: rgba(159,196,31,0.4);
  background: rgba(255,255,255,0.055);
}
.confronto-grid article:hover::before { opacity: 1; }
.confronto-grid h3 {
  font-size: 1.05rem; font-weight: 600; margin: 0 0 .6rem;
}
.confronto-grid p { color: var(--muted); font-size: .93rem; line-height: 1.65; max-width: none; }

/* ---- Metodo: passi numerati ---- */
.passi { margin-top: 2.4rem; counter-reset: passo; list-style: none; padding: 0; }
.passi > li {
  counter-increment: passo;
  position: relative;
  padding: 1.6rem 1.5rem 1.6rem 4.6rem;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  margin-bottom: .9rem;
  transition: border-color .3s, background .3s;
}
.passi > li::before {
  content: counter(passo);
  position: absolute;
  left: 1.4rem; top: 1.5rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #08210c;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
}
.passi > li:hover { border-color: rgba(159,196,31,0.4); background: rgba(255,255,255,0.055); }
.passi h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin: 0 0 .4rem; }
.passi p { color: var(--muted); font-size: .95rem; margin: 0; max-width: 62ch; }
.passi .output {
  display: inline-block;
  margin-top: .7rem;
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  background: rgba(6,161,57,0.10);
  border: 1px solid rgba(6,161,57,0.30);
  border-radius: 999px;
  padding: .3rem .9rem;
}

/* ---- Mini caso studio ---- */
.caso {
  margin-top: 2.6rem;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-left: 4px solid var(--green);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.8rem, 4vw, 2.6rem);
}
.caso .etichetta {
  color: var(--green-acid);
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}
.caso h3 { font-size: 1.35rem; font-weight: 700; margin: 0 0 1rem; }
.caso p { color: var(--muted); max-width: 70ch; }
.caso p + p { margin-top: .9rem; }
.caso strong { color: var(--text); }

/* ---- Box del servizio di appartenenza ---- */
.servizio-box {
  margin-top: 2.6rem;
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: 0 20px 60px rgba(6,161,57,0.18);
}
.servizio-box .etichetta {
  color: var(--green-acid);
  font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .5rem;
}
.servizio-box h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: .9rem; }
.servizio-box p { color: var(--muted); max-width: 70ch; }
.servizio-box p + p { margin-top: .8rem; }
.servizio-box strong { color: var(--text); }
.servizio-box .cta { margin-top: 1.6rem; padding: .8rem 1.7rem; font-size: .98rem; }

/* ---- Dal blog: lista articoli ---- */
.blog-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}
.blog-grid article {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform .3s, border-color .3s, background .3s;
  overflow: hidden;
}
.blog-grid article::before {
  content: "";
  position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .3s;
}
.blog-grid article:hover {
  transform: translateY(-6px);
  border-color: rgba(159,196,31,0.4);
  background: rgba(255,255,255,0.055);
}
.blog-grid article:hover::before { opacity: 1; }
.blog-grid .meta {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .6rem;
}
.blog-grid .meta .autore { color: var(--green-acid); font-weight: 600; }
.blog-grid h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.45; margin-bottom: .6rem; }
.blog-grid h3 a { color: var(--text); text-decoration: none; }
.blog-grid h3 a:hover { color: var(--green-acid); }
.blog-grid p { color: var(--muted); font-size: .92rem; line-height: 1.65; max-width: none; }
.blog-categoria { margin-top: 1.8rem; font-size: .95rem; color: var(--muted); }

/* ---- FAQ — accordion (identico alla home) ---- */
.faq-list { margin-top: 2.4rem; display: flex; flex-direction: column; gap: .8rem; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .3s;
}
.faq-item[open] { border-color: rgba(159,196,31,0.4); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  list-style: none;
  transition: background .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255,255,255,0.04); }
.faq-item h3 { font-size: 1.02rem; font-weight: 600; margin: 0; }
.faq-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(6,161,57,0.18);
  color: var(--green-acid);
  font-weight: 600;
  transition: transform .3s, background .3s;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); background: rgba(159,196,31,0.28); }
.faq-content { padding: 0 1.4rem 1.3rem; }
.faq-content p { color: var(--muted); font-size: .95rem; max-width: 70ch; }
.faq-content p + p { margin-top: .7rem; }
.faq-content strong { color: var(--text); }

/* ---- Firma autore ---- */
.autore-box {
  margin-top: 3rem;
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-left: 4px solid var(--green);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.6rem, 3.5vw, 2.2rem);
}
.autore-box .avatar {
  flex-shrink: 0;
  width: 62px; height: 62px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  background: var(--grad);
  color: #08210c;
}
.autore-box .etichetta {
  color: var(--muted);
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .35rem;
}
.autore-box h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .1rem; }
.autore-box .ruolo { color: var(--green-acid); font-size: .9rem; font-weight: 600; margin-bottom: .8rem; }
.autore-box p { color: var(--muted); font-size: .93rem; line-height: 1.65; max-width: 66ch; }
.autore-box .linkedin-link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .9rem;
  font-size: .85rem; font-weight: 600;
  color: var(--green-acid); text-decoration: none;
}
.autore-box .linkedin-link:hover { color: var(--lime); }
.autore-box .linkedin-link svg { flex-shrink: 0; }

@media (max-width: 560px) {
  .autore-box { flex-direction: column; gap: 1rem; }
}

/* ---- CTA finale ---- */
.contatti-panel {
  text-align: center;
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2.2rem, 5vw, 3.5rem);
}
.contatti-panel h2 { margin-bottom: 1.4rem; }
.contatti-panel p { color: var(--muted); max-width: 60ch; margin: 0 auto; }
.contatti-panel p + p { margin-top: 1rem; font-size: .95rem; }
.contatti-panel a { font-weight: 600; }
.contatti-panel .cta { color: #08210c; }

/* ============ Back to top ============ */
.back-to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 48px; height: 48px;
  border: none; border-radius: 50%;
  background: var(--grad);
  color: #08210c; font-size: 1.2rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(6,161,57,0.4);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .3s, transform .3s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ============ Footer ============ */
footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 2.5rem clamp(1.2rem, 4vw, 2rem) 3rem;
  text-align: center;
  position: relative;
}
footer::before {
  content: "";
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 2px;
  background: var(--grad);
}
footer p { color: var(--muted); font-size: .85rem; line-height: 1.9; }
footer p strong { color: var(--text); }

/* ============ Reveal all'ingresso nel viewport ============
   Lo stato nascosto è applicato SOLO da JS (classe .reveal-ready sull'<html>):
   senza JavaScript la pagina resta interamente visibile e leggibile.
   Con prefers-reduced-motion il JS non applica affatto la classe. */
html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
}
html.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.3,1);
}
