/* ===== TEMA DARK / TECH — palette nuovo logo (blu → viola) ===== */
:root {
  --bg:        #0a0b18;
  --bg-soft:   #11132699;
  --surface:   #15172e;
  --surface-2: #1c1f3c;
  --border:    #2a2c4c;
  --text:      #eaeaf6;
  --muted:     #9a9cbb;
  --primary:   #7c3aed;   /* viola logo */
  --primary-2: #3b82f6;   /* blu logo */
  --accent:    #a855f7;   /* viola chiaro */
  --navy:      #14122e;   /* blu navy del testo logo */
  --grad:      linear-gradient(120deg, #2563eb 0%, #7c3aed 100%);
  --grad-text: linear-gradient(120deg, #60a5fa 0%, #7c3aed 55%, #c084fc 100%);
  --radius:    18px;
  --max:       1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand { font-family: 'Sora', sans-serif; line-height: 1.12; font-weight: 700; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .25em;
  font-size: .75rem; font-weight: 600; color: var(--primary-2); margin-bottom: .8rem;
}

/* glow di sfondo animato */
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(59,130,246,.20) 0%, rgba(124,58,237,.16) 40%, transparent 65%);
  filter: blur(40px);
}

/* ===== HEADER (chiaro, per leggere il logo) ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e8e8f2;
  box-shadow: 0 2px 16px rgba(20,18,46,.06);
}
.nav { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.5rem; }
.brand { display: inline-flex; align-items: center; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.brand-logo { height: 48px; width: auto; display: block; }
.brand-mark { color: var(--primary-2); }
.brand-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { list-style: none; display: flex; gap: 1.8rem; align-items: center; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--navy); transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { background: var(--grad); color: #fff !important; padding: .55rem 1.2rem; border-radius: 50px; font-weight: 600; }
.nav-cta:hover { opacity: .9; }
.lang-switch { display: flex; align-items: center; gap: .35rem; color: var(--muted); }
.lang-btn { border: none; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .88rem; color: #6b6e8c; padding: .15rem .3rem; border-radius: 6px; transition: all .2s; }
.lang-btn.active { color: var(--primary); background: rgba(124,58,237,.12); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy); }

/* ===== HERO ===== */
.hero { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 11rem 1.5rem 6rem; text-align: center; }
.badge {
  display: inline-block; background: var(--surface); border: 1px solid var(--border);
  padding: .45rem 1.1rem; border-radius: 50px; font-size: .85rem; font-weight: 500;
  color: var(--primary-2); margin-bottom: 1.8rem;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 1.4rem; }
.hero-sub { font-size: 1.18rem; color: var(--muted); max-width: 640px; margin: 0 auto 2.4rem; font-weight: 300; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 4rem; }

.btn { display: inline-block; padding: .9rem 1.9rem; border-radius: 50px; font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .25s; border: 1px solid transparent; font-family: inherit; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(124,92,255,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(124,92,255,.5); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-2); }
.btn-block { width: 100%; }

.hero-stats { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Sora'; font-size: 2.2rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats span { color: var(--muted); font-size: .9rem; }

/* ===== SECTIONS ===== */
.section { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 6rem 1.5rem; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin-top: .8rem; }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; transition: all .3s; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* AI SECTION */
.ai-section { padding: 7rem 1.5rem; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.ai-text h2 { margin-bottom: 1.2rem; }
.ai-text > p { color: var(--muted); font-size: 1.08rem; margin-bottom: 1.8rem; }
.ai-list { list-style: none; margin-bottom: 2rem; }
.ai-list li { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem 0; color: var(--muted); }
.ai-list strong { color: var(--text); font-weight: 600; }
.check { color: var(--primary-2); font-weight: 700; flex-shrink: 0; }

/* AI VISUAL */
.ai-visual { position: relative; height: 420px; display: flex; align-items: center; justify-content: center; }
.orb { width: 280px; height: 280px; border-radius: 50%; background: var(--grad); filter: blur(8px); opacity: .55; animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:.5;} 50%{ transform: scale(1.08); opacity:.7;} }
.agent-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .7rem 1.1rem; font-size: .9rem; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); display: flex; gap: .5rem; align-items: center; }
.agent-1 { top: 8%; left: 0; animation: float 5s ease-in-out infinite; }
.agent-2 { bottom: 14%; right: 0; animation: float 5s ease-in-out infinite 1.5s; }
.agent-3 { bottom: 4%; left: 12%; animation: float 5s ease-in-out infinite 3s; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-14px);} }

