:root {
  --navy: #22315f;
  --navy-deep: #182447;
  --navy-soft: #2c3d73;
  --orange: #ea850b;
  --orange-soft: #f39d35;
  --teal: #397593;
  --teal-soft: #6fa0b8;
  --ink: #1c1c1c;
  --body: #4a5563;
  --muted: #6b7280;
  --line: #e4e8ee;
  --paper: #ffffff;
  --bg: #f5f7fa;
  --ok: #1f7a4d;
  --ok-bg: #e8f6ee;
  --warn: #9a6b12;
  --warn-bg: #fff6e5;
  --info: #245e7a;
  --info-bg: #eaf4f8;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(34, 49, 95, 0.12);
  --header-h: 76px;
}

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/MonaSans.ttf") format("truetype");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

@font-face {
  font-family: "Thicker";
  src: url("../fonts/zetafonts_-_thicker_black-webfont.woff2") format("woff2"),
       url("../fonts/zetafonts_-_thicker_black-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section, .phase, #fase-1, #fase-2, #due-fattori, #piu-account, #faq, #procedura, #cosa-cambia {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  font-family: "Mona Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .story strong {
  font-family: "Thicker", sans-serif;
  font-weight: normal;
  letter-spacing: 0;
}

img { max-width: 100%; display: block; }

a { color: var(--teal); }

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 16px;
  background: #fff;
  padding: 8px 12px;
  z-index: 100;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img {
  height: 34px;
  width: auto;
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.mobile-nav { display: none; }

.nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.nav a:hover { color: var(--orange); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 999px;
}

a.header-cta { cursor: pointer; }
span.header-cta { cursor: default; }
a.header-cta:hover { background: #d57608; }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(234,133,11,.22), transparent 46%),
    radial-gradient(ellipse at 8% 80%, rgba(57,117,147,.35), transparent 42%),
    linear-gradient(160deg, var(--navy-deep), var(--navy) 55%, #2a4a68);
  color: #fff;
  padding: 72px 0 84px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-soft);
}

.hero h1 {
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.08;
  margin: 18px 0 16px;
}

.hero p.lead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255,255,255,.86);
  max-width: 560px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 750;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 15px;
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

a.btn-orange:hover,
button.btn-orange:hover { background: #d57608; }
span.btn { cursor: default; }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}

.btn-ghost:hover { background: rgba(255,255,255,.08); }

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
}

.hero-visual {
  position: relative;
}

.browser {
  background: #eef1f5;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #dfe5ec;
}

.browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9d0d8;
}

.browser-url {
  flex: 1;
  min-width: 0;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser img {
  width: 100%;
  background: #fff;
}

.float-note {
  position: absolute;
  right: -12px;
  bottom: 28px;
  background: #fff;
  color: var(--navy);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 750;
  max-width: 210px;
}

/* Sections */
section { padding: 84px 0; }

.section-kicker {
  color: var(--orange);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 10px;
}

h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--navy);
}

.intro {
  font-size: 18px;
  color: var(--body);
  margin: 0 0 36px;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(34,49,95,.04);
}

.card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--body);
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--info-bg);
  color: var(--teal);
  font-weight: 800;
}

