/* ── RESET & ROOT ── */
:root {
  --blue: #68c5ef;
  --blue-mid: #2ba7df;
  --dark: #07111f;
  --deep: #0b1f36;
  --text: #102033;
  --muted: #667085;
  --white: #fff;
  --line: #e7edf4;
  --shadow: 0 24px 70px rgba(7,17,31,.18);
  --pad-h: clamp(24px, 6vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px; /* offset nav fissa su tutti gli anchor */
}
img { max-width: 100%; display: block; }

body {
  margin: 0 auto;
  max-width: 2048px;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: #f6faff;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ── NAV ── */
.nav {
  position: fixed;
  z-index: 20;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 2048px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-h);
  background: rgba(7,17,31,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand img { height: 48px; width: auto; }
.nav nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #fff;
  font-weight: 700;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: var(--dark);
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 14px 34px rgba(43,167,223,.35);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(43,167,223,.45); }
.btn.small { padding: 11px 18px; font-size: 14px; }
.btn.ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255,255,255,.22);
}
.btn.ghost:hover { background: rgba(255,255,255,.2); }
.btn.full { width: 100%; font-size: 16px; }
.btn.xl { padding: 20px 36px; font-size: 17px; box-shadow: 0 18px 44px rgba(43,167,223,.45); }
.btn.xl:hover { transform: translateY(-3px); box-shadow: 0 26px 56px rgba(43,167,223,.55); }
.btn.outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.25);
  color: #fff;
  box-shadow: none;
}
.btn.outline:hover { border-color: var(--blue); color: var(--blue); }
.btn.ghost-alt {
  background: transparent;
  border: 1.5px solid #c8d9e8;
  color: var(--text);
  box-shadow: none;
  font-size: 15px;
}
.btn.ghost-alt:hover { border-color: var(--blue-mid); color: var(--blue-mid); }

/* ── EYEBROW ── */
.eyebrow {
  display: inline-flex;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 14px;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding: 140px var(--pad-h) 70px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 54px;
  align-items: center;
  background:
    radial-gradient(circle at 80% 15%, rgba(104,197,239,.4), transparent 34%),
    linear-gradient(135deg, #081525 0%, #0d2540 58%, #102c4a 100%);
  color: #fff;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 76px);
  line-height: .93;
  margin: 0 0 24px;
  letter-spacing: -.06em;
}
.hero p {
  max-width: 620px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
  color: #dceefa;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
  margin-top: 42px;
  max-width: 680px;
}
.stats div {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: rgba(255,255,255,.07);
}
.stats strong { display: block; font-size: clamp(20px, 2vw, 28px); }
.stats span { color: #b9d3e4; font-size: 13px; }

.hero-visual { position: relative; }
.main-img {
  width: 100%;
  max-width: 2048px;
  min-height: 480px;
  max-height: 680px;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}
.floating-card {
  position: absolute;
  padding: 15px 20px;
  border-radius: 18px;
  background: #fff;
  color: var(--dark);
  font-weight: 900;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.floating-card.one { left: -18px; top: 12%; }
.floating-card.two { right: -12px; bottom: 12%; background: var(--blue); }

/* ── SECTION / FORMATI ── */
.section { padding: 90px var(--pad-h); }
.section-head { max-width: 820px; margin-bottom: 34px; }
.section-head p { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 14px 0 0; max-width: 640px; }
.section h2, .benefits h2, .quote h2 {
  font-size: clamp(28px, 3.5vw, 52px);
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -.04em;
}

.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(16,32,51,.08);
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 28px 70px rgba(16,32,51,.14); }
.card img { width: 100%; height: 280px; object-fit: cover; }
.card div { padding: 26px; flex: 1; }
.card span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--blue-mid); font-weight: 900; }
.card h3 { font-size: clamp(20px, 2vw, 26px); margin: 8px 0 10px; }
.card p { color: var(--muted); line-height: 1.65; margin: 0; font-size: 15px; }

/* "Scopri tutti" trigger */
.formati-more { text-align: center; margin-top: 44px; }

