/* ============================================
   ArtigianoPilot — Homepage Pre-Lancio
   Dark premium | Cyan + Orange | Mobile-first
   ============================================ */

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --bg-surface: #1a2332;
  --text: #f0f4f8;
  --text-muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --orange: #f97316;
  --orange-light: #fb923c;
  --glow-cyan: rgba(6, 182, 212, 0.12);
  --glow-orange: rgba(249, 115, 22, 0.10);
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--cyan-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

::selection {
  background: var(--cyan);
  color: var(--bg);
}

/* ---------- UTILITIES ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.badge--cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-light);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge--orange {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange-light);
  border: 1px solid rgba(249, 115, 22, 0.3);
  margin-top: 16px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.25);
}

.btn--primary:hover {
  background: var(--cyan-light);
  color: var(--bg);
  box-shadow: 0 0 32px rgba(6, 182, 212, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

.nav__brand:hover { color: var(--text); }

.nav__logo {
  border-radius: 8px;
  width: 36px;
  height: 36px;
}

.nav__links {
  display: none;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav__cta {
  background: rgba(6, 182, 212, 0.12) !important;
  color: var(--cyan-light) !important;
  font-weight: 600 !important;
}

.nav__cta:hover {
  background: rgba(6, 182, 212, 0.22) !important;
}

/* Hamburger */
.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 860px) {
  .nav__toggle { display: none; }
  .nav__links {
    display: flex;
  }
}

/* Mobile menu open */
@media (max-width: 859px) {
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 32px 24px;
    gap: 4px;
    align-items: stretch;
    z-index: 99;
    overflow-y: auto;
  }

  .nav__links.open a {
    font-size: 1.05rem;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
  }

  .nav__links.open .nav__cta {
    margin-top: 16px;
    text-align: center;
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 120px 0 60px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, var(--glow-cyan) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  text-align: center;
}

.hero__h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 12px 0 20px;
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.hero__visual {
  max-width: 520px;
}

.hero__img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

@media (min-width: 768px) {
  .hero { padding: 140px 0 80px; }

  .hero__inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .hero__actions {
    flex-direction: row;
    align-items: flex-start;
  }

  .hero__visual { max-width: 480px; }
}

/* V5.1: sezioni .feature rimosse dalla Home.
   Resta .feature__disclaimer, usato dalle pagine dettaglio. */
.feature__disclaimer {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--orange-light);
  margin-top: 12px;
}

.feature__disclaimer--subtle {
  background: rgba(148, 163, 184, 0.06);
  border-color: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 20px;
}

/* ---------- Desktop two-column: rimosso in V5.1 (sezioni .feature eliminate) ---------- */

/* ============================================
   TESTER
   ============================================ */
.tester {
  position: relative;
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}

.tester__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, var(--glow-orange) 0%, transparent 70%);
  pointer-events: none;
}

.tester__inner {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.tester__h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 16px 0 14px;
}

.tester__sub {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.tester__btn {
  width: 100%;
  max-width: 360px;
}

.tester__actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.tester__note {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .tester { padding: 100px 0; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.footer__logo {
  border-radius: 6px;
  width: 32px;
  height: 32px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer__nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.55;
}

.footer__disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.35;
  max-width: 500px;
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE HELPERS
   ============================================ */

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.3);
}

/* ============================================
   NAV — active state for detail pages
   ============================================ */
.nav__links .nav__active {
  color: var(--cyan-light) !important;
  font-weight: 600;
}

/* ============================================
   PAGE HERO — for detail pages
   ============================================ */
.page-hero {
  position: relative;
  padding: 120px 0 48px;
  text-align: center;
  overflow: hidden;
}

.page-hero__inner {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.page-hero__h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 12px 0 16px;
}

.page-hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .page-hero { padding: 140px 0 60px; }
}

/* ============================================
   DETAIL LAYOUT — hero+text or screenshot+text
   ============================================ */
.detail-layout {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
}

