/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0f;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

/* =========================================================
   REVEAL CONTAINER
   ========================================================= */
.reveal {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  user-select: none;
  --pos: 50%;
}

/* Both layers fill the viewport; the WOW layer is clipped. */
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* Base layer is under, Wow layer is on top and clipped from the right. */
.layer-base { z-index: 1; }
.layer-wow  {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  will-change: clip-path;
}

/* =========================================================
   LATO A — BASE (mediocre ma leggibile)
   ========================================================= */
.layer-base {
  background: #f2f2f2;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
}

.b-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #ddd;
  border-bottom: 2px solid #999;
}
.b-logo {
  font-weight: bold;
  font-size: 20px;
  color: #333;
}
.b-nav a {
  margin-left: 16px;
  color: #0044aa;
  text-decoration: underline;
  font-size: 14px;
}

.b-main {
  padding: 30px 28px 60px;
  max-width: 1100px;
}
.b-title {
  font-size: 28px;
  margin: 0 0 10px;
  color: #111;
}
.b-sub {
  font-size: 15px;
  line-height: 1.45;
  color: #444;
  max-width: 640px;
}
.b-btn {
  margin-top: 14px;
  background: #0044aa;
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 2px;
}
.b-btn:hover { background: #003388; }

.b-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.b-card {
  background: #fff;
  border: 1px solid #bbb;
  padding: 14px;
}
.b-thumb {
  width: 100%;
  height: 120px;
  background: #cfcfcf;
  margin-bottom: 10px;
}
.b-card h3 {
  margin: 6px 0;
  font-size: 16px;
}
.b-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #555;
}
.b-price {
  font-weight: bold;
  color: #0044aa;
  font-size: 14px;
}

.b-footer {
  padding: 14px 28px;
  background: #ddd;
  border-top: 2px solid #999;
  font-size: 12px;
  color: #555;
}

/* =========================================================
   LATO B — WOW (moderno, accattivante)
   ========================================================= */
.layer-wow {
  color: #f5f5ff;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 800px at 20% 10%, #1b1340 0%, #0a0a16 60%, #05050c 100%);
}

/* Decorative background */
.w-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(123, 92, 255, 0.25), transparent 60%),
    radial-gradient(500px 500px at 15% 90%, rgba(0, 220, 200, 0.18), transparent 60%);
  pointer-events: none;
}
.w-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}
.w-blob-1 {
  width: 360px; height: 360px;
  top: -80px; left: 30%;
  background: linear-gradient(135deg, #7b5cff, #ff5ca8);
}
.w-blob-2 {
  width: 280px; height: 280px;
  bottom: -60px; right: 10%;
  background: linear-gradient(135deg, #00dcc8, #5c8bff);
  animation-delay: -4s;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-20px) scale(1.05); }
}

