/* Muffa Scanner — sito. Stesso design system dell'app (src/design/tokens.ts):
   bianco, testi quasi neri, grigio freddo, bottoni neri, foto arrotondate, accenti pastello. */

:root {
  --bg: #ffffff;
  --text: #09090b;
  --muted: #747683;
  --subtle: #a1a1aa;
  --border: #e8e8ec;
  --soft: #f5f5f6;
  --button: #0b0c10;
  --mint: #1f9d55;
  --mint-soft: #e7faf0;
  --orange: #ff870a;
  --orange-soft: #fff2e6;
  --purple: #7c3ff2;
  --purple-soft: #f0e7ff;
  --blue: #1597e5;
  --blue-soft: #eaf6ff;
  --red: #e5484d;
  --red-soft: #fdedee;

  --radius-image: 20px;
  --radius-card: 22px;
  --radius-button: 16px;
  --radius-tile: 14px;
  --page: 24px;
  --max: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; color: var(--text); letter-spacing: -0.02em; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--button); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 20;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--page); }
.narrow { max-width: 760px; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 32px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .btn { color: #fff; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  }
  .site-header.open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; left: 0; right: 0; top: 68px;
    background: var(--bg); padding: 8px var(--page) 20px; border-bottom: 1px solid var(--border);
  }
  .site-header.open .nav a { padding: 12px 0; font-size: 17px; color: var(--text); }
  .site-header.open .nav .btn { margin-top: 8px; padding: 0; color: #fff; }
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: var(--radius-button);
  background: var(--button); color: #fff; border: 1px solid var(--button);
  font: 500 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn-small { height: 44px; padding: 0 18px; border-radius: 13px; font-size: 15px; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: #cdd0d8; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Type ───────────────────────────────────────────── */
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.display { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; font-weight: 700; letter-spacing: -0.035em; }
.title { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.subtitle { font-size: 22px; line-height: 1.25; font-weight: 700; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); line-height: 1.5; max-width: 620px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ── Sections ───────────────────────────────────────── */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 36px; }
.section-head .lead { margin: 14px 0 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; }
.link-arrow:hover { text-decoration: underline; }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero .lead { margin: 22px 0 32px; }
.hero-photo { position: relative; border-radius: 28px; overflow: hidden; background: var(--soft); aspect-ratio: 1 / 1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-note { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 14px; }
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note svg { width: 18px; height: 18px; color: var(--mint); }

@media (max-width: 900px) {
  .hero { padding-top: 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ── Icons on pastel tiles ──────────────────────────── */
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-tile svg { width: 26px; height: 26px; }
.tone-mint { background: var(--mint-soft); color: var(--mint); }
.tone-orange { background: var(--orange-soft); color: var(--orange); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-red { background: var(--red-soft); color: var(--red); }

/* ── Cause cards (photo + label pill) ───────────────── */
.cause-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cause-card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.cause-photo { position: relative; border-radius: var(--radius-image); overflow: hidden; aspect-ratio: 4 / 5; background: var(--soft); }
.cause-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.cause-card:hover .cause-photo img { transform: scale(1.04); }
.pill {
  position: absolute; left: 12px; bottom: 12px;
  background: #fff; color: var(--text); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; font-weight: 700;
}
.cause-card h3 { font-size: 19px; line-height: 1.25; }
.cause-card p { color: var(--muted); font-size: 15px; margin: 4px 0 0; }

@media (max-width: 960px) { .cause-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cause-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .cause-card p { display: none; } }

/* ── Feature rows / cards ───────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; background: var(--bg); }
.card h3 { font-size: 19px; margin: 18px 0 8px; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }
.card-soft { background: var(--soft); border-color: transparent; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-photo { border-radius: 28px; overflow: hidden; background: var(--soft); }
.split-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; }
.check-list strong { display: block; font-size: 17px; }
.check-list span.muted { font-size: 15px; }

/* ── App band ───────────────────────────────────────── */
.app-band { background: var(--soft); border-radius: 32px; padding: 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.app-band .steps { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 20px; }
.app-band .steps li { display: flex; gap: 16px; align-items: center; }
.app-band .steps strong { display: block; }
.app-photo { border-radius: 24px; overflow: hidden; }
.store-note { font-size: 14px; color: var(--muted); margin-top: 14px; }
@media (max-width: 900px) { .app-band { grid-template-columns: 1fr; padding: 32px 22px; border-radius: 26px; } }

/* ── Risk callout (as in the app's result card) ─────── */
.callout { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 18px; }
.callout svg { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.callout p { margin: 0; }
.callout-red { background: var(--red-soft); }
.callout-red svg { color: var(--red); }
.callout-orange { background: var(--orange-soft); }
.callout-orange svg { color: var(--orange); }
.callout-soft { background: var(--soft); }
.callout-soft svg { color: var(--muted); }

/* ── Coverage ───────────────────────────────────────── */
.regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.region { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.region h3 { font-size: 19px; margin-bottom: 6px; }
.region p { color: var(--muted); font-size: 15px; margin: 0; }
@media (max-width: 760px) { .regions { grid-template-columns: 1fr; } }

/* ── FAQ ────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-size: 18px; font-weight: 600; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 0 22px; color: var(--muted); font-size: 16px; max-width: 760px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ── Article pages ──────────────────────────────────── */
.page-hero { padding: 48px 0 40px; }
.page-hero .lead { margin-top: 18px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.toc a { text-decoration: none; font-size: 14px; font-weight: 500; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; }
.toc a:hover { background: var(--soft); }

.prose { font-size: 18px; line-height: 1.65; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.15; font-weight: 700; margin: 56px 0 16px; scroll-margin-top: 90px; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { color: #3f3f46; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--subtle); }
.prose strong { color: var(--text); }
.prose figure { margin: 32px 0; }
.prose figure img { border-radius: var(--radius-image); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.prose .callout { margin: 28px 0; font-size: 16px; line-height: 1.55; }

.sign-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0 28px; }
.sign { background: var(--soft); border-radius: 16px; padding: 18px 20px; font-size: 16px; line-height: 1.5; }
.sign strong { display: block; margin-bottom: 4px; }
@media (max-width: 640px) { .sign-grid { grid-template-columns: 1fr; } }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; margin: 24px 0 32px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.compare th, .compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { background: var(--soft); font-size: 14px; }
.compare tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related a { text-decoration: none; }
.related .card:hover { background: var(--soft); }
@media (max-width: 900px) { .related { grid-template-columns: 1fr; } }

/* ── CTA band ───────────────────────────────────────── */
.cta-band { background: var(--button); color: #fff; border-radius: 32px; padding: 64px 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #b4b5bf; margin: 14px 0 0; font-size: 18px; }
.cta-band .btn { background: #fff; color: var(--text); border-color: #fff; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: #3f3f46; }
.cta-band .btn-row { justify-content: flex-end; }
@media (max-width: 900px) { .cta-band { grid-template-columns: 1fr; padding: 40px 24px; border-radius: 26px; } .cta-band .btn-row { justify-content: flex-start; } }

/* ── Form ───────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 17px/1.4 var(--font); color: var(--text);
  border: 1px solid #cdd0d8; border-radius: 14px; padding: 15px 16px; background: var(--bg);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.08); }
.choice { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.choice input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--button); flex: none; }
.form-status { font-size: 15px; padding: 14px 16px; border-radius: 14px; display: none; }
.form-status.ok { display: block; background: var(--mint-soft); color: #07854f; }
.form-status.error { display: block; background: var(--red-soft); color: #c42c35; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 88px; padding: 56px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: 15px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-note { margin-top: 40px; color: var(--subtle); font-size: 13px; line-height: 1.6; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Small utilities ────────────────────────────────── */
.footer-grid .brand { color: var(--text); }
.footer-about { margin-top: 14px; max-width: 360px; }
.mt-16 { margin-top: 16px; }
.mt-28 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; }
.compare { min-width: 620px; }
@media (max-width: 900px) {
  .steps-compact .card { display: flex; gap: 16px; align-items: center; padding: 16px 18px; }
  .steps-compact .card h3 { margin: 0 0 2px; font-size: 17px; }
}

/* ── Blog ───────────────────────────────────────────── */
.blog-section { margin-bottom: 64px; }
.blog-section .subtitle { margin-bottom: 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
.post-card { text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.post-photo { border-radius: var(--radius-image); overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft); }
.post-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-photo img { transform: scale(1.04); }
.post-cat { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.post-card h3 { font-size: 19px; line-height: 1.3; }
.post-card p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.related .post-photo { aspect-ratio: 16 / 9; }
.related-title { margin-bottom: 20px; }
.article-meta { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.prose .article-cover { margin: 0 0 32px; }
.prose .article-cover img { aspect-ratio: 16 / 9; }
.prose .faq { margin-top: 8px; }
.prose .faq summary { font-size: 17px; }
.prose .faq .answer { font-size: 16px; }
.prose .compare { font-size: 15px; line-height: 1.45; }

/* ── Inspection CTAs (blog) ─────────────────────────── */
.cta-top {
  display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 18px; text-decoration: none; background: var(--bg);
  transition: background 0.15s ease;
}
.cta-top:hover { background: var(--soft); }
.cta-top strong { display: block; font-size: 16px; }
.cta-top .muted { display: block; font-size: 14px; line-height: 1.4; }
.cta-top > span:nth-child(2) { flex: 1; }
.cta-top-action { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.cta-top-action svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .cta-top .icon-tile { display: none; } }

.prose .cta-inline {
  display: flex; align-items: center; gap: 18px; margin: 44px 0; padding: 22px 24px;
  border-radius: 22px; background: var(--blue-soft);
}
.prose .cta-inline strong { display: block; font-size: 17px; line-height: 1.35; }
.prose .cta-inline p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.prose .cta-inline .btn { color: #fff; text-decoration: none; white-space: nowrap; }
.prose .cta-inline > div { flex: 1; }
@media (max-width: 640px) { .prose .cta-inline { flex-direction: column; align-items: flex-start; } }

.prose .note { font-size: 15px; background: var(--soft); border-radius: 14px; padding: 14px 18px; color: var(--muted); }
