/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Webica Labs — Cool Minimal (OKLCH). Variabili rimappate sui token del sito
   (src/styles/tokens.css): accent blu unico, ink/canvas freddi, niente viola. */
:root {
  --indigo-50:  oklch(0.965 0.018 258);   /* accent tint molto chiaro */
  --indigo-100: oklch(0.92 0.03 258);     /* accent-weak */
  --indigo-200: oklch(0.86 0.05 258);
  --indigo-400: oklch(0.62 0.13 255);
  --indigo-500: oklch(0.55 0.15 255);
  --indigo-600: oklch(0.5 0.15 255);      /* accent (CTA, link) */
  --indigo-700: oklch(0.44 0.16 255);     /* accent-hover */
  --violet-600: oklch(0.46 0.155 262);    /* secondo stop gradiente, stessa famiglia fredda */
  --violet-700: oklch(0.4 0.155 262);
  --gray-50:  oklch(0.97 0.004 245);
  --gray-100: oklch(0.95 0.005 245);
  --gray-200: oklch(0.9 0.008 245);       /* rule */
  --gray-300: oklch(0.82 0.01 248);       /* rule-strong */
  --gray-400: oklch(0.62 0.012 245);      /* ink-subtle */
  --gray-500: oklch(0.48 0.015 245);      /* ink-muted */
  --gray-700: oklch(0.34 0.018 248);
  --gray-900: oklch(0.22 0.02 250);       /* ink */
  --green-500: oklch(0.55 0.14 155);      /* success */
  --red-500: oklch(0.55 0.2 25);          /* danger */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 32px oklch(0.22 0.02 250 / 0.09);
  --shadow-sm: 0 2px 8px oklch(0.22 0.02 250 / 0.06);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, oklch(0.985 0.002 240) 0%, oklch(0.955 0.005 245) 100%);
  min-height: 100vh;
  color: var(--gray-900);
  line-height: 1.5;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.9);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-900);
}

.header-link {
  font-size: 14px;
  color: var(--gray-500);
  text-decoration: none;
  transition: color .2s;
}
.header-link:hover { color: var(--indigo-600); }

/* ── Main Layout ── */
.main {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

/* ── Intro (compatta, visibile solo allo step 1) ── */
.intro {
  text-align: center;
  margin-bottom: 18px;
}

/* Sugli step interni (orari / dati / conferma) intro e feature spariscono:
   tutto lo spazio verticale va al contenuto, niente scroll inutile. */
body:not([data-step="1"]) .intro,
body:not([data-step="1"]) .features { display: none; }

.intro-badge {
  display: inline-block;
  background: var(--indigo-100);
  color: var(--indigo-600);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.intro-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.intro-desc {
  font-size: 14px;
  color: var(--gray-500);
  max-width: 460px;
  margin: 0 auto;
}

/* ── Steps Bar ── */
.steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 18px;
}

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

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  transition: all .3s;
  flex-shrink: 0;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  transition: color .3s;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 12px;
  max-width: 80px;
  transition: background .3s;
}

.step.active .step-num {
  background: var(--indigo-600);
  border-color: var(--indigo-600);
  color: white;
}
.step.active .step-label { color: var(--indigo-600); }

.step.done .step-num {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}
.step.done .step-label { color: var(--gray-700); }

.step-line.done { background: var(--green-500); }

/* ── Card ── */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

/* ── Step Panels ── */
.step-panel {
  display: none;
  padding: 24px;
  animation: fadeSlide .3s ease;
}

.step-panel.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.panel-desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--indigo-600);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  transition: opacity .2s;
}
.back-btn:hover { opacity: .7; }

/* ── Calendar ── */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all .2s;
}
.cal-nav-btn:hover { background: var(--gray-100); color: var(--gray-900); }
.cal-nav-btn:disabled { opacity: .35; cursor: not-allowed; }

.cal-month-label {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  position: relative;
}

.cal-day-header {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 0 10px;
}

.cal-days-wrapper {
  display: contents;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  border: 2px solid transparent;
  position: relative;
}

.cal-day.empty { cursor: default; }

.cal-day.disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}

.cal-day.available {
  color: var(--gray-700);
  background: var(--gray-50);
}
.cal-day.available:hover {
  background: var(--indigo-100);
  color: var(--indigo-600);
  border-color: var(--indigo-200);
}

