/* ==========================================================================
   RESILIA — E-commerce videocorso patente B
   Shared stylesheet
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* Brand blues */
  --blue-600: #2F63FF;
  --blue-700: #1A3CB3;
  --blue-800: #142E86;
  --blue-900: #0E2166;

  --blue-50:  #EEF3FF;
  --blue-100: #D9E3FF;
  --blue-200: #B4C7FF;

  /* Accent */
  --yellow:      #FFD445;
  --yellow-soft: #FFF3B8;

  /* Text */
  --ink-900: #0B1020;
  --ink-700: #1F2540;
  --ink-500: #4A5272;
  --ink-400: #6B7391;

  /* Neutrals */
  --white:   #FFFFFF;
  --soft-1:  #F5F7FC;
  --soft-2:  #EEF1F8;
  --border:  #E3E8F2;

  /* State */
  --green:      #14B86A;
  --green-soft: #E4F7EE;
  --red:        #E5484D;

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 14px rgba(14, 33, 102, .06);
  --shadow-md: 0 10px 30px rgba(14, 33, 102, .08);
  --shadow-lg: 0 24px 60px rgba(14, 33, 102, .14);
  --shadow-yellow: 0 14px 34px rgba(255, 212, 69, .35);

  /* Layout */
  --container: 1200px;
  --pad-x: 24px;
}

/* ---------- Reset ------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-500);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--ink-900); }

/* Focus */
:focus-visible {
  outline: 3px solid var(--blue-200);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Typography -------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--ink-900);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.2vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem); letter-spacing: -0.018em; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p  { text-wrap: pretty; }

.hl-yellow {
  background: linear-gradient(180deg, transparent 55%, var(--yellow-soft) 55%);
  padding: 0 .12em;
  border-radius: 4px;
}
.text-ink-900 { color: var(--ink-900); }
.text-ink-700 { color: var(--ink-700); }
.text-muted   { color: var(--ink-500); }

/* ---------- Layout helpers --------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-sm { padding: clamp(40px, 6vw, 64px) 0; }

.stack { display: flex; flex-direction: column; }
.row { display: flex; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.center { align-items: center; }
.between { justify-content: space-between; align-items: center; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(47, 99, 255, .28);
}
.btn-primary:hover { background: var(--blue-700); box-shadow: 0 14px 30px rgba(47, 99, 255, .36); }

.btn-dark {
  background: var(--ink-900);
  color: var(--white);
}
.btn-dark:hover { background: #000; }

.btn-yellow {
  background: var(--yellow);
  color: var(--ink-900);
  box-shadow: var(--shadow-yellow);
}
.btn-yellow:hover { background: #FFCB28; }

.btn-ghost {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink-900);
}
.btn-ghost:hover { border-color: var(--ink-900); background: var(--white); }

.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Badges / chips --------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.chip-blue   { background: var(--blue-50); color: var(--blue-800); border-color: var(--blue-100); }
.chip-yellow { background: var(--yellow-soft); color: #7A5A00; border-color: #FFE58A; }
.chip-green  { background: var(--green-soft); color: #0C7F47; border-color: #BFE9D3; }
.chip-ink    { background: var(--ink-900); color: var(--white); }
.chip-white  { background: var(--white); color: var(--ink-900); border-color: var(--border); }

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink-900);
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--blue-600);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(47, 99, 255, .35);
}
.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-700);
  padding: 6px 2px;
  position: relative;
}
.main-nav a:hover { color: var(--ink-900); }
.main-nav a.active { color: var(--blue-600); font-weight: 600; }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--blue-600); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-700);
  background: var(--white);
}
.cart-btn:hover { border-color: var(--ink-900); color: var(--ink-900); }
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--blue-600); color: white;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid white;
}
.cart-count[data-count="0"] { display: none; }

/* ---------- Hero (Home) ------------------------------------------------- */
.hero {
  padding: 56px 0 80px;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(47, 99, 255, .10), transparent 60%),
    radial-gradient(700px 400px at -5% 110%, rgba(255, 212, 69, .15), transparent 55%),
    linear-gradient(180deg, var(--soft-1), var(--white));
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero h1 { margin: 18px 0 18px; }
.hero-sub { font-size: 1.12rem; color: var(--ink-500); max-width: 520px; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-trust {
  display: grid; gap: 10px;
  font-size: 14px; color: var(--ink-700);
}
.hero-trust li { display: flex; align-items: center; gap: 10px; }
.hero-trust .ic {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}

.hero-card-wrap { position: relative; }
.hero-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
  position: relative;
}
.hero-card:hover { transform: rotate(0deg); transition: transform .4s ease; }