.detail-layout--alt {
  background: rgba(17, 24, 39, 0.45);
}

.detail-layout__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.detail-layout__visual {
  width: 100%;
  max-width: 520px;
}

.detail-layout__promo {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  width: 100%;
}

.detail-layout__text {
  flex: 1;
  min-width: 0;
}

.detail-layout__text h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.detail-layout__text h2:not(:first-child) {
  margin-top: 28px;
}

.detail-layout__text p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.detail-layout__note {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.75;
}

.detail-layout__shot {
  width: 100%;
  max-width: 480px;
}

@media (min-width: 768px) {
  .detail-layout { padding: 60px 0 80px; }

  .detail-layout__inner {
    flex-direction: row;
    gap: 60px;
    align-items: center;
  }

  .detail-layout--alt .detail-layout__inner {
    flex-direction: row-reverse;
  }

  .detail-layout__visual,
  .detail-layout__shot {
    flex: 0 0 42%;
    max-width: 42%;
  }

  .detail-layout__text {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .detail-layout__promo {
    max-height: 420px;
    object-fit: contain;
  }
}

/* ============================================
   SHOT CARD — screenshot wrapper
   ============================================ */
.shot-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot-card__img {
  width: 100%;
  max-width: 420px;
  object-fit: contain;
  display: block;
}

@media (max-width: 767px) {
  .shot-card__img {
    max-height: 360px;
  }
}

/* ============================================
   FLOW STEPS — shared numbered/icon list
   ============================================ */
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.flow-steps__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.flow-steps__item div {
  display: flex;
  flex-direction: column;
}

.flow-steps__item strong {
  color: var(--text);
}

.flow-steps__item span {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.flow-steps__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-light);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.flow-steps__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  margin-top: 2px;
}

/* ============================================
   DETAIL CTA — bottom CTA for detail pages
   ============================================ */
