:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --primary:#0b5fff;
  --accent:#ff8a00;
  --border:rgba(15,23,42,0.12);
  --shadow:0 10px 30px rgba(15,23,42,0.08);
  --radius:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color:var(--text);
  background:var(--bg);
}

a{ color:var(--primary); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ width:min(1120px, 92vw); margin:0 auto; }

.skip{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{ left:16px; top:16px; width:auto; height:auto; background:var(--surface); padding:10px 12px; border-radius:10px; box-shadow:var(--shadow); }

.header{
  position:sticky; top:0; z-index:20;
  background:rgba(246,248,251,0.85);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--border);
}
.header__inner{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:14px; }

.brand{ display:flex; align-items:center; gap:12px; }
.brand__mark{
  width:40px; height:40px; border-radius:12px;
  background:linear-gradient(135deg, var(--primary), #003bbd);
  color:white; display:grid; place-items:center;
  font-weight:800; letter-spacing:0.5px;
}
.brand__name{ font-weight:800; }
.brand__tag{ font-size:12px; color:var(--muted); margin-top:2px; }

.nav{ display:flex; gap:16px; align-items:center; }
.nav a{ font-weight:600; color:var(--text); }
.nav a:hover{ color:var(--primary); text-decoration:none; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius:14px;
  background:var(--primary);
  color:white;
  border:1px solid transparent;
  font-weight:700;
  box-shadow: 0 12px 25px rgba(11,95,255,0.18);
}
.btn:hover{ filter:brightness(0.98); text-decoration:none; }
.btn--ghost{
  background:transparent;
  color:var(--primary);
  border-color:rgba(11,95,255,0.35);
  box-shadow:none;
}
.btn--small{ padding:10px 12px; border-radius:12px; }
.btn--block{ width:100%; }

.hero{ position:relative; padding:54px 0 34px; }
.hero__inner{ display:grid; grid-template-columns: 1.35fr 0.65fr; gap:24px; align-items:start; }
.hero__bg{
  position:absolute; inset:0;
  background:
    radial-gradient(900px 400px at 15% 10%, rgba(11,95,255,0.18), transparent 55%),
    radial-gradient(700px 350px at 70% 5%, rgba(255,138,0,0.16), transparent 55%);
  pointer-events:none;
}
.hero__copy{ position:relative; }
.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(11,95,255,0.10);
  border:1px solid rgba(11,95,255,0.18);
  color:var(--text);
  font-weight:700;
  font-size:13px;
}
h1{ font-size:44px; line-height:1.08; margin:14px 0 10px; letter-spacing:-0.02em; }
.accent{ color:var(--primary); }
.lead{ font-size:16px; line-height:1.6; color:var(--muted); margin:0 0 18px; max-width:62ch; }

.hero__cta{ display:flex; gap:12px; flex-wrap:wrap; margin:14px 0 14px; }

.bullets{ margin:14px 0 0; padding:0; list-style:none; color:var(--muted); display:grid; gap:10px; }
.bullets li{ display:flex; gap:10px; align-items:flex-start; }
.bullets li::before{
  content:"✓";
  display:inline-grid; place-items:center;
  width:22px; height:22px; border-radius:999px;
  background:rgba(22,163,74,0.12);
  border:1px solid rgba(22,163,74,0.22);
  color:#166534;
  font-weight:900;
  margin-top:1px;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
  position:relative;
}
.card__title{ margin:0 0 10px; font-size:16px; }
.card__row{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px dashed rgba(15,23,42,0.16); }
.card__row:last-of-type{ border-bottom:none; }
.card__k{ color:var(--muted); font-size:12px; font-weight:700; }
.card__v{ font-size:13px; font-weight:700; color:var(--text); text-align:right; }

.section{ padding:42px 0; }
.section--alt{ background:rgba(255,255,255,0.55); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.section__head{ margin-bottom:18px; }
.section__head h2{ font-size:28px; margin:0 0 6px; letter-spacing:-0.01em; }
.muted{ color:var(--muted); }
.small{ font-size:12px; line-height:1.5; }

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

.service, .price{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.service h3{ margin:0 0 10px; }
.service ul{ margin:0; padding-left:18px; color:var(--muted); line-height:1.6; }
.service li{ margin:6px 0; }

.price__top{ margin-bottom:12px; }
.price__value{
  font-size:34px; font-weight:900; margin:6px 0 4px;
  letter-spacing:-0.02em;
}
.price__value span{ font-size:18px; vertical-align:top; }
.price__list{ margin:0; padding-left:18px; color:var(--muted); line-height:1.6; }
.price__list li{ margin:6px 0; }
.price--featured{
  border-color: rgba(11,95,255,0.35);
  box-shadow: 0 14px 38px rgba(11,95,255,0.12);
  position:relative;
}
.price--featured::before{
  content:"Consigliato";
  position:absolute; top:14px; right:14px;
  background:rgba(255,138,0,0.16);
  color:#7c2d12;
  border:1px solid rgba(255,138,0,0.35);
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
}

.steps{ display:grid; gap:12px; }
.step{
  display:grid;
  grid-template-columns: 42px 1fr;
  gap:12px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
}
.step__n{
  width:42px; height:42px;
  border-radius:14px;
  background:rgba(11,95,255,0.12);
  border:1px solid rgba(11,95,255,0.20);
  display:grid; place-items:center;
  font-weight:900;
  color:var(--primary);
}

.faq{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px 16px;
  margin:10px 0;
}
.faq summary{ cursor:pointer; font-weight:800; }
.faq p{ color:var(--muted); margin:10px 0 0; line-height:1.6; }

.contact{ display:grid; grid-template-columns: 0.95fr 1.05fr; gap:16px; align-items:start; }
.contact__box{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.form{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
label{ display:grid; gap:6px; margin:10px 0; font-weight:700; font-size:13px; }
input, select, textarea{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.18);
  font-family:inherit;
  font-size:14px;
  outline:none;
  background:white;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(11,95,255,0.55);
  box-shadow: 0 0 0 4px rgba(11,95,255,0.14);
}

.divider{ height:1px; background:rgba(15,23,42,0.10); margin:14px 0; }

.footer{ padding:22px 0; }
.footer__inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--border); padding-top:16px; }
.footer__links{ display:flex; gap:14px; }

@media (max-width: 920px){
  .hero__inner{ grid-template-columns: 1fr; }
  h1{ font-size:36px; }
  .grid--3{ grid-template-columns: 1fr; }
  .contact{ grid-template-columns: 1fr; }
  .nav{ display:none; } /* keep it super simple on mobile */
}


.grid--2{ grid-template-columns: repeat(2, 1fr); }

.pill-row{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 12px; }
.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(11,95,255,0.08);
  border:1px solid rgba(11,95,255,0.16);
  color:var(--text);
  font-weight:700;
  font-size:12px;
}