.hero-stat {
  position: absolute;
  background: white;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  z-index: 2;
}
.hero-stat .num { font-size: 22px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.02em; }
.hero-stat .lbl { font-size: 12px; color: var(--ink-500); }
.hero-stat.s1 { top: -18px; left: -24px; }
.hero-stat.s2 { bottom: -22px; right: -22px; }

/* ---------- Video card (reusable) -------------------------------------- */
.video-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(179, 199, 255, .25), transparent 60%),
    linear-gradient(135deg, var(--blue-800), var(--blue-900) 55%, #081755);
  color: white;
}
.video-card::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(140px 80px at 18% 92%, rgba(47, 99, 255, .4), transparent 70%),
    radial-gradient(160px 90px at 80% 12%, rgba(255, 212, 69, .15), transparent 70%);
  pointer-events: none;
}
.video-card .play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 76px; height: 76px;
  border-radius: 999px;
  background: white;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  z-index: 3;
}
.video-card .play svg { width: 28px; height: 28px; color: var(--ink-900); margin-left: 3px; }
.video-card .tag-tl, .video-card .tag-br {
  position: absolute;
  font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  z-index: 3;
}
.video-card .tag-tl { top: 14px; left: 14px; }
.video-card .tag-br { bottom: 14px; right: 14px; }
.video-card .gridlines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(80% 60% at 50% 50%, black, transparent 80%);
  z-index: 1;
}
.video-card .road {
  position: absolute; left: 50%; bottom: -12%;
  width: 220%; height: 70%;
  transform: translateX(-50%) perspective(600px) rotateX(58deg);
  background:
    linear-gradient(180deg, transparent 0%, rgba(255,255,255,.08) 60%, rgba(255,255,255,.14) 100%),
    repeating-linear-gradient(90deg, transparent 0 80px, var(--yellow) 80px 112px, transparent 112px 200px);
  opacity: .7;
  z-index: 1;
}

.product-meta {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px 6px 4px;
}
.product-meta .title { font-weight: 700; color: var(--ink-900); font-size: 15.5px; }
.product-meta .sub { font-size: 13px; color: var(--ink-500); }
.product-meta .price-old { text-decoration: line-through; color: var(--ink-400); font-size: 13px; }
.product-meta .price-new { color: var(--blue-600); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

/* ---------- Trust bar --------------------------------------------------- */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--white);
  padding: 22px 0;
}
.trust-logos {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.trust-logos .label { font-size: 12.5px; color: var(--ink-400); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.pay-logo {
  height: 28px;
  display: inline-flex; align-items: center;
  color: var(--ink-500);
  font-weight: 800;
  letter-spacing: -0.02em;
  opacity: .85;
  filter: grayscale(30%);
}
.pay-logos { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }

/* ---------- Disclaimer banner ------------------------------------------ */
.disclaimer {
  background: var(--yellow-soft);
  border: 1px solid #FFE58A;
  border-radius: var(--r-md);
  padding: 18px 22px;
  display: flex; gap: 14px; align-items: flex-start;
  color: #5A4200;
  font-size: 14.5px;
  line-height: 1.55;
}
.disclaimer .ic {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--yellow); color: var(--ink-900);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; flex: none;
}
.disclaimer strong { color: var(--ink-900); }
.disclaimer .cds { display: block; margin-top: 4px; font-size: 13px; color: #7A5A00; }

/* ---------- Steps (Come funziona) -------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.step-num {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-600); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(47, 99, 255, .3);
}
.step-card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.step-arrow {
  position: absolute;
  right: -24px; top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: white; border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue-600);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

/* ---------- Section heads --------------------------------------------- */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  color: var(--blue-600);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--ink-500); max-width: 640px; margin: 0 auto; }

/* ---------- Product showcase ------------------------------------------ */
.product-showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}
.gallery {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
}
.thumbs { display: flex; flex-direction: column; gap: 12px; }
.thumb {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--blue-900);
  cursor: pointer;
  position: relative;
  transition: transform .2s, border-color .2s;
}
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(47, 99, 255, .3), rgba(20, 46, 134, .6));
}
.thumb.active { border-color: var(--blue-600); }
.thumb:hover { transform: translateY(-2px); }
.thumb span {
  position: absolute; z-index: 2;
  inset: 0; display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 12px;
  letter-spacing: 0.02em;
}
.main-view { position: relative; }
.main-view .label {
  position: absolute; left: 16px; top: 16px;
  z-index: 4;
  background: rgba(255,255,255,.96);
  color: var(--ink-900);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.product-info .rating {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--ink-700);
  font-size: 14px;
  margin-bottom: 14px;
}
.stars { color: var(--yellow); letter-spacing: 2px; font-size: 16px; }