.unchanged {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.box-ok, .box-warn, .box-info {
  border-radius: var(--radius);
  padding: 22px 24px;
}

.box-ok { background: var(--ok-bg); color: #184e33; }
.box-warn { background: var(--warn-bg); color: #6d4c0c; }
.box-info { background: var(--info-bg); color: var(--info); }

.box-ok h3, .box-warn h3, .box-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.box-ok ul, .box-warn ul, .box-info ul {
  margin: 0;
  padding-left: 18px;
}

/* Timeline / procedure */
.procedure {
  background: #fff;
}

.phase-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.phase-nav a {
  text-decoration: none;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: block;
}

.phase-nav a:hover { border-color: var(--teal-soft); }

.phase-nav span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 6px;
}

.phase {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 40px;
  align-items: start;
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.phase:first-of-type { border-top: 0; padding-top: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.badge-req { background: #eef2ff; color: var(--navy); }
.badge-opt { background: var(--warn-bg); color: var(--warn); }

.phase h3 {
  font-size: 28px;
  margin: 0 0 12px;
  color: var(--navy);
}

.phase p { color: var(--body); }

.checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.checklist li {
  position: relative;
  padding: 10px 0 10px 32px;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
}

.checklist li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M6.3 11.1 3.2 8l1.1-1.1 2 2 5.4-5.4L12.8 4.6z'/></svg>") center/12px no-repeat;
}

.shot {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  object-position: top center;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
}

.shot figcaption {
  margin: 10px 8px 2px;
  font-size: 13px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.tab.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.shot-pair { display: none; }
.shot-pair.active { display: block; }

.note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 14px;
}

/* FAQ */
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 750;
  color: var(--navy);
}

.faq details p {
  margin: 10px 0 0;
  color: var(--body);
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-deep), var(--teal));
  color: #fff;
  border-radius: 24px;
  padding: 42px;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 24px;
  align-items: center;
}

.cta-band h2 { color: #fff; margin-bottom: 8px; }

.cta-band p { margin: 0; color: rgba(255,255,255,.86); }

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.help-grid a, .help-grid div {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
}

.help-grid strong { display: block; color: var(--navy); margin-bottom: 4px; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.78);
  padding: 36px 0;
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a { color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 48, .86);
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 80;
}

.lightbox.open { display: grid; }

.lightbox img {
  max-width: min(960px, 100%);
  max-height: 90vh;
  border-radius: 12px;
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #fff;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}

.hero .float-note {
  position: static;
  width: fit-content;
  max-width: 280px;
  margin: 14px 0 0 auto;
}

.hero-note {
  margin: 16px 0 0;
  max-width: 560px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,.72);
}

.subhead {
  margin: 52px 0 8px;
  font-size: clamp(24px, 2.4vw, 32px);
  color: var(--navy);
}

.role {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.phase-nav.six {
  grid-template-columns: repeat(6, 1fr);
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.metrics span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.story {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: story;
}

.story li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  counter-increment: story;
}

.story li::before {
  content: counter(story);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.story strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 17px;
}

.story span {
  display: block;
  color: var(--body);
}

/* Entrance animations */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in-scale {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.js .hero h1,
.js .hero .lead,
.js .hero-actions,
.js .hero .browser,
.js .hero .float-note {
  opacity: 0;
  animation: fade-up .8s cubic-bezier(.2,.7,.2,1) forwards;
}

.js .hero h1 { animation-delay: .1s; }
.js .hero .lead { animation-delay: .25s; }
.js .hero-actions { animation-delay: .4s; }
.js .hero .browser { animation-name: fade-in-scale; animation-duration: 1s; animation-delay: .3s; }
.js .hero .float-note { animation-delay: .9s; }

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .7s ease,
    transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .hero h1,
  .js .hero .lead,
  .js .hero-actions,
  .js .hero .browser,
  .js .hero .float-note {
    opacity: 1;
    animation: none;
  }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 1100px) {
  .phase-nav.six { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .mobile-nav {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 10px 20px 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: var(--header-h);
    z-index: 35;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav a {
    flex: 0 0 auto;
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
  }
  section, .phase, #per-chi, #assistenza { scroll-margin-top: 132px; }
  .hero, section { padding: 56px 0; }
  .hero-grid, .phase, .unchanged, .cta-band, .cards-3, .phase-nav, .phase-nav.six, .help-grid, .story {
    grid-template-columns: 1fr;
  }
  .float-note { display: none; }
  .header-cta { padding: 9px 12px; font-size: 13px; }
  .cta-band { padding: 28px 22px; }
}

@media print {
  .site-header, .hero-actions, .header-cta, .lightbox { display: none !important; }
  .hero { padding: 24px 0; }
  .phase { break-inside: avoid; }
  .js .reveal, .js .hero * { opacity: 1 !important; transform: none !important; animation: none !important; }
  body { background: #fff; }
}
