/* AF Insurance — sito statico
   Nessuna dipendenza esterna. Font self-hosted (OFL-1.1). */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "InterTight";
  src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f9f9;
  --surface: #ffffff;
  --ink: #14213a;
  --muted: #536072;
  --line: #e1e7ea;
  --brand: #285596;
  --brand-ink: #1c4078;
  --brand-soft: #e9eff7;
  --accent: #cedfd7;
  --accent-ink: #24453a;
  --radius: 22px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --space: clamp(64px, 8.5vw, 112px);
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --text: "InterTight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7.2vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--muted); max-width: 34ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-ink);
}
.eyebrow::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--brand); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(32px, 4.5vw, 56px); max-width: 720px; }
.section-head p { color: var(--muted); font-size: 1.15rem; max-width: 52ch; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { height: 34px; width: auto; }
.brand-word { font-family: var(--text); font-weight: 400; font-size: .78rem; letter-spacing: .28em; color: #687180; padding-left: 10px; border-left: 1px solid var(--line); line-height: 30px; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav-links a[aria-current="page"] { color: var(--brand); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links li:first-child { border-top: 0; }
  .nav-links a { display: block; padding: 16px 0; font-size: 1.1rem; }
  .nav-links .btn { margin-top: 16px; width: 100%; }
  .no-js .nav-links { position: static; display: flex; }
  .no-js .nav-toggle { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--text); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--brand); background: var(--brand); color: #fff;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { color: #fff; background: var(--brand-ink); border-color: var(--brand-ink); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--accent:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4em; align-items: center; }
.arrow-link::after { content: "→"; transition: transform .15s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero-copy h1 em { font-style: normal; color: var(--brand); }
.hero-note { font-size: .92rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero--page { padding-bottom: clamp(40px, 5vw, 64px); }
.hero--page .hero-copy { max-width: 820px; }

/* ---------- Switch demo ---------- */
.device {
  justify-self: center; width: min(100%, 360px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 36px;
  padding: 22px; box-shadow: 0 30px 80px -40px rgba(20, 50, 100, .32);
}
.device-top { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.cover-card { border-radius: var(--radius); padding: 22px; background: var(--brand-soft); transition: background .3s ease; display: grid; gap: 18px; }
.cover-card.is-on { background: var(--accent); }
.cover-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cover-name { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.cover-status { font-size: .88rem; color: var(--muted); }
.is-on .cover-status { color: var(--accent-ink); }

.switch {
  position: relative; width: 74px; height: 42px; flex: none;
  border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: #74839a; transition: background .25s ease;
}
.switch::after {
  content: ""; position: absolute; top: 5px; left: 5px; width: 32px; height: 32px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transition: transform .25s cubic-bezier(.3,1.4,.6,1);
}
.switch[aria-pressed="true"] { background: var(--brand); }
.switch[aria-pressed="true"]::after { transform: translateX(32px); background: var(--accent); }

.meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.meter span { height: 10px; border-radius: 3px; background: rgba(20, 33, 58, .14); transition: background .3s ease; }
.meter span.full { background: var(--brand); }
.cover-meta { display: flex; justify-content: space-between; font-size: .85rem; }
.cover-meta strong { font-family: var(--display); font-size: 1.6rem; letter-spacing: -0.02em; display: block; line-height: 1; }
.device-foot { margin-top: 16px; font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- Statement ---------- */
.statement { font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.18; letter-spacing: -0.02em; max-width: 24ch; }
.statement .dim { color: #6a7687; }
.moments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.moments li { border: 1px solid var(--line); background: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: .95rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 2px solid var(--brand); }
.steps li::before { counter-increment: step; content: "0" counter(step); font-family: var(--display); font-weight: 600; color: var(--brand); font-size: .95rem; }
.steps p { color: var(--muted); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Packs ---------- */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pack {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; display: grid; gap: 22px; align-content: start;
}
.pack--featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.pack-name { font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.pack-tag { font-size: .75rem; font-weight: 600; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 4px 10px; }
.pack-hours { font-family: var(--display); font-weight: 600; font-size: 3.4rem; line-height: 1; letter-spacing: -0.035em; }
.pack-hours small { font-size: 1.1rem; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-left: 4px; }
.pack-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); font-size: .97rem; }
.pack-list li { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; }
.pack-list b { color: var(--ink); font-weight: 600; }
.packs-note { margin-top: 20px; color: var(--muted); font-size: .95rem; max-width: 70ch; }
@media (max-width: 860px) { .packs { grid-template-columns: 1fr; } }

/* ---------- Feature grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 12px; align-content: start; }
.tile p { color: var(--muted); }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.tile-icon svg { width: 22px; height: 22px; }

/* ---------- Split / product ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts dt, .facts .k { font-weight: 600; }
.facts .v { color: var(--muted); }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: 4px; } }

.panel { border-radius: 28px; padding: clamp(32px, 5vw, 64px); }
.panel--dark { background: var(--ink); color: #fff; }
.panel--dark .muted, .panel--dark p { color: #cbd5e2; }
.panel--dark h2, .panel--dark h3 { color: #fff; }
.panel--brand { background: var(--brand-soft); }

.product-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
@media (max-width: 720px) { .product-cards { grid-template-columns: 1fr; } }
.product-card { display: grid; gap: 10px; padding: 28px; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); text-decoration: none; transition: background .2s ease; }
.product-card:hover { background: rgba(255,255,255,.12); color: #fff; }
.product-card h3 { display: flex; justify-content: space-between; }
.product-card h3::after { content: "→"; color: var(--accent); }

/* ---------- Compare ---------- */
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { text-align: left; padding: 18px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.compare thead th:last-child { color: var(--brand-ink); }
.compare tbody th { font-weight: 600; width: 28%; }
.compare td:last-child { font-weight: 600; }
.compare td:nth-child(2) { color: var(--muted); }
@media (max-width: 640px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .compare th, .compare td { border: 0; padding: 4px 0; }
  .compare td::before { content: attr(data-label) ": "; font-weight: 400; color: var(--muted); }
}

/* ---------- Example callout ---------- */
.callout { border-left: 3px solid var(--brand); background: var(--surface); padding: 24px 28px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; display: grid; gap: 8px; }
.callout strong { font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Checklist ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324453a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat; }
.checks--x li::before { background: #efe9e9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23812626' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 48px 24px 0; position: relative;
  font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--ink), var(--ink)) center/14px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center/2px 14px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 48px 28px 0; color: var(--muted); max-width: 70ch; display: grid; gap: 12px; }

/* ---------- Download ---------- */
.download { text-align: left; display: grid; gap: 28px; justify-items: start; }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 22px 0 18px;
  border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; border: 1px solid var(--line);
}
.store:hover { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.store svg { width: 24px; height: 24px; }
.store span { display: grid; line-height: 1.1; text-align: left; }
.store small { font-size: .72rem; color: var(--muted); }
.store b { font-size: 1.05rem; }

/* ---------- Documents ---------- */
.doc { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.doc p { color: var(--muted); }
@media (max-width: 640px) { .doc { grid-template-columns: 1fr; } }

/* ---------- Legal text ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.5rem; margin: 44px 0 14px; line-height: 1.2; }
.legal h3 { font-size: 1.1rem; margin: 32px 0 10px; }
.legal p, .legal li { color: #33404f; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 14px 0; }
.legal .toc { list-style: none; padding: 24px; margin: 32px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h2 { font-family: var(--text); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; }
.footer-legal { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .84rem; max-width: 90ch; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilities ---------- */
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 24px; }
.mt-lg { margin-top: 32px; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 24px; justify-items: start; }
.h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.2; }
.panel--dark .eyebrow { color: var(--accent); }
.panel--dark .eyebrow::before { box-shadow: none; }
.panel--dark a:not(.btn):not(.store):not(.product-card) { color: #fff; }
.panel--dark :focus-visible { outline-color: var(--accent); }
.store--pending { opacity: .75; cursor: default; }
.store--pending:hover { background: #fff; border-color: var(--line); }

/* Logo nel footer */
.footer-logo { width: 96px; height: auto; }