.price-block {
  margin: 22px 0;
  padding: 22px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--blue-200);
  background: linear-gradient(180deg, var(--blue-50), white);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.price-block .now { font-size: 2.4rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.03em; }
.price-block .was { text-decoration: line-through; color: var(--ink-400); font-size: 1.1rem; }
.price-block .once { font-size: 13px; font-weight: 600; color: var(--ink-700); background: white; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); }

.feature-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 26px;
}
.feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--ink-700);
}
.feature-list .check {
  flex: none;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* ---------- Stats strip ------------------------------------------------ */
.stats-strip {
  background:
    radial-gradient(900px 260px at 20% 0%, rgba(47, 99, 255, .35), transparent 60%),
    radial-gradient(700px 200px at 95% 100%, rgba(255, 212, 69, .1), transparent 60%),
    linear-gradient(135deg, var(--blue-900), var(--blue-800) 60%, #1a3cb3);
  color: white;
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat .num {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: white;
  line-height: 1;
  margin-bottom: 8px;
}
.stat .num .yellow { color: var(--yellow); }
.stat .lbl { font-size: 14px; color: rgba(255,255,255,.7); }

/* ---------- Feature grid ----------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 28px 26px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--blue-50); color: var(--blue-600);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; color: var(--ink-500); }

/* ---------- Testimonials ----------------------------------------------- */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.testi-card .stars { margin-bottom: 12px; }
.testi-card p { color: var(--ink-700); font-size: 15px; margin-bottom: 18px; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--blue-50); color: var(--blue-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.testi-who .name { font-weight: 600; color: var(--ink-900); font-size: 14px; }
.testi-who .meta { font-size: 12.5px; color: var(--ink-500); }

/* ---------- CTA banner ------------------------------------------------- */
.cta-banner {
  background:
    radial-gradient(800px 400px at 110% 0%, rgba(255, 212, 69, .2), transparent 60%),
    radial-gradient(600px 300px at -10% 120%, rgba(47, 99, 255, .3), transparent 60%),
    linear-gradient(135deg, var(--blue-900), #081755);
  color: white;
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: white; margin-bottom: 14px; max-width: 720px; margin-inline: auto; }
.cta-banner p { color: rgba(255,255,255,.8); max-width: 540px; margin: 0 auto 28px; font-size: 1.05rem; }

/* ---------- Footer ----------------------------------------------------- */
.site-footer {
  background: #050A1C;
  color: rgba(255,255,255,.7);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo { color: white; margin-bottom: 18px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,.55); max-width: 360px; }
.footer-col h4 {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,.85);
  margin-bottom: 18px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,.6); font-size: 14px; }
.footer-col a:hover { color: white; }
.footer-bottom {
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.footer-pays { display: flex; gap: 18px; align-items: center; }
.footer-pays .pay-logo { color: rgba(255,255,255,.6); font-size: 13px; }

/* ---------- Page headers (secondary pages) ----------------------------- */
.page-header {
  background: linear-gradient(180deg, var(--soft-1), white);
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb { font-size: 13px; color: var(--ink-500); display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb .sep { color: var(--ink-400); }

/* ---------- Product page modules --------------------------------------- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.module-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.module-num {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: block;
}
.module-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.module-card p { font-size: 14.5px; color: var(--ink-500); margin-bottom: 18px; }
.module-meta {
  display: flex; gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--ink-500);
}
.module-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Comparison cards */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.compare-card {
  border-radius: var(--r-xl);
  padding: 36px 32px;
  position: relative;
}
.compare-card.plain {
  background: var(--soft-1);
  border: 1px solid var(--border);
  color: var(--ink-700);
}
.compare-card.plain h3 { color: var(--ink-700); }
.compare-card.plain .price { color: var(--ink-500); }
.compare-card.plain li { opacity: .75; }

.compare-card.featured {
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(255, 212, 69, .15), transparent 60%),
    linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: white;
  box-shadow: var(--shadow-lg);
}
.compare-card.featured h3 { color: white; }
.compare-card .price { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.compare-card .price small { font-size: .85rem; font-weight: 500; opacity: .7; }
.compare-card .sub { margin-bottom: 22px; opacity: .8; }
.compare-card ul { display: grid; gap: 10px; margin-bottom: 26px; }
.compare-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.compare-card .reco {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--yellow);
  color: var(--ink-900);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- Checkout --------------------------------------------------- */
.progress {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.progress .step {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--soft-1); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--ink-500);
}
.progress .step .dot {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--border); color: var(--ink-500);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.progress .step.active { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-800); }
.progress .step.active .dot { background: var(--blue-600); color: white; }
.progress .step.done { background: var(--green-soft); border-color: #BFE9D3; color: #0C7F47; }
.progress .step.done .dot { background: var(--green); color: white; }
.progress .sep { color: var(--ink-400); font-weight: 700; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  margin-bottom: 20px;
}
.form-card h3 {
  font-size: 1.1rem; margin-bottom: 6px;
}
.form-card .form-sub { font-size: 14px; color: var(--ink-500); margin-bottom: 22px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.form-row.single { grid-template-columns: 1fr; }
.form-field { display: grid; gap: 6px; }
.form-field label {
  font-size: 13px; font-weight: 600; color: var(--ink-700);
}
.form-field input, .form-field select {
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: white;
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(47, 99, 255, .12);
}
.form-field .hint { font-size: 12.5px; color: var(--ink-400); }

.pay-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 10px;
}
.pay-option:hover { border-color: var(--blue-200); }
.pay-option input { accent-color: var(--blue-600); width: 18px; height: 18px; }
.pay-option .label { font-weight: 600; color: var(--ink-900); flex: 1; }
.pay-option .pay-logo { height: 22px; font-size: 13px; }
.pay-option:has(input:checked) { border-color: var(--blue-600); background: var(--blue-50); }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: 14px;
  background: var(--soft-1);
  font-size: 14px;
  color: var(--ink-700);
  margin-top: 14px;
}
.checkbox-row input { margin-top: 3px; accent-color: var(--blue-600); width: 18px; height: 18px; flex: none; }

.summary-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  position: sticky;
  top: 96px;
  box-shadow: var(--shadow-md);
}
.summary-card h3 { font-size: 1.05rem; margin-bottom: 18px; }
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.cart-item .thumb-sm {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--blue-900);
}
.cart-item .thumb-sm::after {
  content: "▶";
  position: absolute; inset: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}
.cart-item .info .title { font-weight: 600; color: var(--ink-900); font-size: 14px; margin-bottom: 4px; }
.cart-item .info .qty   { font-size: 12.5px; color: var(--ink-500); }
.cart-item .info .price { font-weight: 700; color: var(--ink-900); margin-top: 6px; }

.summary-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 14.5px; color: var(--ink-700);
}
.summary-line.total {
  padding-top: 18px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
  color: var(--ink-900);
  font-weight: 800;
}
.summary-line .free { color: var(--green); font-weight: 600; }

.info-box {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--blue-50);
  border-radius: 12px;
  border: 1px solid var(--blue-100);
  font-size: 13.5px;
  color: var(--blue-800);
  display: flex; gap: 10px; align-items: flex-start;
}
.coupon-box {
  margin-top: 14px;
  padding: 16px;
  background: var(--yellow-soft);
  border: 1px solid #FFE58A;
  border-radius: 12px;
}
.coupon-box .lbl {
  font-size: 13px; font-weight: 700; color: var(--ink-900); margin-bottom: 8px;
}
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid #FFE58A; background: white; }
.coupon-row button { padding: 0 18px; border-radius: 10px; height: 42px; }

