/* Niente zoom da doppio tocco, come sul resto del sito. Il pizzico lo
   blocca il JavaScript in pagina: su iPhone il meta viewport non basta. */
body { touch-action: manipulation; }

*, *::before, *::after { box-sizing: border-box; }
:root {
  --black: #0a0a0a;
  --dark: #1a1a1a;
  --grey: #6f6f6f;
  --light: #f5f0e8;
  --white: #ffffff;
  --accent: #c8b89a;
  --line: #e7e0d6;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(180deg, #fcfaf7 0%, #ffffff 24%, #f8f4ed 100%);
  color: var(--dark);
  line-height: 1.65;
}
a { color: inherit; }
.hidden { display: none !important; }
.serif { font-family: 'Poppins', sans-serif; font-weight: 600; }
.container { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(10,10,10,.08);
}
.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: .8rem; }
.lang-select {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--dark);
  padding: .65rem .8rem;
  border-radius: 3px;
  font: inherit;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: .72rem 1rem;
  border-radius: 3px;
  font-size: .84rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--white);
}
.hero {
  padding: 5.5rem 0 3rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 2rem;
  align-items: end;
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--grey);
}
.hero h1 {
  margin: 0;
  font: 700 clamp(2.5rem, 5vw, 4.8rem)/1.04 'Poppins', sans-serif;
  max-width: 10ch;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero-copy {
  margin: 1.25rem 0 0;
  max-width: 58ch;
  color: #555;
  font-size: 1.02rem;
}
.hero-card {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.06);
}
.hero-card p { margin: 0; color: #5b5b5b; }
.hero-card strong { display: block; margin-bottom: .45rem; color: var(--black); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.main {
  padding-bottom: 5rem;
}
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}
.toc-title {
  margin: 0 0 .8rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--grey);
}
.toc a {
  display: block;
  text-decoration: none;
  color: #444;
  padding: .4rem 0;
  font-size: .92rem;
}
.policy-shell {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.06);
}
.policy-lang {
  padding: 2.2rem;
}
.policy-header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.policy-header h2 {
  margin: 0 0 .55rem;
  font-size: 1.8rem;
}
.policy-header p {
  margin: 0;
  color: #5f5f5f;
}
.policy-section {
  padding: 1.25rem 0;
  border-top: 1px solid #f0ebe3;
}
.policy-section:first-of-type { border-top: none; }
.policy-section h3 {
  margin: 0 0 .8rem;
  font-size: 1.15rem;
}
.policy-section p,
.policy-section li { color: #525252; font-size: .98rem; }
.policy-section ul { margin: .75rem 0 0; padding-left: 1.2rem; }
.policy-section strong { color: var(--black); }
.note-box {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #faf7f2;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.footer {
  padding: 2rem 0 3rem;
  color: #666;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.footer-links a { text-decoration: none; }
/* ── Documenti legali dell'app (app-privacy.html, app-terms.html) ──── */
.toc-links { display: grid; gap: .1rem; }
.policy-section h4 {
  margin: 1.4rem 0 .5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
}
.policy-section h4:first-of-type { margin-top: .25rem; }
.policy-section a {
  color: var(--dark);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;   /* gli URL lunghi non sfondano su mobile */
}
.policy-section li + li { margin-top: .4rem; }
.doc-meta { margin: .6rem 0 0; font-size: .88rem; color: #5b5b5b; }

@media (max-width: 900px) {
  .hero-grid, .page-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  /* Indice su due colonne: tredici voci in colonna singola spingerebbero
     il testo troppo sotto la piega. */
  .toc-links { grid-template-columns: 1fr 1fr; column-gap: 1.2rem; }
}
@media (max-width: 430px) {
  .toc-links { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 1.25rem, 1120px); }
  .topbar-inner { min-height: 68px; }
  .topbar-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .policy-lang { padding: 1.3rem; }
}
