/* ============================================================================
   ASSOTRACE — stile condiviso (landing + pagine legali)
   Nessuna risorsa esterna: font di sistema, nessun CDN, nessun tracker.
   → zero cookie → nessun banner di consenso da gestire.
   Palette allineata a lib/theme/app_theme.dart (marrone / lime / beige).
   ============================================================================ */

:root {
  --brand-50:  #EFE7DC;
  --brand-100: #E2D6C6;
  --brand-500: #3A2510;   /* marrone brand (bottoni, titoli) */
  --brand-600: #2A1B0C;
  --brand-700: #1E1008;

  --accent:    #8E9500;   /* lime scuro leggibile (evidenziazioni) */
  --accent-bg: #F2F4CC;
  --accent-br: #C8D400;   /* lime brand (dettagli) */

  --ink:     #1A0E06;
  --ink-700: #4A3828;
  --ink-500: #7A6858;
  --ink-400: #9A8A7A;

  --line:    #E6DDD2;
  --bg:      #FFFFFF;
  --bg-soft: #FAF7F2;
  --bg-warm: #F0EAE2;

  --radius:  14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(26,14,6,.04), 0 8px 24px rgba(26,14,6,.06);
  --shadow-lg: 0 2px 4px rgba(26,14,6,.05), 0 24px 60px rgba(26,14,6,.12);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ─── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 20px;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--ink-700); font-size: 14px; font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: var(--brand-500); text-decoration: none; }

/* ─── Wordmark ────────────────────────────────────────────────────────────── */

.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.wordmark svg { display: block; flex: none; }
.wordmark-text {
  font-size: 21px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--ink); white-space: nowrap;
}
.wordmark-text em { font-style: normal; color: var(--brand-500); }
.wordmark--lg .wordmark-text { font-size: 28px; }
.wordmark--inv .wordmark-text { color: #fff; }
.wordmark--inv .wordmark-text em { color: var(--accent-br); }

/* ─── Bottoni ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 11px;
  font-size: 15px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand-500); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: #fff; color: var(--ink-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-400); }
.btn-lg { padding: 16px 26px; font-size: 16px; }

/* Gruppo pulsanti nell'header (Accedi + Scarica), sempre visibile su mobile */
.header-cta { display: inline-flex; gap: 10px; align-items: center; }
@media (max-width: 520px) {
  .header-cta .btn { padding: 11px 15px; font-size: 14px; }
}

/* Badge store (segnaposto: sostituire con i badge ufficiali) */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 18px; border-radius: 11px;
  background: var(--ink); color: #fff;
  text-decoration: none; min-width: 186px;
  transition: transform .12s ease, opacity .12s ease;
}
.store-badge:hover { text-decoration: none; transform: translateY(-1px); opacity: .92; }
.store-badge svg { flex: none; }
.store-badge span { display: block; line-height: 1.25; }
.store-badge .sb-small { font-size: 10px; opacity: .75; letter-spacing: .3px; }
.store-badge .sb-big { font-size: 15px; font-weight: 600; }
.store-badge[data-placeholder="1"] { position: relative; }
.store-badge[data-placeholder="1"]::after {
  content: "link da inserire";
  position: absolute; top: -9px; right: -6px;
  background: var(--accent-bg); color: var(--accent);
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--accent-br);
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -8%, var(--brand-50) 0%, transparent 62%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
  padding-top: 84px; padding-bottom: 84px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg);
  padding: 7px 13px; border-radius: 100px; margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 20px; color: var(--ink);
  font-size: clamp(34px, 4.6vw, 56px); font-weight: 800;
  line-height: 1.08; letter-spacing: -1.4px;
}
.hero h1 em { font-style: normal; color: var(--brand-500); }
.hero .lead {
  font-size: 18px; color: var(--ink-500); margin: 0 0 30px; max-width: 48ch;
}
.hero-actions { display: flex; flex-direction: column; gap: 16px; }
.hero-note { font-size: 13px; color: var(--ink-400); }

/* ─── Mockup telefono (CSS puro) ──────────────────────────────────────────── */

.phone-stack { position: relative; display: flex; justify-content: center; }
.phone {
  width: 268px; aspect-ratio: 9 / 19.5;
  background: #111; border-radius: 38px; padding: 9px;
  box-shadow: var(--shadow-lg);
  position: relative; flex: none;
}
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; background: #111; border-radius: 100px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: var(--bg-warm); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Segnaposto immagine ─────────────────────────────────────────────────── */

.ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 18px;
  background:
    repeating-linear-gradient(45deg, #EDE9E6 0 10px, #F4F1EF 10px 20px);
  border: 1px dashed #CFC9C4; border-radius: 10px;
  color: var(--ink-400);
}
.ph strong { color: var(--ink-500); font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.ph span { font-size: 11px; }
.ph--photo { aspect-ratio: 3 / 2; height: auto; border-radius: var(--radius); }

/* ─── Galleria screenshot ─────────────────────────────────────────────────── */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shot {
  border-radius: 20px; overflow: hidden; background: #111; padding: 7px;
  box-shadow: var(--shadow);
}
.shot-inner {
  border-radius: 15px; overflow: hidden; aspect-ratio: 9/19.5;
  background: var(--bg-warm);
}
.shot-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-note { text-align: center; color: var(--ink-400); font-size: 13px; margin-top: 22px; }

/* ─── Sezioni ─────────────────────────────────────────────────────────────── */

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section h2 {
  margin: 0 0 14px; color: var(--ink);
  font-size: clamp(26px, 3vw, 38px); font-weight: 800;
  letter-spacing: -.9px; line-height: 1.15;
}
.section .sub { font-size: 17px; color: var(--ink-500); margin: 0; }

/* ─── Passi ───────────────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; box-shadow: var(--shadow);
}
.step-n {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 16px;
  background: var(--accent-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); font-weight: 700; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-500); }

/* ─── Feature ─────────────────────────────────────────────────────────────── */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  padding: 28px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line);
}
.feature-ico {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 15px;
  background: var(--brand-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.feature h3 { margin: 0 0 7px; font-size: 16.5px; color: var(--ink); font-weight: 700; }
.feature p { margin: 0; font-size: 14.5px; color: var(--ink-500); }

/* ─── CTA ─────────────────────────────────────────────────────────────────── */

.cta-band {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 56px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
}
.cta-band h2 { color: #fff; margin: 0 0 12px; font-size: clamp(24px, 2.6vw, 34px); }
.cta-band p { margin: 0; color: rgba(255,255,255,.86); font-size: 16.5px; }
.cta-band .btn-ghost { background: var(--accent-br); border-color: var(--accent-br); color: var(--brand-700); }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--ink); color: rgba(255,255,255,.62);
  padding: 60px 0 34px; font-size: 14px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer h4 {
  color: #fff; font-size: 12px; letter-spacing: .9px; text-transform: uppercase;
  margin: 0 0 16px; font-weight: 700;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.62); }
.site-footer a:hover { color: #fff; }
.footer-legal {
  padding-top: 26px; font-size: 12.5px; color: rgba(255,255,255,.42);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-addr { font-style: normal; line-height: 1.85; }

/* ─── Pagine legali ───────────────────────────────────────────────────────── */

.legal { padding: 60px 0 90px; }
.legal-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.legal h1 {
  font-size: clamp(28px, 3.6vw, 40px); color: var(--ink); font-weight: 800;
  letter-spacing: -1px; margin: 0 0 10px; line-height: 1.15;
}
.legal .meta {
  font-size: 13.5px; color: var(--ink-400); margin: 0 0 40px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.legal h2 {
  font-size: 22px; color: var(--ink); font-weight: 700; letter-spacing: -.4px;
  margin: 44px 0 14px; padding-top: 6px;
}
.legal h3 {
  font-size: 16.5px; color: var(--ink); font-weight: 700;
  margin: 28px 0 10px;
}
.legal p, .legal li { font-size: 15.5px; color: var(--ink-700); }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 8px; }

.legal table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.legal th, .legal td {
  border: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top;
}
.legal th { background: var(--bg-warm); font-weight: 700; color: var(--ink); }
.table-scroll { overflow-x: auto; }

.callout {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px; margin: 24px 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* Segnaposto da completare prima della pubblicazione (dati associazione, ecc.) */
.todo {
  background: #FFF8E1; border: 1px dashed #E0B33C; border-radius: 6px;
  color: #7A5A00; font-size: 13px; font-weight: 700;
  padding: 2px 7px; display: inline-block;
}

.toc {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; margin: 0 0 40px;
}
.toc h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .8px;
  text-transform: uppercase; color: var(--ink-400); font-weight: 700; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 14.5px; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 46px; padding-top: 58px; padding-bottom: 58px; }
  .steps, .features { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .cta-band { grid-template-columns: 1fr; padding: 38px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav { display: none; }
}
@media (max-width: 520px) {
  .section { padding: 58px 0; }
  .shots { grid-template-columns: 1fr; max-width: 280px; margin-inline: auto; }
}
