/* SafeKids – sito. Colori e misure in variabili, tema chiaro e scuro. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #ec6a00;
  --accent-text: #b84f00;
  --accent-soft: #fff1e4;
  --on-accent: #ffffff;
  --teal: #0f9d8a;
  --hero-glow: rgba(255, 159, 10, 0.22);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  --phone-shadow: 0 30px 60px -20px rgba(80, 40, 0, 0.35), 0 12px 24px -12px rgba(0, 0, 0, 0.2);
  --band-bg: #1d1d1f;
  --band-text: #f5f5f7;
  --radius: 20px;
  --wrap: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --secondary: #a1a1a6;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #ff9f0a;
    --accent-text: #ffb340;
    --accent-soft: #2a1a06;
    --on-accent: #1d1d1f;
    --teal: #3fd1bd;
    --hero-glow: rgba(255, 159, 10, 0.16);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --phone-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    --band-bg: #1c1c1e;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
}
.wrap.narrow { max-width: 820px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

.icon { width: 24px; height: 24px; flex: none; }
.icon.tiny { width: 16px; height: 16px; }
.icon.big { width: 44px; height: 44px; }

/* Barra in alto */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 56px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 650; font-size: 18px; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a, .langs a {
  color: var(--secondary); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
  min-height: 36px; display: inline-flex; align-items: center;
}
.nav a:hover, .langs a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); }

.langs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg-alt); border-radius: 999px;
}
.langs a { font-size: 13px; font-weight: 600; padding: 4px 10px; min-height: 30px; }
.langs a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 8px; padding-bottom: 6px; }
  .langs { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 4px 0 0 -12px; overflow-x: auto; }
}

/* Pulsanti */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--on-accent);
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
  border-radius: 999px;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.button:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:hover { transform: none; } }

.price { color: var(--secondary); font-size: 15px; }

.arrow-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }

/* Hero */

.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 40px;
  background:
    radial-gradient(60% 60% at 80% 30%, var(--hero-glow), transparent 70%),
    radial-gradient(50% 50% at 10% 0%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 70%),
    var(--bg);
}

.hero-inner {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px;
}

.eyebrow {
  color: var(--accent-text); font-weight: 600; font-size: 15px;
  letter-spacing: 0.02em; margin-bottom: 14px;
}

.hero h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 750; margin-bottom: 20px; }

.lead { font-size: clamp(19px, 2vw, 22px); line-height: 1.45; color: var(--secondary); max-width: 32ch; margin-bottom: 32px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }

.hero-media {
  position: relative;
  display: flex; justify-content: center;
  min-height: 560px;
}

.phone {
  width: 290px;
  border-radius: 46px;
  padding: 9px;
  background: linear-gradient(145deg, #3a3a3c, #1d1d1f 40%, #0b0b0c);
  box-shadow: var(--phone-shadow);
  flex: none;
}
.phone img { border-radius: 38px; width: 100%; background: var(--bg-alt); }

.hero-media .phone.front { position: relative; z-index: 2; transform: translateX(64px); }
.hero-media .phone.back {
  position: absolute; z-index: 1; top: 56px; left: 50%;
  transform: translateX(-96%) scale(0.86);
  transform-origin: top center;
  opacity: 0.95;
}

.pills {
  list-style: none; padding: 0; margin: 56px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.pills li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 15px; font-weight: 550;
}
.pills .icon { width: 18px; height: 18px; color: var(--teal); }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; flex-direction: column; }
  .hero-media { min-height: 0; }
  .hero-media .phone.front { transform: none; width: 240px; }
  .hero-media .phone.back { display: none; }
  .pills { margin-top: 40px; }
}

/* Funzioni principali */

.feature { padding: 88px 0; }
.feature.alt { background: var(--bg-alt); }

.feature-inner {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px;
}
.feature.reverse .feature-text { order: 2; }

.feature-text { max-width: 480px; justify-self: center; }
.feature h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; margin: 18px 0 14px; }
.feature-text > p { font-size: 19px; color: var(--secondary); margin-bottom: 22px; }
.feature-media { display: flex; justify-content: center; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-text);
}
.badge.small { width: 44px; height: 44px; border-radius: 12px; }
.badge .icon { width: 26px; height: 26px; }
.badge.small .icon { width: 22px; height: 22px; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; font-weight: 500; }
.checks .icon {
  width: 22px; height: 22px; padding: 4px; margin-top: 1px;
  border-radius: 50%; background: var(--teal); color: #fff; stroke-width: 3;
}

@media (max-width: 820px) {
  .feature { padding: 64px 0; }
  .feature-inner { grid-template-columns: 1fr; gap: 40px; }
  .feature.reverse .feature-text { order: 0; }
  .feature-text { justify-self: stretch; }
  .feature .phone { width: 240px; }
}

