/* ==========================================================================
   Alessandro Longo — Alloggiare | design tokens allineati al gestionale
   (stessa palette "brand" arancio, sfondo slate-50, card bianche rounded-xl
   con bordo sottile e ombra leggera, badge a pillola) — vedi
   tailwind.config.ts e src/components/ui.tsx nel progetto gestionale.
   ========================================================================== */

:root {
  --brand-50: #FDF3EE;
  --brand-100: #FAE3D6;
  --brand-200: #F3C4AC;
  --brand-300: #EBA47F;
  --brand-400: #DD8556;
  --brand-500: #D06637;
  --brand-600: #AC5029;
  --brand-700: #853D20;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;

  --radius-card: 1rem;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.06);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

a, button, .card, .btn, .nav-cta { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid var(--slate-200);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo { height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-600);
}

.nav-links a:hover { color: var(--brand-600); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-500);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--brand-600); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { width: 24px; height: 24px; color: var(--slate-700); }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(1100px 480px at 85% -10%, var(--brand-100) 0%, transparent 60%),
    var(--slate-50);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--slate-900);
}

.hero h1 em {
  font-style: normal;
  color: var(--brand-500);
}

.hero p.lead {
  font-size: 17px;
  color: var(--slate-600);
  max-width: 46ch;
  margin: 0 0 28px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--brand-500); color: #fff; }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(208, 102, 55, 0.28); }

.btn-secondary { background: #fff; color: var(--slate-900); border-color: var(--slate-200); }
.btn-secondary:hover { border-color: var(--brand-300); color: var(--brand-600); transform: translateY(-1px); }

/* Hero visual panel — niente foto stock: card in stile gestionale con i
   numeri veri del portfolio, coerente con l'assenza totale di fotografia
   nell'interfaccia del gestionale stesso. */
.hero-panel {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-panel-icon svg { width: 20px; height: 20px; }

.hero-panel-icon-brand { background: none; }
.hero-panel-icon-brand img { width: 40px; height: 40px; }

.hero-panel-head strong { display: block; font-size: 14px; color: var(--slate-900); }
.hero-panel-head span { font-size: 13px; color: var(--slate-500); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-grid-3 .stat-tile { padding: 12px 8px; text-align: center; }
.stat-grid-3 .num { font-size: 19px; }

.stat-tile {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 0.75rem;
  padding: 14px;
}

.stat-tile .num { font-size: 22px; font-weight: 700; color: var(--slate-900); letter-spacing: -0.01em; }
.stat-tile .label { font-size: 12.5px; color: var(--slate-500); margin-top: 2px; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }

.section-head { max-width: 640px; margin: 0 0 40px; }

.section-head .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--slate-900);
}

.section-head p { color: var(--slate-600); font-size: 15.5px; margin: 0; }

.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

/* Servizi */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card:hover { box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08); transform: translateY(-2px); border-color: var(--brand-200); }

.service-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.service-card .icon svg { width: 22px; height: 22px; }

.service-card h3 { font-size: 16.5px; margin: 0 0 8px; color: var(--slate-900); }
.service-card p { font-size: 14.5px; color: var(--slate-600); margin: 0; }

/* Come funziona */
.steps { counter-reset: step; background: var(--slate-900); border-radius: 1.5rem; padding: 48px 40px; }
.steps .section-head h2, .steps .section-head p { color: #fff; }
.steps .section-head p { color: var(--slate-300); }
.steps .section-head .kicker { color: var(--brand-300); }

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  counter-increment: step;
  position: relative;
  padding-top: 8px;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--brand-500);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}

.step h3 { font-size: 15.5px; margin: 0 0 6px; color: #fff; }
.step p { font-size: 13.5px; color: var(--slate-400); margin: 0; }

/* I numeri */
.numeri-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
}

.stat-tile-lg {
  text-align: center;
  padding: 28px 20px;
}

.stat-tile-lg .num {
  font-size: 34px;
  font-weight: 700;
  color: var(--brand-500);
  letter-spacing: -0.02em;
}

.stat-tile-lg .label {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--slate-600);
}

.numeri-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--slate-400);
}

/* Zone gestite */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.zone-card .badge {
  display: inline-block;
  background: var(--brand-100);
  color: var(--brand-700);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.zone-card h3 { font-size: 16px; margin: 0 0 6px; }
.zone-card p { font-size: 13.5px; color: var(--slate-500); margin: 0; }

/* Contatti */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  align-items: start;
}

.contact-info .item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-info .icon {
  width: 38px;
  height: 38px;
  border-radius: 0.65rem;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info .icon svg { width: 18px; height: 18px; }

.contact-info strong { display: block; font-size: 14.5px; color: var(--slate-900); }
.contact-info span, .contact-info a.link { font-size: 14px; color: var(--slate-500); }
.contact-info a.link:hover { color: var(--brand-600); }

.contact-links { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

form.lead-form { display: grid; gap: 14px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--slate-700); margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 0.6rem;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--slate-900);
  background: var(--slate-50);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-100);
}

textarea { resize: vertical; min-height: 90px; }

.consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--slate-500); }
.consent input { margin-top: 3px; }

.form-note { font-size: 12.5px; color: var(--slate-400); margin-top: 4px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--slate-200);
  padding: 36px 0;
  background: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner .brand-logo { height: 22px; opacity: 0.85; }

.footer-meta { font-size: 13px; color: var(--slate-400); display: flex; gap: 18px; flex-wrap: wrap; }
.footer-meta a:hover { color: var(--brand-600); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .step-grid { grid-template-columns: repeat(2, 1fr); }
  .zones-grid { grid-template-columns: repeat(2, 1fr); }
  .numeri-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links { position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links .nav-cta { display: inline-flex; margin-top: 8px; }
  .services-grid, .step-grid, .zones-grid, .numeri-grid { grid-template-columns: 1fr; }
  .stat-grid-3 { grid-template-columns: 1fr; }
  .stat-grid-3 .stat-tile { text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .steps { padding: 36px 22px; }
}