/* STEPS */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.step-num { font-family: 'Sora'; font-size: 2.4rem; font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: block; margin-bottom: .8rem; }
.step h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* STACK */
.stack-tags { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; max-width: 800px; margin: 0 auto; }
.stack-tags span { background: var(--surface); border: 1px solid var(--border); padding: .6rem 1.3rem; border-radius: 50px; font-size: .95rem; font-weight: 500; color: var(--muted); transition: all .25s; }
.stack-tags span:hover { color: var(--text); border-color: var(--primary); transform: translateY(-2px); }

/* CONTACT */
.contact-box { max-width: 640px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 3.5rem 2.5rem; }
.contact-box h2 { margin-bottom: .8rem; }
.contact-box > p { color: var(--muted); margin-bottom: 2rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; margin-bottom: 1.8rem; }
.form-row { display: flex; gap: 1rem; }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: .9rem 1.1rem; color: var(--text); font: inherit; font-size: .95rem; resize: vertical; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-direct { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.contact-direct a { color: var(--primary-2); font-weight: 500; font-size: .95rem; }
.contact-direct a:hover { color: var(--text); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 1.5rem; position: relative; z-index: 1; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--muted); font-size: .9rem; font-weight: 500; transition: color .2s; }
.footer-links a:hover { color: var(--primary-2); }

/* ============================================
   ANIMAZIONI ALLO SCROLL
   ============================================ */

/* barra di progresso scroll in alto */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 200;
  box-shadow: 0 0 12px rgba(124,92,255,.7);
  transition: width .1s linear;
}

/* stato iniziale degli elementi animati */
[data-reveal] {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.16,1,.3,1),
              transform .8s cubic-bezier(.16,1,.3,1),
              filter .8s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
[data-reveal="up"]    { transform: translateY(60px); }
[data-reveal="down"]  { transform: translateY(-60px); }
[data-reveal="left"]  { transform: translateX(-80px); }
[data-reveal="right"] { transform: translateX(80px); }
[data-reveal="scale"] { transform: scale(.85); }
[data-reveal="zoom"]  { transform: scale(1.12); }
[data-reveal="rotate"]{ transform: translateY(50px) rotate(-6deg) scale(.92); }
[data-reveal="blur"]  { filter: blur(14px); transform: translateY(40px); }

/* stato rivelato */
[data-reveal].revealed { opacity: 1; transform: none; filter: none; }

