:root{
  --bg: #16214d;               /* sfondo uniforme */
  --text: #e9edff;
  --muted: rgba(233,237,255,.72);
  --muted2: rgba(233,237,255,.55);

  --border: rgba(233,237,255,.10);

  --accent: #7c5cff;
  --accent2:#26c6ff;

  --shadow: 0 14px 50px rgba(0,0,0,.28);
  --radius: 18px;

  /* Card tones */
  --card: rgba(255,255,255,.06);      /* “card chiara” (come sezione 1/2) */
  --card-dark: rgba(255,255,255,.03); /* “card scura” (es. risposta) */
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: var(--bg);              /* ✅ UNIFORME */
}

a{ color:inherit; }

.wrap{
  width:min(1100px, 92vw);
  margin:0 auto;
  padding:28px 0 70px;
}

/* ================= HEADER / NAV ================= */

header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  user-select:none;
}

.logo{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(38,198,255,1));
  box-shadow: 0 10px 30px rgba(124,92,255,.20);
}

.brand h1{
  font-size:16px;
  margin:0;
  letter-spacing:.2px;
  font-weight: 700;
}
.brand span{
  display:block;
  margin-top:2px;
  font-size:12px;
  color: var(--muted2);
  font-weight: 450;
}

#mainNav, nav{
  display:flex;
  align-items:center;
  gap: 10px;
}

#mainNav a, nav a{
  text-decoration:none;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}

#mainNav a:hover, nav a:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
}

.nav-active{
  color: var(--text) !important;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid var(--border) !important;
}

/* ================= CARDS / TYPO ================= */

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;                   /* ✅ evita “stacchi” a bande */
}

.card-dark{
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.card-inner{ padding:18px; }

.h1{
  font-size: 42px;
  line-height: 1.05;
  margin: 10px 0 8px;
  letter-spacing: -0.6px;
  font-weight: 900;
}

.sub{
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin:0;
}

.pilltag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 12px;
  border-radius:999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: 12px;
}

/* ================= BUTTONS ================= */

.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  min-height: 42px;
  transition: .15s ease;
  text-decoration:none;
  white-space: nowrap;
}
.btn:hover{ background: rgba(255,255,255,.06); }

.btn-primary{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(38,198,255,.85));
  border-color: rgba(124,92,255,.45);
  color: #0b1020;
  font-weight: 900;
}

/* ================= LAYOUT HELPERS ================= */

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px){
  .grid-3{ grid-template-columns:1fr; }
}

/* ================= PRICING ================= */

.plan{ padding:18px; }
.plan .name{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.plan h3{
  margin:0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
}
.plan .price{
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin: 10px 0 0;
}
.plan .per{
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}
.plan ul{
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.plan li{
  display:flex;
  gap:10px;
  color: var(--muted);
  line-height:1.35;
}
.plan li b{ color: var(--text); }

.icon{
  width: 18px;
  display:inline-flex;
  justify-content:center;
  opacity:.92;
}

.plan .cta{
  margin-top: 16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.plan.featured{
  position:relative;
  border-color: rgba(124,92,255,.50);
  box-shadow: 0 18px 60px rgba(124,92,255,.14);
}
.plan.featured::before{
  content:"Consigliato";
  position:absolute;
  top:-12px;
  left: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(38,198,255,.85));
  color: #0b1020;
  font-weight: 900;
}

/* Toggle */
.toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  flex-wrap:wrap;
}
.switch{
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border:1px solid var(--border);
  position:relative;
  cursor:pointer;
}
.knob{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  position:absolute;
  top: 2px;
  left: 2px;
  transition: .2s ease;
}
.switch.on .knob{ left: 28px; }
.kicker{
  text-align:center;
  margin-top: 6px;
  color: var(--muted2);
  font-size: 12px;
}

/* ================= MOBILE NAV (hamburger + overlay) ================= */

.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  cursor:pointer;
  padding:0;
}

.nav-toggle span{
  display:block;
  width:18px;
  height:2px;
  background:var(--text);
  margin:3px 0;
  border-radius:2px;
}

.mobile-nav{
  position:fixed;
  inset:0;
  background:rgba(5,8,18,.85);
  backdrop-filter: blur(12px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:24px;
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
  z-index:9999;
}

.mobile-nav a{
  font-size:22px;
  font-weight:900;
  color:var(--text);
  text-decoration:none;
  padding:10px 16px;
  border-radius:14px;
}

.mobile-nav a:hover{
  background: rgba(255,255,255,.06);
}

body.nav-open .mobile-nav{
  opacity:1;
  pointer-events:auto;
}

/* Breakpoint: desktop nav ON, mobile nav OFF */
@media (max-width: 820px){
  #mainNav, header nav{ display:none; }
  .nav-toggle{ display:flex; }
}
