/* Stile comune a tutte le pagine di scattin.it (index.html, chi-sono.html, certificazioni.html, citazioni.html, servizi.html, assistenza.html) */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2330;
  --muted: #5b6575;
  --line: #e3e7ee;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fc;
  --bad: #b42318;
  --good: #067647;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e28;
    --text: #e6ebf2;
    --muted: #9aa5b5;
    --line: #263041;
    --accent: #7aa7ff;
    --accent-ink: #0b1220;
    --accent-soft: #1a2740;
    --bad: #ff8a80;
    --good: #5fd49a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* Barra in alto */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.mono {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; letter-spacing: .5px;
}
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
/* su schermi stretti restano a destra solo le voci principali: le altre sono nel menu laterale */
@media (max-width: 800px) { .top nav .hide-md { display: none; } }
@media (max-width: 720px) { .top nav { gap: 16px; } .top nav .hide-sm { display: none; } }
@media (max-width: 520px) { .top nav .hide-xs { display: none; } }
@media (max-width: 360px) { .brand-name { display: none; } }

/* Menu laterale: si apre dal pulsante con le tre righe in alto a sinistra */
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 22px; height: 22px; }
.burger { margin-left: -8px; }
.drawer {
  position: fixed; inset: 0 auto 0 0; margin: 0;
  width: min(300px, 85vw); height: 100%; max-height: none; padding: 0;
  border: 0; border-right: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  box-shadow: 18px 0 40px -20px rgba(15, 20, 27, .45);
}
.drawer:popover-open { display: flex; flex-direction: column; animation: drawer-in .2s ease-out; }
.drawer::backdrop { background: rgba(15, 20, 27, .35); }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .drawer:popover-open { animation: none; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 10px 0 20px; border-bottom: 1px solid var(--line);
}
.drawer nav { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.drawer nav a { padding: 11px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.drawer nav a:hover { background: var(--accent-soft); }
.drawer nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Apertura */
.hero {
  padding: 88px 0 76px;
  background: radial-gradient(900px 380px at 90% -10%, var(--accent-soft), transparent 70%);
}
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0 0 12px; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 18px; max-width: 22ch; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--muted); max-width: 56ch; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero-video {
  display: block; width: 100%; height: auto; aspect-ratio: 480 / 252;
  border: 1px solid var(--line); border-radius: 14px; background: #000;
  box-shadow: 0 18px 40px -20px rgba(15, 20, 27, .45);
}
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { box-shadow: none; border-color: var(--muted); }
.btn.full { width: 100%; }

/* Sezioni */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 36px; max-width: 60ch; }
.sub.tight { margin-bottom: 14px; }
.sla { list-style: none; margin: 0 0 36px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sla li {
  display: flex; align-items: baseline; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 15px;
}
.sla strong { color: var(--accent); font-size: 1.05rem; }

/* Pagine interne (es. assistenza.html) */
.page {
  padding: 64px 0 72px;
  background: radial-gradient(900px 320px at 90% -10%, var(--accent-soft), transparent 70%) no-repeat;
}
.page h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: 10px; }

/* Chi sono (chi-sono.html) */
.about { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start; margin-top: 28px; }
.avatar {
  width: 140px; height: 140px; border-radius: 50%;
  background: linear-gradient(135deg, #1f5fbf, #3aa0c8);
  display: grid; place-items: center; color: #fff; font-size: 44px; font-weight: 700;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.about p { margin: 0 0 14px; max-width: 62ch; font-size: 1.05rem; }
.about p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
  .avatar { width: 104px; height: 104px; font-size: 34px; }
}

/* Servizi */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.ico {
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
}
.ico svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Citazioni (citazioni.html) */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 28px; }
.quote {
  margin: 0; padding: 24px 26px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px;
}
.quote blockquote { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.35; font-weight: 600; text-wrap: balance; }
.quote blockquote::before {
  content: "\201C"; display: block; margin-bottom: 4px;
  font: 700 3rem/.8 Georgia, "Times New Roman", serif; color: var(--accent);
}
.quote figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; }
.quote figcaption::before { content: "\2014\00a0"; }
.quote .note { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-style: italic; }

/* Certificazioni (certificazioni.html) */
.vendors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; align-items: start; }
.vendor { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 8px; }
.vendor h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; font-size: 1.2rem; }
.since {
  flex: none; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0;
}
.certs { list-style: none; margin: 0; padding: 0; }
.certs li + li { border-top: 1px solid var(--line); }
.cert { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; padding: 14px 0; color: var(--text); text-decoration: none; }
.cert svg { grid-row: span 3; width: 22px; height: 22px; margin-top: 1px; color: var(--muted); }
.cert > span, .cert > strong { grid-column: 2; }
.cert-badge { grid-column: 3; grid-row: 1 / span 3; align-self: center; width: 56px; height: auto; }
/* link di verifica del badge (es. Credly): sta fuori da a.cert, allineato al testo */
.cert-verify { display: inline-block; margin: -6px 0 14px 34px; font-size: 14px; }
.cert:hover strong { color: var(--accent); }
.cert:hover svg { color: var(--accent); }
.cert .kind { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cert .kind.exam { color: var(--good); }
.cert strong { line-height: 1.35; }
.cert .meta { color: var(--muted); font-size: 14px; }
.cert time { white-space: nowrap; }

/* Assistenza */
.help { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .help { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 30px 60px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 46px; bottom: 6px; width: 2px; background: var(--line);
}
.steps h3 { margin: 7px 0 4px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }
.tag {
  font-family: ui-monospace, Consolas, monospace; font-size: .9em;
  background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 5px;
}
.mailbox { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.label { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.addr {
  display: block; margin: 4px 0 12px; color: var(--text); text-decoration: none;
  font-size: clamp(1.15rem, 3vw, 1.4rem); font-weight: 700; overflow-wrap: anywhere;
}
.addr:hover { color: var(--accent); }
.mailnote { margin: 0 0 22px; color: var(--muted); font-size: 15px; }

/* Le 4 regole per un ticket fatto bene */
.rules-title { margin: 64px 0 20px; font-size: 1.3rem; }
.rules {
  list-style: none; margin: 0; padding: 0; counter-reset: r;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.rules li { counter-increment: r; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.rules li::before {
  content: counter(r); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.rules h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.35; }
.rules p { margin: 0; color: var(--muted); font-size: .95rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.example { border: 1px solid; border-radius: 14px; padding: 20px 22px; }
.example.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.example.good { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 7%, var(--surface)); }
.example-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.example-label svg { width: 18px; height: 18px; }
.bad .example-label { color: var(--bad); }
.good .example-label { color: var(--good); }
.example p { margin: 0; }
.example .subject { font-weight: 700; margin-bottom: 6px; }

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