.w-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 3;
}
.w-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; letter-spacing: 0.2px;
}
.w-logo b { font-weight: 700; background: linear-gradient(90deg,#7b5cff,#00dcc8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.w-logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg,#7b5cff,#00dcc8);
  box-shadow: 0 0 12px rgba(123,92,255,0.7);
}
.w-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.w-nav a {
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.w-nav a:hover { opacity: 1; transform: translateY(-1px); }
.w-cta {
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg,#7b5cff,#00dcc8);
  color: #0a0a16 !important;
  font-weight: 600;
  opacity: 1 !important;
  box-shadow: 0 8px 24px rgba(123,92,255,0.35);
}

.w-main {
  position: relative;
  padding: 60px 48px 80px;
  max-width: 1200px;
  z-index: 2;
}
.w-badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dcd6ff;
  margin-bottom: 20px;
}
.w-title {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.w-grad {
  background: linear-gradient(90deg,#7b5cff 0%, #ff5ca8 50%, #00dcc8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.w-sub {
  font-size: 17px;
  line-height: 1.6;
  color: #c9c7e0;
  max-width: 620px;
  margin: 0 0 28px;
}

.w-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.w-btn {
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.w-btn-primary {
  background: linear-gradient(135deg,#7b5cff,#ff5ca8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(123,92,255,0.35);
}
.w-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(123,92,255,0.5); }
.w-btn-ghost {
  background: rgba(255,255,255,0.06);
  color: #f5f5ff;
  border: 1px solid rgba(255,255,255,0.14);
}
.w-btn-ghost:hover { background: rgba(255,255,255,0.1); }

.w-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.w-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.w-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123,92,255,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.w-thumb {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.w-thumb-1 { background: linear-gradient(135deg,#7b5cff,#ff5ca8); }
.w-thumb-2 { background: linear-gradient(135deg,#00dcc8,#5c8bff); }
.w-thumb-3 { background: linear-gradient(135deg,#ff9a5c,#ff5ca8); }
.w-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(200px 120px at 30% 20%, rgba(255,255,255,0.35), transparent 60%);
}
.w-card-body { padding: 16px 18px 18px; }
.w-tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(123,92,255,0.18);
  color: #c9bfff;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.w-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.w-card p { margin: 0 0 14px; font-size: 14px; color: #b5b3cc; line-height: 1.45; }
.w-card-foot {
  display: flex; justify-content: space-between; align-items: center;
}
.w-price { font-weight: 700; font-size: 16px; }
.w-arrow {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}
.w-card:hover .w-arrow {
  background: linear-gradient(135deg,#7b5cff,#00dcc8);
  transform: translateX(4px);
  color: #0a0a16;
}

.w-footer {
  position: relative;
  display: flex; justify-content: space-between;
  padding: 20px 40px;
  font-size: 13px; color: #8e8cad;
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 2;
}

/* =========================================================
   SLIDER
   ========================================================= */
.slider {
  position: absolute;
  top: 0;
  left: var(--pos);
  transform: translateX(-50%);
  width: 56px;
  height: 100%;
  z-index: 10;
  cursor: grab;
  touch-action: none;
}
.slider:active,
.slider.dragging { cursor: grabbing; }

.slider-line {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.4),
    rgba(255,255,255,0.9) 30%,
    rgba(255,255,255,0.9) 70%,
    rgba(255,255,255,0.4));
  box-shadow: 0 0 20px rgba(123,92,255,0.55), 0 0 40px rgba(0,220,200,0.25);
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 14px 18px;
  min-width: 160px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(20,18,40,0.92), rgba(10,10,22,0.92));
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.5),
    0 0 24px rgba(123,92,255,0.35);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  pointer-events: none; /* drag happens on .slider */
}
.slider:hover .slider-handle {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    0 14px 36px rgba(0,0,0,0.55),
    0 0 32px rgba(123,92,255,0.55);
}

.slider-label {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.1;
}
.slider-label-small {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b5b3d8;
  margin-bottom: 4px;
}
.slider-label-big {
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lbl-base {
  color: #bfbfbf;
  text-transform: lowercase;
}
.lbl-arrow {
  color: #fff;
  opacity: 0.6;
}
.lbl-wow {
  background: linear-gradient(90deg,#7b5cff,#ff5ca8,#00dcc8);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.slider-arrows {
  display: flex; gap: 14px;
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.slider-arrows span { line-height: 1; }

/* Focus ring for accessibility */
.slider:focus { outline: none; }
.slider:focus .slider-handle {
  border-color: #7b5cff;
  box-shadow:
    0 14px 36px rgba(0,0,0,0.55),
    0 0 0 3px rgba(123,92,255,0.35),
    0 0 32px rgba(123,92,255,0.55);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 820px) {
  .b-nav { display: none; }
  .w-nav a:not(.w-cta) { display: none; }
  .b-cards, .w-cards { grid-template-columns: 1fr; }
  .b-main { padding: 20px; }
  .w-main { padding: 40px 22px 60px; }
  .slider-handle { min-width: 140px; padding: 12px 14px; }
  .slider-label-big { font-size: 13px; }
}
