:root {
  --bg: #fff;
  --bg-soft: #f4f8ff;
  --ink: #0b1b33;
  --muted: #4d5b73;
  --line: #d9e4f5;
  --blue: #0067fe;
  --blue-dark: #0050c8;
  --navy: #0067fe;
  --ok: #0f7a4a;
  --warn: #c05621;
  --radius: 18px;
  --max: 1080px;
  --font: "Outfit", sans-serif;
  --shadow: 0 16px 40px rgba(22, 22, 26, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

button, input, select { font-family: inherit; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--blue);
  border-bottom: 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand {
  display: block;
  width: 156px;
  height: 36px;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: 156px;
  height: 36px;
  object-fit: contain;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(255, 85, 31, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}

.nav-links a.is-active,
.nav-links a:hover { color: #fff; }

.site-header .nav-cta {
  background: #fff;
  color: var(--blue);
}

.site-header .nav-cta:hover { background: #e8f1ff; }

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover, .nav-cta:hover { background: var(--blue-dark); }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-full { width: 100%; padding: 16px; font-size: 1rem; }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.member-list { list-style: none; display: grid; gap: 8px; margin: 12px 0; }
.member-list li { font-weight: 600; }

.hero {
  padding: 36px 0 20px;
  display: grid;
  gap: 22px;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    padding-top: 48px;
  }
}

.kicker {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1, h2, h3 { line-height: 1.15; }

h1 { font-size: clamp(2rem, 7vw, 3.4rem); max-width: 16ch; }

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.logo-wrap {
  width: min(420px, 112%);
  height: 168px;
  overflow: hidden;
  margin: -12px 0 2px -28px;
}

.logo-mark {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 46%;
}

.ride-card,
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.ride-card {
  background: linear-gradient(180deg, #fff, var(--bg-soft));
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e8f1ff;
  color: var(--blue);
}

.badge[data-state="quasi"] { background: #fff4e0; color: var(--warn); }
.badge[data-state="confermata"] { background: #e8f7ef; color: var(--ok); }
.badge[data-state="completa"] { background: #eee; color: #555; }

.progress {
  height: 10px;
  background: #e7eefb;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 8px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.price-row strong { font-size: 1.35rem; }

.section { padding: 48px 0; scroll-margin-top: 80px; }

.grid-3, .grid-2 {
  display: grid;
  gap: 14px;
}

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

.step-n {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.muted { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}

.footer-grid p { margin-top: 6px; }

.footer-grid > div + div a {
  display: block;
  margin-top: 6px;
}

.wizard {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 0 120px;
}

.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.steps i {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #f0e6de;
}

.steps i.on { background: var(--blue); }

.screen { display: none; }
.screen.on { display: block; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip, .choice {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.chip.on, .choice.on {
  border-color: var(--blue);
  background: #e8f1ff;
  color: var(--blue-dark);
}

.choice {
  width: 100%;
  border-radius: 16px;
  text-align: left;
  margin-bottom: 8px;
}

label { display: block; font-weight: 600; margin-bottom: 6px; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 1rem;
  margin-bottom: 14px;
  background: #fff;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.check input { width: auto; margin: 3px 0 0; }

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
}

.sticky-inner {
  width: min(560px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.ticket {
  text-align: center;
  padding: 28px 18px;
}

.ticket img {
  margin: 16px auto;
  width: 180px;
  height: 180px;
}

.prose { max-width: 720px; }
.prose p, .prose li { color: var(--muted); margin-bottom: 12px; }
.prose ul { padding-left: 18px; }

details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: #fff;
}

summary { cursor: pointer; font-weight: 700; }

.error {
  color: #b42318;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.display {
  max-width: 16ch;
  font-size: clamp(2rem, 8vw, 3.6rem);
  letter-spacing: -0.04em;
}

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

.route-panel {
  background: var(--navy);
  color: #fff;
  border-radius: 28px;
  padding: 22px 20px 18px;
}

.route-stop {
  font-size: clamp(2.1rem, 9vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.route-arrow {
  color: var(--blue);
  font-weight: 800;
  font-size: 1.5rem;
  margin: 4px 0;
}

.route-meta { margin-top: 16px; color: rgba(255, 255, 255, 0.86); }
.route-meta strong { color: #fff; }

.from-price { margin-top: 18px; font-weight: 600; }
.from-price strong {
  display: block;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  margin: 4px 0;
}
.from-price span { color: rgba(255, 255, 255, 0.8); font-weight: 500; }

.quorum-card { background: #fff; }
.quorum-count { font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 800; }
.confirmed-line { color: var(--ok); font-weight: 800; margin-top: 6px; }

.ladder { display: grid; gap: 8px; margin-top: 16px; }
.ladder div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-weight: 700;
}

.trust-list { list-style: none; display: grid; gap: 10px; margin: 16px 0; }
.trust-list li { font-weight: 700; font-size: 1.05rem; }

.notice {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0;
}

.fine-print { color: var(--muted); margin-top: 14px; }
.fine-print a { color: var(--blue); font-weight: 700; }

.banner {
  margin-top: 8px;
  background: #fff4e0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
}

.placeholder-banner {
  background: #fff4e0;
  border: 1px dashed #e0b15a;
  color: #7a4b12;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.stepper button {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
}

.stepper strong { font-size: 2.6rem; line-height: 1; }
.summary-card { margin-bottom: 16px; }
.total-line { font-size: 1.35rem; }
.squad-code { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.04em; }
.wizard .btn { margin-top: 8px; }
.wizard input[readonly] { background: var(--bg-soft); }

.buy-bar { display: none; }

@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    inset: 68px 0 auto 0;
    background: var(--blue);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px 20px;
    color: #fff;
  }
  .nav-links.open { display: flex; }
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; min-height: 52px; }
  .buy-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  body.has-buybar { padding-bottom: 96px; }
  .stepper button, .btn, .nav-cta { min-height: 48px; }
}

@media (min-width: 861px) {
  .route-panel { padding: 28px; }
}