.detail-cta {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.detail-cta__inner {
  max-width: 520px;
  margin: 0 auto;
}

.detail-cta__inner h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.detail-cta__inner p {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.detail-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

@media (min-width: 768px) {
  .detail-cta__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ============================================
   V2 — SHOT NOTE (subtle caption for screenshots)
   ============================================ */
.shot-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.55;
  margin-top: 8px;
  text-align: center;
  font-style: normal;
}

/* V5: flow-grid rimossa — sostituita dalla scroll story (.story). */

/* ============================================
   V2 — FIELD BAND ("Sul campo" 3 bullets)
   ============================================ */
.field-band {
  padding: 64px 0;
  background: rgba(17, 24, 39, 0.45);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.field-band__inner {
  text-align: center;
}

.field-band__h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.field-band__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 540px;
  margin: 0 auto;
}

.field-band__list li {
  font-size: 1.05rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.field-band__list li::before {
  content: "\2022";
  color: var(--cyan);
  font-weight: 700;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .field-band__list {
    flex-direction: row;
    gap: 32px;
    max-width: 900px;
  }

  .field-band__list li {
    flex: 1;
    text-align: center;
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================
   V2 — MODE CARDS (preventivi 4 mini-cards)
   ============================================ */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 540px) {
  .mode-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .mode-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mode-cards__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  transition: border-color 0.25s;
}

.mode-cards__item:hover {
  border-color: rgba(6, 182, 212, 0.25);
}

.mode-cards__num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.mode-cards__item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.mode-cards__item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ============================================
   V2 — CHECK LIST (sopralluogo vertical)
   ============================================ */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.check-list__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.check-list__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.check-list__item div {
  display: flex;
  flex-direction: column;
}

.check-list__item strong {
  color: var(--text);
  font-size: 0.95rem;
}

.check-list__item span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ============================================
   V2 — TIMELINE (lavori: codice -> piano -> checklist)
   ============================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: rgba(6, 182, 212, 0.2);
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}

.timeline__dot {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-light);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(6, 182, 212, 0.25);
  z-index: 1;
}

.timeline__item div {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.timeline__item strong {
  color: var(--text);
}

.timeline__item span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* V5.1: .margin-table, .before-after e .pay-cols rimossi (sezioni Home eliminate). */

/* ============================================
   V2 — WHY GRID (3 reasons)
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.why-grid__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 24px;
  text-align: center;
}

.why-grid__icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.why-grid__item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.why-grid__item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   V2 — COMPARE (Prima / Con ArtigianoPilot)
   ============================================ */
.compare {
  width: 100%;
  margin-top: 32px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.compare th,
.compare td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.compare thead th {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 700;
}

.compare td:first-child {
  color: var(--text-muted);
}

.compare td:last-child {
  color: var(--cyan-light);
  font-weight: 600;
}

.compare tr:last-child td {
  border-bottom: none;
}

.compare-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.65;
  margin-top: 12px;
  font-style: italic;
  text-align: center;
}

/* ============================================
   V2 — TOUR (detail pages: visual tour)
   ============================================ */
.tour {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.tour__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.tour__shot {
  width: 100%;
  max-width: 520px;
}

.tour__focuses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .tour {
    padding: 80px 0;
  }

  .tour__inner {
    flex-direction: row;
    gap: 56px;
    align-items: flex-start;
  }

  .tour__shot {
    flex: 0 0 42%;
    position: sticky;
    top: 80px;
  }

  .tour__focuses {
    flex: 1;
    grid-template-columns: 1fr 1fr;
  }
}

.tour-focus {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.25s;
}

.tour-focus:hover {
  border-color: rgba(6, 182, 212, 0.25);
}

.tour-focus__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-light);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.tour-focus div {
  display: flex;
  flex-direction: column;
}

.tour-focus strong {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.tour-focus span {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ============================================
   V2 — LINKED FEATURES (detail pages)
   ============================================ */
.linked-features {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.linked-features__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.linked-features h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.linked-features__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.linked-features__links a {
  font-size: 0.95rem;
}

@media (min-width: 540px) {
  .linked-features__links {
    flex-direction: row;
    gap: 24px;
  }
}

/* V5.1: .home-feature__keys e varianti .feature rimosse (sezioni Home eliminate). */

/* ============================================
   V2 — FOCUS-VISIBLE
   ============================================ */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ============================================
   V2 — PREFERS-REDUCED-MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   V2 — RESPONSIVE (360/390/430/768/1024/1366/1440/1920)
   ============================================ */

/* 360px — small phones */
@media (max-width: 380px) {
  .container { padding: 0 16px; }

  .hero__h1 { font-size: 1.9rem; }
  .hero__sub { font-size: 0.95rem; }

  .btn {
    min-height: 48px;
    padding: 14px 22px;
  }

  .mode-cards__item { padding: 16px 14px; }
}

/* 390px — standard phones */
@media (min-width: 360px) and (max-width: 430px) {
  .hero__h1 { font-size: 2rem; }

  .btn {
    min-height: 48px;
  }
}

/* 768px — tablets */
@media (min-width: 768px) {
  .hero__actions {
    flex-direction: row;
    gap: 16px;
  }
}

/* 1024px — small desktop */
@media (min-width: 1024px) {
  .container { max-width: 1120px; }
}

/* 1366px — laptop */
@media (min-width: 1366px) {
  .container { max-width: 1200px; }
}

/* 1440px — desktop */
@media (min-width: 1440px) {
  .container { max-width: 1280px; }
}

/* 1920px — large screen */
@media (min-width: 1920px) {
  .container { max-width: 1400px; }
}

/* ============================================
   V2 — VISUAL FULL-WIDTH MOBILE
   ============================================ */
@media (max-width: 767px) {
  .hero__visual {
    max-width: 100%;
  }

  .hero__img {
    max-height: 320px;
    width: 100%;
    object-fit: contain;
  }

  .tour__shot {
    max-width: 100%;
  }

  .shot-card__img {
    max-height: 300px;
    width: 100%;
  }
}

/* ============================================
   V3 — BANDS + SECTION TITLES (replaces inline styles)
   ============================================ */
.band {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.center {
  text-align: center;
}

.band--tight {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title--sm {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 24px;
}

.section-sub {
  color: var(--text-muted);
  max-width: 500px;
  margin: 12px auto 0;
  line-height: 1.6;
}

.compare-wrap {
  max-width: 700px;
  margin: 0 auto;
  overflow-x: auto;
}

.disclaimer-band {
  padding: 0 0 48px;
}

.detail-layout__lead {
  margin-top: 16px;
}

.detail-layout__text .btn {
  margin-top: 20px;
}

/* V5.1: regole di conversione .feature rimosse (sezioni Home eliminate). */

/* ============================================
   V3 — PATH STRIP (detail signature module)
   ============================================ */
.path {
  padding: 8px 0 52px;
}

.path__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.path__step {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.path__arrow {
  color: var(--orange-light);
  font-weight: 800;
}

/* ============================================
   V3 — POLISH (depth, hover, rhythm)
   ============================================ */
/* V5.1: separatore .feature rimosso (sezioni Home eliminate). */

.hero__img {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
}

.hero__actions--spaced {
  margin-top: 24px;
}

.shot-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.09);
}

.why-grid__item,
.tour-focus {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn--primary:hover {
  transform: translateY(-1px);
}

.btn--ghost:hover {
  border-color: rgba(6, 182, 212, 0.4);
}

.nav__links .nav__active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.tester__actions {
  margin-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  .why-grid__item:hover,
  .tour-focus:hover {
    transform: translateY(-3px);
    border-color: rgba(6, 182, 212, 0.28);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  }
}

/* ============================================
   V4 — IMAGE LEGIBILITY BOOST (sobrio)
   ============================================ */
.hero__visual {
  max-width: 560px;
}

@media (min-width: 768px) {
  .hero__visual {
    max-width: 560px;
  }

  .detail-layout__visual {
    flex: 0 0 44%;
    max-width: 44%;
  }

  .detail-layout__shot {
    flex: 0 0 44%;
    max-width: 520px;
  }

  .shot-card__img {
    max-width: 470px;
  }
}

@media (min-width: 1024px) {
  .detail-layout__promo {
    max-height: 480px;
  }
}

@media (min-width: 381px) and (max-width: 767px) {
  .shot-card__img {
    max-height: 420px;
  }
}

/* ============================================
   V4 — ZOOM TRIGGER (cue "ingrandisci")
   ============================================ */
.zoom {
  position: relative;
  display: block;
  border-radius: inherit;
}

.zoom > img {
  cursor: zoom-in;
}

.shot-card .zoom {
  width: 100%;
}

.zoom__hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(4, 7, 12, 0.72);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.zoom__hint::before {
  content: "\2922";
  font-size: 0.85rem;
}

.zoom:hover .zoom__hint,
.zoom:focus-visible .zoom__hint {
  opacity: 1;
}

@media (hover: none) {
  .zoom__hint {
    opacity: 1;
  }
}

/* ============================================
   V4.1 — LIGHTBOX (fit / dimensione reale)
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 24px;
  background: rgba(4, 7, 12, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.open {
  opacity: 1;
}

.lightbox__toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox__viewport {
  width: min(1180px, 100%);
  max-height: calc(100vh - 96px);
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.lightbox__figure {
  margin: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-card);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.lightbox--actual .lightbox__viewport {
  overflow: auto;
  max-height: calc(100vh - 96px);
}

.lightbox--actual .lightbox__figure {
  align-items: center;
  min-height: 100%;
}

.lightbox--actual .lightbox__img {
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: initial;
  cursor: zoom-out;
}

.lightbox__caption {
  margin: 12px auto 6px;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  max-width: 640px;
}

.lightbox__size,
.lightbox__close {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(17, 24, 39, 0.92);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lightbox__size {
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.lightbox__size-icon {
  font-size: 1rem;
  line-height: 1;
}

.lightbox__close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox__size:hover,
.lightbox__size:focus-visible,
.lightbox__close:hover,
.lightbox__close:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan-light);
  background: rgba(17, 24, 39, 0.98);
}

body.lightbox-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox__img,
  .lightbox__size,
  .lightbox__close,
  .zoom__hint {
    transition: none;
  }
}

@media (max-width: 430px) {
  .lightbox {
    padding: 68px 12px 12px;
  }

  .lightbox__toolbar {
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: flex-end;
  }

  .lightbox__size {
    padding: 0 13px;
    font-size: 0.78rem;
  }

  .lightbox__viewport,
  .lightbox--actual .lightbox__viewport {
    width: 100%;
    max-height: calc(100vh - 80px);
  }

  .lightbox__img {
    max-height: 70vh;
  }
}

/* ============================================
   V5 — SCROLL STORY
   Lineare di default (no-JS e mobile).
   Sticky immersivo solo con html.js sopra 1024px.
   ============================================ */
.story {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.story__head {
  margin-bottom: 8px;
}

.story__media {
  display: none;
}

.story__steps {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 40px;
}

.story__step h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}

.story__step p {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 440px;
}

.story__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.story__card {
  margin-top: 20px;
}

.story__card .zoom img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.story__close {
  padding: 16px 0 8px;
}

.story__close h3 {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 520px;
}

.story__cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cyan-light);
}

.story__cta:hover {
  color: var(--orange-light);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 1024px) {
  html.js .story__media {
    display: flex;
  }

  html.js .story__card {
    display: none;
  }

  .story__body {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 56px;
    align-items: start;
    margin-top: 48px;
  }

  .story__media {
    position: sticky;
    top: 96px;
    height: calc(100vh - 128px);
    min-height: 480px;
    max-height: 740px;
    flex-direction: column;
  }

  .story__frame {
    position: relative;
    flex: 1;
    min-height: 0;
    perspective: 1200px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.6), rgba(10, 14, 23, 0.9));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    padding: 28px;
  }

  .story__shot {
    position: absolute;
    inset: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.97) translateY(14px);
    transition: opacity 0.5s ease, transform 0.55s ease;
  }

  .story__shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transform: rotateY(-1.5deg) rotateX(0.5deg);
    transition: transform 0.55s ease;
  }

  .story__shot.is-active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 1;
  }

  .story__shot.is-active img {
    transform: none;
  }

  .story__steps {
    margin-top: 0;
    gap: 0;
  }

  .story__step {
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.38;
    transition: opacity 0.3s ease;
  }

  .story__step.is-active {
    opacity: 1;
  }

  .story__step.is-active .story__num {
    background: rgba(6, 182, 212, 0.14);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--cyan-light);
  }

  .story__close {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
  }

  .story__progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .story__rail {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
  }

  .story__fill {
    display: block;
    height: 100%;
    width: 14.29%;
    background: linear-gradient(90deg, var(--cyan), var(--orange-light));
    border-radius: 2px;
    transition: width 0.4s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story__shot,
  .story__shot img,
  .story__step,
  .story__fill {
    transition: none;
  }

  .story__shot {
    transform: none;
  }

  .story__shot img {
    transform: none;
  }

  .story__step {
    opacity: 1;
  }
}

/* V5.1: .divider e .eyebrow rimossi con le sezioni Home. */

/* ============================================
   V5.4 — CROSS LINK + BACK LINK (pagine secondo livello)
   ============================================ */
.back-link-wrap {
  padding-top: 96px;
}

.back-link {
  margin: 0;
}

.back-link a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.back-link a:hover {
  color: var(--cyan-light);
}

.page-hero--tight {
  padding-top: 40px;
}

.cross-link {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cross-link__inner {
  max-width: 560px;
  margin: 0 auto;
}

.cross-link__eyebrow {
  color: var(--cyan-light);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cross-link h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cross-link p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 12px 0 24px;
}
