/* RistoWeb — mini sito one-page (palette Sage & Wood, mobile-first). */
:root {
  --surface: #fbf9f4;
  --surface-low: #f5f3ee;
  --surface-container: #f0eee9;
  --surface-high: #e4e2dd;
  --white: #ffffff;
  --on-surface: #1b1c19;
  --on-surface-variant: #444841;
  --inverse-surface: #30312e;
  --inverse-on-surface: #f2f1ec;
  --outline: #747871;
  --outline-variant: #c4c8bf;
  --primary: #455541;
  --primary-container: #5d6d58;
  --primary-fixed: #d6e8ce;
  --secondary: #7a573a;
  --tertiary-fixed: #f4dfcb;
  --ghost-border: rgba(122, 87, 58, 0.18);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-label: "Hanken Grotesk", -apple-system, sans-serif;

  --gutter: 24px;
  --m-mobile: 20px;
  --stack-lg: 48px;
  --container-max: 1280px;
  --radius: 0.25rem;
  --radius-lg: 0.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--surface); color: var(--on-surface);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--m-mobile); }
.container.narrow { max-width: 760px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--primary); text-wrap: balance; }
.section-title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 16px; }
.section-note { text-align: center; color: var(--on-surface-variant); margin-bottom: 28px; }
section { padding: var(--stack-lg) 0; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-label); font-size: 14px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius); padding: 12px 22px; cursor: pointer; border: 0;
  transition: opacity .2s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-fixed); }
.btn-ghost-dark { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-lg { padding: 16px 28px; }

/* 1. Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,244,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ghost-border);
}
.header-inner {
  max-width: var(--container-max); margin: 0 auto; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gutter); padding: 0 var(--m-mobile);
}
.logo-header { height: 44px; width: auto; }
.nav-desktop { display: none; gap: 26px; }
.nav-desktop a {
  font-family: var(--font-label); font-size: 14px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  color: var(--on-surface-variant); padding-bottom: 4px; border-bottom: 2px solid transparent;
}
.nav-desktop a:hover { color: var(--primary); border-color: var(--primary); }
.btn-header { display: none; }
.nav-toggle { background: none; border: 0; font-size: 24px; color: var(--primary); cursor: pointer; }
.nav-mobile { display: none; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--ghost-border); padding: 8px var(--m-mobile) 14px; }
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-label); font-weight: 600; font-size: 15px;
  color: var(--on-surface-variant); text-decoration: none;
  padding: 12px 4px; border-bottom: 1px solid var(--surface-high);
}

/* 2. Hero */
.hero { padding: 64px 0 56px; text-align: center; background:
  radial-gradient(90% 70% at 50% 0%, var(--surface-low), var(--surface)); }
.hero h1 { font-size: 34px; line-height: 1.18; max-width: 820px; margin: 0 auto 18px; }
.hero-sub { font-size: 18px; color: var(--on-surface-variant); max-width: 620px; margin: 0 auto 30px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* 3-4. Problema / Soluzione */
.problema { background: var(--surface-low); }
.problema h2, .soluzione h2 { font-size: 26px; margin-bottom: 14px; }
.problema p, .soluzione p { color: var(--on-surface-variant); font-size: 17px; }

/* 5. Come funziona */
.come-funziona { background: var(--surface-container); }
.steps { list-style: none; display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
.steps li { background: var(--white); border: 1px solid var(--ghost-border); border-radius: var(--radius-lg); padding: 24px; }
.step-n {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 999px; background: var(--primary); color: #fff;
  font-family: var(--font-label); font-weight: 600; margin-bottom: 12px;
}
.steps h3 { font-size: 19px; margin-bottom: 6px; }
.steps p { color: var(--on-surface-variant); font-size: 15px; }

/* 6. Piani */
.plans { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
.plan { background: var(--white); border: 1px solid var(--ghost-border); border-radius: var(--radius-lg); padding: 30px 26px; display: flex; flex-direction: column; }
.plan-base { border: 2px solid var(--primary); box-shadow: 0 18px 40px -28px rgba(69,85,65,.5); }
.plan h3 { font-size: 22px; margin-bottom: 10px; }
.price { font-family: var(--font-display); font-size: 38px; font-weight: 700; color: var(--on-surface); }
.price span { font-size: 17px; font-weight: 400; color: var(--on-surface-variant); }
.promo {
  margin: 10px 0 18px; padding: 8px 12px; border-radius: var(--radius);
  background: var(--tertiary-fixed); color: var(--secondary);
  font-family: var(--font-label); font-size: 13px; font-weight: 600;
}
.plan ul { list-style: none; margin-bottom: 22px; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; color: var(--on-surface-variant); border-bottom: 1px solid var(--surface-low); font-size: 15px; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--primary); font-weight: 700; }

/* 7. Cosa include */
.include { background: var(--surface-low); }
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
.card { background: var(--white); border: 1px solid var(--ghost-border); border-radius: var(--radius-lg); padding: 22px; text-align: center; }
.card-icon { font-size: 28px; display: block; margin-bottom: 10px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--on-surface-variant); font-size: 14px; }

/* 8. FAQ */
.faq details { background: var(--white); border: 1px solid var(--ghost-border); border-radius: var(--radius-lg); margin-bottom: 12px; padding: 0 20px; }
.faq summary {
  cursor: pointer; padding: 16px 0; font-family: var(--font-label);
  font-weight: 600; font-size: 16px; color: var(--on-surface); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--primary); font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; color: var(--on-surface-variant); font-size: 15px; }

/* 9. Contatto */
.contatto { background: var(--surface-container); }
.contact-form { display: grid; gap: 16px; }
.contact-form label {
  display: grid; gap: 6px; font-family: var(--font-label);
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--on-surface-variant);
}
.contact-form input, .contact-form textarea, .contact-form select {
  font-family: var(--font-body); font-size: 16px; color: var(--on-surface);
  background: var(--white); border: 1px solid var(--outline-variant);
  border-radius: var(--radius); padding: 12px 14px;
}
.contact-form select {
  -webkit-appearance: none; appearance: none;
  height: 50px; line-height: 1.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.contact-form button { justify-self: start; }

/* 10. Footer */
.site-footer { background: var(--inverse-surface); color: var(--inverse-on-surface); padding: var(--stack-lg) 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; }
.logo-footer { height: 52px; width: auto; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-lg); }
.footer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-top: 10px; }
.footer-legal p { color: rgba(242,241,236,.75); font-size: 14px; margin-bottom: 4px; }
.footer-legal a { color: var(--primary-fixed); text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

/* Desktop ≥ 768px */
@media (min-width: 768px) {
  .container { padding: 0 var(--gutter); }
  .header-inner { height: 80px; padding: 0 var(--gutter); }
  .nav-desktop { display: flex; }
  .btn-header { display: inline-flex; }
  .nav-toggle, .nav-mobile { display: none !important; }
  .section-title { font-size: 34px; }
  .hero { padding: 110px 0 90px; }
  .hero h1 { font-size: 52px; letter-spacing: -0.01em; }
  .hero-sub { font-size: 20px; }
  .hero-actions { flex-direction: row; justify-content: center; gap: 18px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: 1fr 1fr; max-width: 920px; margin-left: auto; margin-right: auto; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards .card:nth-last-child(1):nth-child(3n+1) { grid-column: 2; }
  .footer-grid { grid-template-columns: auto 1fr; }
  .footer-legal { text-align: right; }
  section { padding: 72px 0; }
}