.service--primary{
  border-color: rgba(11,95,255,0.28);
}

.norma{
  margin-top:12px;
  border-top:1px dashed rgba(15,23,42,0.18);
  padding-top:10px;
}
.norma summary{
  cursor:pointer;
  font-weight:800;
}

@media (max-width: 920px){
  .grid--2{ grid-template-columns: 1fr; }
}


/* Package accordion */
.pkg{
  margin-top:12px;
  border:1px solid rgba(15,23,42,0.12);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,0.7);
}
.pkg summary{
  cursor:pointer;
  font-weight:800;
  list-style:none;
}
.pkg summary::-webkit-details-marker{ display:none; }
.pkg[open]{ border-color: rgba(11,95,255,0.28); box-shadow: 0 12px 28px rgba(11,95,255,0.08); }
.pkg ul{ margin:8px 0 0; padding-left:18px; }


/* Nav dropdown (Servizi) */
.nav__dd{
  position: relative;
}
.nav__dd > summary{
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav__dd > summary::-webkit-details-marker{ display:none; }
.nav__dd > summary::after{
  content: "▾";
  font-size: 12px;
  color: var(--muted);
}
.nav__menu{
  position: absolute;
  top: 36px;
  left: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.nav__menu a{
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
}
.nav__menu a:hover{
  background: rgba(11,95,255,0.08);
  text-decoration: none;
  color: var(--primary);
}

/* Close dropdown when clicking outside: native details behavior is OK; keep menu only when open */
.nav__dd:not([open]) .nav__menu{ display:none; }


/* Compact hero for inner pages */
.hero--compact .hero__inner{ padding-top: 28px; padding-bottom: 28px; }
.bullets{ margin:14px 0 0; padding-left:18px; }
.bullets li{ margin:6px 0; color: var(--muted); }

/* Card rows */
.card__row{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--border); }
.card__row:last-of-type{ border-bottom:none; }
.card__k{ font-weight:700; color: var(--muted); }
.card__v{ font-weight:700; }

/* Contact layout (if not present) */
.contact{ display:grid; grid-template-columns: 1fr 1.2fr; gap:18px; align-items:start; }
.contact__box{ padding:18px; border-radius:18px; border:1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.form{ padding:18px; border-radius:18px; border:1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.form label{ display:block; font-weight:700; margin:12px 0 6px; }
.form input, .form select, .form textarea{
  width:100%; padding:12px 12px; border-radius:12px; border:1px solid var(--border); background:rgba(255,255,255,0.9);
  font: inherit;
}
.form textarea{ resize: vertical; }
@media (max-width: 920px){
  .contact{ grid-template-columns: 1fr; }
}


/* PRO polish */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,248,251,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header .container{ align-items: center; }

.nav{
  display:flex;
  align-items:center;
  gap:18px;
}
.nav a{ font-weight: 700; }
.nav__cta{ margin-left: 8px; }

:focus-visible{
  outline: 3px solid rgba(11,95,255,0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

.btn{
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn--ghost:hover{ background: rgba(11,95,255,0.08); }

.trust{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}
.trust .service{ min-height: 120px; }
@media (max-width: 980px){
  .trust{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .trust{ grid-template-columns: 1fr; }
}

.faq{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 920px){
  .faq{ grid-template-columns: 1fr; }
}
.faq details{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.faq summary{
  cursor:pointer;
  font-weight: 800;
}
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{
  content:"＋";
  float:right;
  color: var(--muted);
}
.faq details[open] summary::after{ content:"−"; }

.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 720px){
  .form-grid{ grid-template-columns: 1fr; }
}


/* Contatti CTA in menu */
.nav a[href*="contatti"]{
  background: #0b5fff;
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.nav a[href*="contatti"]:hover{
  background: #0847c7;
  color:#ffffff !important;
}


/* Micro animations */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
.card, .service, .price, .faq details{
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .service:hover, .price:hover{
  transform: translateY(-2px);
}