/* Altre funzioni */

.more { padding: 88px 0; }
.section-title { font-size: clamp(30px, 4vw, 40px); font-weight: 700; text-align: center; margin-bottom: 40px; }
.section-title.left { text-align: left; font-size: 26px; margin: 48px 0 18px; }

.tiles {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.tile h3 { font-size: 19px; font-weight: 650; margin: 16px 0 6px; }
.tiles.two .tile h3 { margin-top: 0; margin-bottom: 10px; }
.tile p, .tile li { color: var(--secondary); font-size: 16px; }
.tile p:last-child, .tile ol:last-child { margin-bottom: 0; }
.tile ol { padding-left: 20px; }
.tile li { margin-bottom: 6px; }
.tile strong { color: var(--text); font-weight: 600; }

@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* Fascia privacy */

.privacy-band { background: var(--band-bg); color: var(--band-text); padding: 96px 0; }
.privacy-inner { max-width: 720px; text-align: center; }
.privacy-band .icon.big { margin: 0 auto 20px; color: var(--accent); }
.privacy-band h2 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; margin-bottom: 18px; }
.privacy-band p { font-size: 19px; color: rgba(245, 245, 247, 0.72); margin-bottom: 22px; }
.privacy-band a { color: #ffb340; font-size: 17px; }

/* Come funziona */

.how { padding: 88px 0 40px; }
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  counter-reset: none;
}
.steps li { text-align: center; padding: 0 8px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 19px;
}
.steps h3 { font-size: 20px; font-weight: 650; margin: 16px 0 8px; }
.steps p { color: var(--secondary); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* Invito finale */

.final-cta { padding: 64px 0 96px; }
.final-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final-inner img { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 8px; }
.final-inner h2 { font-size: clamp(30px, 4vw, 40px); font-weight: 700; }
.final-inner p { color: var(--secondary); font-size: 18px; margin: 0 0 8px; }

/* Pagine di testo */

.page-head {
  padding: 64px 0 24px;
  background: radial-gradient(70% 100% at 50% 0%, var(--hero-glow), transparent 70%);
}
.page-head .doc-head { max-width: var(--wrap); }
@media (min-width: 901px) { .page-head .doc-head h1 { margin-left: 296px; } }
.page-head h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 750; }

.doc-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px;
  align-items: start; padding-bottom: 96px;
}

.toc { position: sticky; top: 84px; font-size: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; color: var(--secondary); border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); text-decoration: none; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; background: var(--bg-alt); border-radius: 16px; padding: 14px 16px; }
  .toc ol { border: 0; columns: 2; column-gap: 16px; }
  .toc a { padding: 4px 0; border: 0; margin: 0; }
}
@media (max-width: 480px) { .toc ol { columns: 1; } }

.doc { max-width: 720px; }
.doc h2 { font-size: 26px; font-weight: 700; margin: 48px 0 14px; }
.doc h3 { font-size: 19px; font-weight: 650; margin: 28px 0 10px; }
.doc li { margin-bottom: 8px; }
.doc .updated { color: var(--secondary); font-size: 15px; margin-bottom: 24px; }

.summary {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0 8px;
}
.summary strong { display: block; font-size: 18px; margin-bottom: 8px; }
.summary ul { margin: 0; padding-left: 20px; }

.table-wrap {
  overflow-x: auto; margin: 0 0 14px;
  border: 1px solid var(--border); border-radius: 16px;
}
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 600px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { background: var(--bg-alt); font-weight: 600; }

/* Assistenza */

.contact {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 24px; margin-top: 8px;
}
.contact h2 { font-size: 22px; font-weight: 700; margin: 4px 0 8px; }
.contact p { margin: 0; }
.contact .badge { background: var(--accent); color: var(--on-accent); }
@media (max-width: 520px) { .contact { flex-direction: column; } }

.faqs {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 96px;
}
.faq + .faq { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; min-height: 56px;
  font-size: 17px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--bg-alt); }
.faq summary .icon { color: var(--secondary); transition: transform 0.2s ease; }
.faq[open] summary .icon { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .faq summary .icon { transition: none; } }
.faq-body { padding: 0 22px 18px; color: var(--secondary); }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body strong { color: var(--text); font-weight: 600; }

/* 404 */

.not-found { min-height: 100vh; display: flex; align-items: center; padding: 48px 0; }
.not-found h1 { font-size: 64px; font-weight: 800; }
.not-found p { color: var(--secondary); }

/* Piè di pagina */

.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--secondary); }
.footer-inner { display: grid; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-links a { color: var(--secondary); }
.footer-links a:hover { color: var(--text); }
.footer-legal { margin: 6px 0 0; font-size: 12px; }