/* ── BENEFITS (legacy, if still used) ── */
.benefits {
  margin: 0 var(--pad-h) 90px;
  padding: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  border-radius: 40px;
  background: var(--dark);
  color: #fff;
  box-shadow: var(--shadow);
}
.benefits p { color: #c8d7e5; }
.benefits ul { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.benefits li {
  padding: 18px 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  font-weight: 800;
}

/* ── BURGER BUTTON ── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  flex-shrink: 0;
  position: relative;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s;
  pointer-events: none;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ── */
@media (min-width: 1600px) {
  :root { --pad-h: 160px; }
}
@media (min-width: 1900px) {
  :root { --pad-h: 260px; }
}

@media (max-width: 1200px) {
  .cards { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(82px + 1rem); }
  .main-img { min-height: 320px; }
  .floating-card.one { left: 10px; }
  .floating-card.two { right: 10px; }
  .benefits { grid-template-columns: 1fr; padding: 34px; margin-left: 4vw; margin-right: 4vw; }
  .cards { grid-template-columns: 1fr; }
  .stats, .grid-2 { grid-template-columns: 1fr; }

  /* Burger visible */
  .burger { display: flex; }

  /* ── FULLSCREEN MOBILE MENU ── */
  .nav nav {
    position: fixed;
    inset: 0;
    height: 100%;
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100dvh;                 /* viewport dinamico moderno */
    z-index: 100;
    background: rgba(7,17,31,.98);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 100px 32px 60px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    overflow-y: auto;
  }
  .nav nav.is-open {
    opacity: 1;
    pointer-events: all;
  }

  /* Nav links */
  .nav nav a:not(.btn):not(.lang-sw a) {
    display: block;
    font-size: clamp(28px, 8vw, 42px);
    font-weight: 900;
    letter-spacing: -.03em;
    color: rgba(255,255,255,.85);
    padding: 14px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: color .15s;
  }
  .nav nav a:not(.btn):not(.lang-sw a):hover { color: var(--blue); }

  /* Language switcher fullscreen */
  .nav nav .lang-sw {
    display: flex;
    gap: 14px;
    padding: 36px 0 0;
    border-bottom: none;
    width: auto;
    align-items: center;
    justify-content: center;
    order: 10;
  }
  .nav nav .lang-sw span { display: none; }
  .nav nav .lang-sw a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.2) !important;
    background: rgba(255,255,255,.06) !important;
    color: rgba(255,255,255,.6) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    padding: 0 !important;
    transition: all .2s !important;
  }
  .nav nav .lang-sw a:hover {
    border-color: var(--blue) !important;
    color: var(--blue) !important;
  }
  .nav nav .lang-sw a.active {
    background: linear-gradient(135deg, var(--blue), var(--blue-mid)) !important;
    border-color: transparent !important;
    color: var(--dark) !important;
    box-shadow: 0 8px 24px rgba(43,167,223,.4) !important;
  }

  /* CTA button */
  .nav nav .btn {
    order: 11;
    margin-top: 20px;
    padding: 18px 48px;
    font-size: 16px;
    width: auto;
    justify-content: center;
  }
}

/* ── FORM (legacy) ── */
.quote {
  margin: 0 var(--pad-h) 80px;
  padding: 54px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 46px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 40px;
  box-shadow: 0 18px 60px rgba(16,32,51,.1);
}
.form { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 8px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #d8e2ec; border-radius: 16px; padding: 15px 16px; font: inherit; background: #f8fbfe; }
textarea { resize: vertical; }
small { color: var(--muted); text-align: center; }

/* ── FOOTER ── */
footer {
  padding: 34px var(--pad-h);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--dark);
  color: #d9ecf8;
  flex-wrap: wrap;
}
footer span { color: #9eb8cc; }

/* ── POWERED BY ── */
.powered-by {
  background: #060f1b;
  text-align: center;
  padding: 10px var(--pad-h);
  font-size: .72rem;
  color: #4a6070;
  letter-spacing: .04em;
}
.powered-by a {
  color: #4a6070;
  text-decoration: none;
  font-weight: 700;
  transition: color .2s;
}
.powered-by a:hover { color: #9eb8cc; }

@media (max-width: 580px) {
  footer { flex-direction: column; }
  .formati-more .btn { width: 100%; }
}
