:root {
  --green-header: #2F5D3A;
  --green: #4A6B1F;
  --green-dark: #3A5418;
  --cream: #F5F5DB;
  --ink: #1F2A1C;
  --muted: #4A5546;
  --line: #DDE3D8;
  --field: #9AA595;
  --soft: #EEF2EA;
  --white: #FFFFFF;
  --error: #B42318;
  --lime: #A2C851;
  --red-warm: #900303;
  --display: 'Fraunces', Inter, system-ui, sans-serif;
  --display-title: 'Fraunces', Georgia, serif;
  --body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  min-height: 100vh;
  /* fallback per i browser meno recenti */
  min-height: 100dvh;
  /* altezza corretta su mobile, considera le barre del browser */
  display: flex;
  flex-direction: column;
}

a {
  color: var(--green);
}

a:hover {
  color: var(--green-dark);
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Intestazione */
.site-header {
  background: var(--green-dark);
  color: var(--white);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-decoration: none;
}

.brand img {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-sub {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}

.site-header nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.site-header nav a {
  color: var(--white);
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  background: var(--cream);
}

.hero .wrap {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero h1 {
  margin: 0;
  font-family: var(--display-title);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-optical-sizing: auto;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-kicker {
  font-size: 15px;
  font-weight: 600;
}

.hero-data {
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  font-family: var(--body);
}

.hero-maps {
  font-size: 1.35rem;
  font-weight: bold;
  font-family: var(--body);
  letter-spacing: -1px;
}

.hero-venue {
  font-size: 0.95rem;
  font-weight: 400;
  font-family: var(--body);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  background: var(--red-warm);
  color: var(--white);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.description {
  margin: 0;
  max-width: 62rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

/* Contenuto */
.main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 28px;
  padding-bottom: 28px;
  flex: 1 0 auto;
}

.info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.menu {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

h2 {
  margin: 0;
  font-family: var(--display-title);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.15;
}

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

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.menu-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.menu-list li:last-child {
  border-bottom: 0;
}

.menu-list strong {
  font-weight: 600;
}

.small {
  font-size: 14px;
}

/* Programma */
.program {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.program-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.program-list li:last-child {
  border-bottom: 0;
}

.program-time {
  min-width: 64px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.program-event {
  font-weight: 600;
  font-size: 17px;
}

/* Riquadro acquisto */
.buy {
  width: 100%;
  border: 2px solid var(--lime);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.buy h2 {
  font-size: 28px;
}

.buy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.buy-fields,
.buy-summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.buy-fields p {
  margin: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row .field {
  flex: 1 1 140px;
}

.field label,
.qty-label {
  font-size: 14px;
  font-weight: 600;
}

.field input {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
}

.field-hint {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.notice {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--red-warm);
  border-radius: 8px;
  background: var(--cream);
  font-size: 14px;
  line-height: 1.5;
}

.qty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.qty-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper output {
  min-width: 32px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.total-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.total-amount {
  font-family: var(--display-title);
  font-weight: 800;
  font-size: 32px;
}

.fee-line {
  margin: 0;
  font-size: 15px;
  text-align: right;
}

.btn-primary {
  height: 54px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-error {
  margin: 0;
  color: var(--error);
  font-size: 15px;
  font-weight: 500;
}

.form-error:empty {
  display: none;
}

.center {
  text-align: center;
  margin: 0;
}

.note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.sales-closed {
  padding: 16px 18px;
  border-left: 4px solid var(--red-warm);
  border-radius: 8px;
  background: var(--cream);
}

.sales-closed p {
  margin: 0;
}

.sales-closed p + p {
  margin-top: 6px;
}

/* Come funziona */
.steps {
  background: var(--soft);
}

.steps .wrap {
  padding-top: 56px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.steps li {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-n {
  font-family: var(--display-title);
  font-weight: 800;
  font-size: 36px;
  color: var(--green);
  line-height: 1;
}

.step-t {
  font-weight: 600;
  font-size: 17px;
}

.step-d {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* Piè di pagina */
.site-footer {
  background: var(--ink);
  color: var(--white);
}

.site-footer .wrap {
  padding-top: 32px;
  /* spazio per il badge di Netlify in basso a destra */
  padding-bottom: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 14px;
}

.site-footer a {
  color: var(--white);
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

/* Pagina di conferma */
.thanks {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 0 auto;
}

.thanks-title {
  margin: 0;
  font-family: var(--display-title);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
}

.check {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Privacy */
.legal {
  width: 100%;
  max-width: 760px;
  padding-top: 40px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 0 auto;
}

.legal h2 {
  margin: 20px 0 0;
  font-size: 22px;
}

.legal p,
.legal ul {
  margin: 0;
}

.legal ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Mappa */
.map {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map p {
  margin: 0;
}

.map-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.map-link img {
  display: block;
  width: 100%;
  height: auto;
}

.stops-title {
  margin: 8px 0 0;
  font-family: var(--display-title);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: 22px;
}

.stops {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.stops li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stop-n {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.stop-place {
  font-weight: 600;
  font-size: 15px;
}

.stop-food {
  font-size: 14px;
  color: var(--muted);
}

/* Bottoni secondari e link con stile bottone */
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--white);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid var(--green);
  border-radius: 10px;
  color: var(--green);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--green);
  color: var(--white);
}

/* Desktop: due colonne */
@media (min-width: 860px) {
  .buy {
    padding: 32px;
  }

  .buy-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: start;
  }

  .buy-summary {
    border-left: 1px solid var(--line);
    padding-left: 40px;
  }

  .main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 48px;
    align-items: start;
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .description,
  .buy {
    grid-column: 1 / -1;
  }

  .program,
  .info {
    max-width: none;
  }
}

/* Mobile */
@media (max-width: 520px) {
  .menu-list li {
    flex-direction: column;
    gap: 2px;
  }

  .site-header .wrap {
    flex-wrap: nowrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand img {
    height: 32px;
  }

  .brand-sub {
    display: none;
  }

  .brand {
    font-size: 16px;
    line-height: 1.2;
  }

  .site-header nav {
    gap: 14px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .site-header nav a {
    padding: 10px 0;
    font-weight: 500;
  }
}

@media (max-width: 359px) {
  .brand img {
    height: 28px;
  }

  .site-header nav {
    gap: 12px;
  }
}