/* ---------- Confirmation page ----------------------------------------- */
.conferma-hero {
  text-align: center;
  padding: 40px 0 28px;
}
.check-circle {
  width: 96px; height: 96px; border-radius: 999px;
  background: var(--green); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  box-shadow: 0 18px 40px rgba(20, 184, 106, .35);
  animation: pop 500ms cubic-bezier(.22, 1.6, .4, 1);
}
.check-circle svg { width: 44px; height: 44px; }
@keyframes pop {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.order-id-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--soft-1);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-700);
  font-weight: 600;
  margin-top: 18px;
}
.order-id-pill strong { color: var(--ink-900); font-weight: 800; letter-spacing: 0.03em; }

.conferma-recap {
  max-width: 560px;
  margin: 40px auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.conferma-recap .ctas { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- Come funziona mock blocks --------------------------------- */
.howto-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 72px;
}
.howto-block.reverse { grid-template-areas: "right left"; }
.howto-block.reverse > :nth-child(1) { grid-area: left; }
.howto-block.reverse > :nth-child(2) { grid-area: right; }

.mock-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.mock-video { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/10; }
.mock-progress {
  height: 6px; border-radius: 999px;
  background: var(--border);
  margin-top: 16px;
  overflow: hidden;
  position: relative;
}
.mock-progress::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-700));
  width: 68%;
  border-radius: 999px;
}
.mock-progress-label { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--ink-500); }