/* ritardo a cascata per i figli (stagger) */
[data-stagger].revealed > *:nth-child(1) { transition-delay: 0ms; }
[data-stagger].revealed > *:nth-child(2) { transition-delay: 90ms; }
[data-stagger].revealed > *:nth-child(3) { transition-delay: 180ms; }
[data-stagger].revealed > *:nth-child(4) { transition-delay: 270ms; }
[data-stagger].revealed > *:nth-child(5) { transition-delay: 360ms; }
[data-stagger].revealed > *:nth-child(6) { transition-delay: 450ms; }
/* i figli ereditano l'animazione di reveal */
[data-stagger] > * {
  opacity: 0; transform: translateY(45px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
[data-stagger].revealed > * { opacity: 1; transform: none; }

/* elementi con parallasse (mossi via JS attraverso --py) */
.parallax { transform: translateY(var(--py, 0px)); will-change: transform; }

/* hero che appare con un piccolo "respiro" */
.hero h1 { animation: heroIn 1.1s cubic-bezier(.16,1,.3,1) both; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(40px) scale(.96); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.hero .badge { animation: fadeDown .8s ease both; }
.hero-sub    { animation: fadeUp 1s ease .15s both; }
.hero-cta    { animation: fadeUp 1s ease .3s both; }
.hero-stats  { animation: fadeUp 1s ease .45s both; }
@keyframes fadeUp   { from { opacity:0; transform: translateY(30px);} to { opacity:1; transform:none;} }
@keyframes fadeDown { from { opacity:0; transform: translateY(-20px);} to { opacity:1; transform:none;} }

/* rispetta chi preferisce meno movimento */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-stagger] > *,
  .hero h1, .hero .badge, .hero-sub, .hero-cta, .hero-stats {
    animation: none !important; transition: none !important;
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .parallax { transform: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; background: #ffffff; border-bottom: 1px solid #e8e8f2; padding: 1.5rem; gap: 1.2rem; transform: translateY(-150%); transition: transform .3s; opacity: 0; pointer-events: none; box-shadow: 0 12px 30px rgba(20,18,46,.1); }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: 1fr; gap: 3rem; }
  .ai-visual { height: 320px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .hero-stats { gap: 1.8rem; }
  .section { padding: 4rem 1.2rem; }
}

/* ===== PROGETTI (teaser in landing) ===== */
.pt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: all .3s; }
.pt-card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.pt-top { position: relative; height: 140px; background: linear-gradient(135deg, var(--c1,#2563eb), var(--c2,#5b21b6)); display: flex; align-items: center; justify-content: center; }
.pt-top::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 60%); }
.pt-soon .pt-top { background: linear-gradient(135deg, #2a2c4c, #1c1f3c); }
.pt-chrome { position: absolute; top: 0; left: 0; right: 0; height: 32px; background: rgba(10,10,20,.35); display: flex; align-items: center; gap: .35rem; padding: 0 .8rem; }
.pt-chrome i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); }
.pt-chrome b { margin-left: .5rem; font-size: .72rem; font-weight: 500; color: #fff; background: rgba(255,255,255,.22); padding: .12rem .6rem; border-radius: 50px; }
.pt-icon { position: relative; z-index: 1; font-size: 2.6rem; filter: drop-shadow(0 6px 12px rgba(0,0,0,.3)); }
.pt-flag { position: absolute; top: 42px; right: .7rem; z-index: 2; font-size: 1rem; background: var(--grad); padding: .2rem .55rem; border-radius: 50px; }
.pt-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.pt-tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--primary-2); margin-bottom: .4rem; }
.pt-body h3 { font-family: 'Sora', sans-serif; font-size: 1.3rem; margin-bottom: .4rem; }
.pt-body p { color: var(--muted); font-size: .9rem; margin-bottom: 1.1rem; }
.pt-btn { margin-top: auto; align-self: flex-start; background: var(--grad); color: #fff; font-weight: 600; font-size: .88rem; padding: .6rem 1.2rem; border-radius: 50px; text-decoration: none; transition: all .2s; }
.pt-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124,58,237,.4); }
.pt-soon { border-style: dashed; }
.pt-all { text-align: center; margin-top: 2.5rem; }
@media (max-width: 880px) { .pt-grid { grid-template-columns: 1fr; } }

/* ===== COSMO / STARGATE — sfondo a tutta pagina ===== */
#cosmos { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; pointer-events: none; }
.ai-visual .agent-card { z-index: 2; }

/* ===== CHAT AI (segnaposto, in arrivo) ===== */
.ai-chat { max-width: 460px; margin: 2rem auto 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; text-align: left; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.aic-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; background: var(--grad); color: #fff; }
.aic-av { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.aic-id { flex: 1; min-width: 0; }
.aic-id strong { display: block; font-size: 1rem; }
.aic-status { font-size: .74rem; opacity: .92; display: flex; align-items: center; gap: .35rem; }
.aic-status i { width: 7px; height: 7px; border-radius: 50%; background: #7ee08a; display: inline-block; }
.aic-soon { font-size: .72rem; font-weight: 600; background: rgba(255,255,255,.2); padding: .25rem .6rem; border-radius: 50px; white-space: nowrap; }
.aic-body { padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg); }
.aic-msg { max-width: 85%; padding: .65rem .9rem; font-size: .92rem; line-height: 1.5; border-radius: 14px; }
.aic-msg.bot { background: var(--surface-2); color: var(--text); align-self: flex-start; border-bottom-left-radius: 5px; }
.aic-msg.note { align-self: center; background: transparent; color: var(--muted); font-size: .82rem; text-align: center; }
.aic-input { display: flex; gap: .5rem; padding: .8rem 1rem; border-top: 1px solid var(--border); background: var(--surface); }
.aic-input input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 50px; padding: .6rem 1rem; color: var(--muted); font: inherit; font-size: .9rem; }
.aic-input button { background: var(--grad); border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; opacity: .6; cursor: not-allowed; }

/* ===== STARFIELD — stelle lontane e sfocate (sfondo sito) ===== */
#starfield { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; filter: blur(0.7px); }

/* ===== RIFINITURE MOBILE ===== */
@media (max-width: 600px) {
  .nav { padding: .6rem 1rem; }
  .brand-logo { height: 40px; }
  .hero { padding-top: 9rem; }
  .contact-box { padding: 2rem 1.2rem; border-radius: 18px; }
  .ai-chat { margin: 1.4rem auto 1.2rem; }
  .aic-soon { display: none; }
  .hero-stats { gap: 1.6rem 2.2rem; }
  .ai-visual { height: 300px; }
}

/* ===== LOGHI PRODOTTI nelle card progetti ===== */
.card-logo { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; }
.card-logo img { display: block; }
.card-logo.light { background: #fff; padding: .55rem .85rem; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
/* teaser landing (.pt-top) */
.pt-top .card-logo img { height: 46px; }
.pt-top .card-logo.light img { height: 24px; }
/* pagina progetti (.pj-preview) */
.pj-preview .card-logo img { height: 66px; }
.pj-preview .card-logo.light img { height: 40px; }

/* ===== RETE NEURALE VIVA (sezione IA) ===== */
.nn-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.ai-visual .agent-card { animation: none; transition: box-shadow .25s ease, border-color .25s ease; will-change: transform; }
.ai-visual .agent-card.nn-hover { border-color: var(--primary-2); box-shadow: 0 0 0 1px rgba(59,130,246,.55), 0 14px 36px rgba(59,130,246,.35); }
.nn-counter { position: absolute; top: .4rem; right: .4rem; z-index: 3; background: rgba(21,23,46,.78); border: 1px solid var(--border); color: var(--muted); font-size: .76rem; font-weight: 500; padding: .35rem .75rem; border-radius: 50px; backdrop-filter: blur(6px); pointer-events: none; }
.nn-counter strong { color: var(--text); font-weight: 700; }
.nn-counter.bump { animation: nnbump .3s ease; }
@keyframes nnbump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.13); } }

/* ===== RIFINITURE MOBILE — sezione rete neurale ===== */
@media (max-width: 600px) {
  .ai-visual { height: 320px; margin-top: .5rem; }
  .ai-visual .agent-card { font-size: .78rem; padding: .5rem .75rem; border-radius: 12px; }
  .agent-1 { top: 6%; left: 2%; }
  .agent-2 { bottom: 18%; right: 2%; }
  .agent-3 { bottom: 4%; left: 6%; }
  .nn-counter { font-size: .68rem; top: .3rem; right: .3rem; padding: .3rem .6rem; }
}
@media (max-width: 380px) {
  .ai-visual .agent-card { font-size: .72rem; padding: .45rem .65rem; }
}

/* ===== CHAT AI (iframe AdsBoard) ===== */
.ai-chat-frame { max-width: 540px; margin: 2rem auto 1.5rem; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.45); border: 1px solid var(--border); background: var(--surface); }
.ai-chat-frame iframe { display: block; width: 100%; height: 600px; border: 0; }
@media (max-width: 600px) { .ai-chat-frame iframe { height: 520px; } }

/* ===== FIX titolo hero su mobile (evita taglio) ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; line-height: 1.18; }
  .hero-sub { font-size: 1.04rem; }
  .hero-stats strong { font-size: 1.9rem; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 1.74rem; }
}

/* ===== SICUREZZA MOBILE GLOBALE ===== */
img, iframe, video, svg:not(#starfield):not(#cosmos) { max-width: 100%; }
@media (max-width: 380px) {
  h2 { font-size: 1.7rem; }
  .section-lead { font-size: .98rem; }
  .badge { font-size: .78rem; padding: .4rem .9rem; }
  .section { padding: 3.5rem 1.1rem; }
}


/* ===== MOBILE: aree toccabili di almeno 44px (WCAG 2.5.5 / linee guida Apple) ===== */
@media (max-width: 900px) {
  .nav-links a, .lang-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .nav-toggle { min-width: 44px; min-height: 44px; }
  .footer-col a { min-height: 40px; display: inline-flex; align-items: center; }
}