.cal-day.today {
  font-weight: 700;
  color: var(--indigo-600);
}
.cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--indigo-500);
}

.cal-day.selected {
  background: var(--indigo-600) !important;
  color: white !important;
  border-color: var(--indigo-600) !important;
}

/* ── Time Slots ── */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.slot-btn {
  padding: 13px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  background: white;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.slot-btn:hover {
  border-color: var(--indigo-400);
  color: var(--indigo-600);
  background: var(--indigo-50);
}
.slot-btn.selected {
  background: var(--indigo-600);
  border-color: var(--indigo-600);
  color: white;
}

/* Slot raggruppati per Mattina / Pomeriggio (gestiscono la lista lunga da 15 min) */
.slots-grid.grouped { display: block; }
.slot-group { margin-bottom: 22px; }
.slot-group:last-child { margin-bottom: 0; }
.slot-group-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.slot-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

/* ── Booking Summary ── */
.booking-summary {
  background: var(--indigo-50);
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.booking-summary-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.booking-summary-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.booking-summary-text span {
  font-size: 13px;
  color: var(--gray-500);
}

/* ── Contact Form ── */
.contact-form { display: flex; flex-direction: column; gap: 14px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.optional {
  color: var(--gray-400);
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  padding: 13px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-900);
  background: white;
  transition: border-color .2s;
  resize: vertical;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--indigo-500);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--red-500);
}

.field-error {
  font-size: 12px;
  color: var(--red-500);
  min-height: 0;
  margin-top: 1px;
}
.field-error:empty { display: none; }

.form-footer { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }

.privacy-note {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}
.privacy-note a { color: var(--indigo-600); text-decoration: none; }

/* ── Buttons ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--indigo-600) 0%, var(--violet-600) 100%);
  color: white;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
  text-align: center;
}
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  background: white;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.btn-secondary:hover { border-color: var(--gray-300); background: var(--gray-50); }

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── Confirmation ── */
.confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
}

.confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-600), var(--violet-600));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(99,102,241,.35);
}

.confirmation-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.confirmation-desc {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 380px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.confirmation-details {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 20px 28px;
  width: 100%;
  max-width: 380px;
  margin-bottom: 28px;
  text-align: left;
}

.confirmation-details p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.confirmation-details strong {
  display: block;
  font-size: 16px;
  color: var(--gray-900);
  font-weight: 600;
  margin-bottom: 12px;
}

.confirmation-meet {
  width: 100%;
  max-width: 380px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meet-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--indigo-600);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: filter .15s;
}
.meet-join:hover { filter: brightness(0.92); }
.meet-addcal {
  font-size: 14px;
  font-weight: 600;
  color: var(--indigo-600);
  text-decoration: none;
  text-align: center;
}
.meet-addcal:hover { text-decoration: underline; }

/* CTA soffice verso il sito: invito a conoscerci mentre si aspetta la call */
.confirmation-next {
  width: 100%;
  max-width: 380px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}
.confirmation-next p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.confirmation-next a {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--indigo-600);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: gap .15s, color .15s;
}
.confirmation-next a:hover {
  color: var(--indigo-700);
  gap: 10px;
}

/* ── Loading ── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.85);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}
.loading-overlay.visible { display: flex; }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--indigo-100);
  border-top-color: var(--indigo-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state svg { margin: 0 auto 16px; display: block; }
.empty-state p { font-size: 15px; line-height: 1.6; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 1000;
  max-width: 360px;
  text-align: center;
}
.toast.visible { transform: translateX(-50%) translateY(0); }
.toast.error { background: #dc2626; }

/* ── Features strip ── */
.features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-icon { font-size: 20px; }

.feature strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.feature span {
  font-size: 12px;
  color: var(--gray-400);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .main { padding: 14px 14px 28px; }
  .step-panel { padding: 20px 16px; }
  .steps-bar { gap: 0; margin-bottom: 14px; }
  .step-label { display: none; }
  .step-line { max-width: 40px; margin: 0 6px; }
  .contact-form { gap: 12px; }
  .slot-group-grid { grid-template-columns: repeat(3, 1fr); }
  .features { gap: 20px; }
  .feature span { display: none; }
}