.mock-quiz {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.mock-quiz .q-meta {
  display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-500); margin-bottom: 12px;
}
.mock-quiz h4 {
  font-size: 1.2rem; color: var(--ink-900); margin-bottom: 18px; font-weight: 700;
  letter-spacing: -0.01em;
}
.mock-quiz .q-opts { display: grid; gap: 10px; }
.q-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 14.5px; color: var(--ink-700);
}
.q-opt .tick {
  width: 22px; height: 22px; border-radius: 999px;
  border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.q-opt.correct { border-color: var(--green); background: var(--green-soft); color: #0C7F47; font-weight: 600; }
.q-opt.correct .tick { background: var(--green); color: white; border-color: var(--green); }

/* ---------- Split cards (Resilia vs Scuola guida) --------------------- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.split-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
}
.split-card .big-ic {
  width: 64px; height: 64px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.split-card.resilia .big-ic { background: var(--blue-600); color: white; }
.split-card.scuola  .big-ic { background: var(--yellow); color: var(--ink-900); }
.split-card h3 { margin-bottom: 18px; font-size: 1.3rem; }
.split-card ul { display: grid; gap: 10px; }
.split-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-700); }

.highlight-quote {
  background: var(--blue-50);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  margin-top: 28px;
  text-align: center;
  color: var(--blue-900);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.55;
  border: 1px solid var(--blue-100);
}

/* ---------- Chi siamo ------------------------------------------------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pillar-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  text-align: center;
}
.pillar-card .feature-icon { margin-inline: auto; }

.data-table {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.data-table table { width: 100%; border-collapse: collapse; }
.data-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--ink-700);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { font-weight: 600; color: var(--ink-900); width: 38%; }

/* ---------- FAQ -------------------------------------------------------- */
.faq-group { margin-bottom: 48px; }
.faq-group h2 { margin-bottom: 20px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: white;
  margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.faq-item[open] { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 600;
  color: var(--ink-900);
  font-size: 15.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--soft-1);
  color: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s, background .15s, color .15s;
  flex: none;
  font-weight: 600;
}
.faq-item[open] summary::after {
  content: "−";
  background: var(--blue-600); color: white;
  transform: rotate(180deg);
}
.faq-item .body {
  padding: 0 24px 22px;
  color: var(--ink-500);
  font-size: 14.5px;
  line-height: 1.65;
}
.faq-item .body p + p { margin-top: 10px; }

/* ---------- Toast ----------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-900);
  color: white;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast .ic {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--green); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* ---------- Mobile nav ------------------------------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-700);
  cursor: pointer;
  flex: none;
}
.nav-toggle:hover { border-color: var(--ink-900); color: var(--ink-900); }

/* ---------- Utility ---------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid,
  .product-showcase,
  .compare-grid,
  .howto-block, .howto-block.reverse,
  .split-grid,
  .checkout-grid { grid-template-columns: 1fr; gap: 40px; }
  .howto-block.reverse { grid-template-areas: none; }
  .hero-card { transform: none; }
  .hero-stat.s1 { top: -14px; left: 10px; }
  .hero-stat.s2 { bottom: -14px; right: 10px; }

  .steps-grid,
  .feature-grid,
  .testi-grid,
  .modules-grid,
  .pillars-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .step-arrow { display: none; }

  .summary-card { position: static; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 41;
    padding: 16px var(--pad-x);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav li:last-child a { border-bottom: 0; }

  .gallery { grid-template-columns: 1fr; }
  .thumbs { flex-direction: row; }
  .thumb { width: 72px; flex: none; }

  .trust-logos { justify-content: center; }
  .pay-logos { gap: 20px; }

  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { --pad-x: 18px; }
  .header-inner { height: 64px; }
  .main-nav { top: 64px; }
  .btn { padding: 12px 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .price-block .now { font-size: 2rem; }
  .form-card { padding: 22px; }
}
