/* Una sola famiglia variabile: l'asse "opsz" la rende più aperta nel testo e più compatta nei titoli */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/BricolageGrotesque-var.woff2) format("woff2"); }

:root {
  --cobalt: #1F3FA6;
  --cobalt-deep: #172F7D;
  --ochre: #E9A93B;
  --porcelain: #FAFAF7;
  --ink: #17203A;
  --ink-soft: #4A5470;
  --tint: #E7ECF8;
  --ochre-tint: #FBF0DC;
  --line: #D9DFEE;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --text: "Bricolage Grotesque", system-ui, sans-serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--porcelain); color: var(--ink); font: 400 18px/1.6 var(--text); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; font-variation-settings: "opsz" 96; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; z-index: 10; }

/* --- testata --- */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand span { font: 700 1.3rem/1 var(--display); letter-spacing: -0.01em; }
.top nav:not(.lang) { display: flex; gap: 22px; font-size: 1rem; }
.top nav:not(.lang) a { color: var(--ink-soft); text-decoration: none; }
.top nav:not(.lang) a:hover { color: var(--cobalt); }

/* --- apertura: la chiamata --- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding-block: 40px 88px; }
.hero h1 { font-weight: 760; font-size: clamp(2.5rem, 5.4vw, 4.25rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 12ch; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; margin: 24px 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.btn { display: inline-block; background: var(--cobalt); color: #fff; font: 700 1.05rem/1 var(--text); padding: 17px 26px; border-radius: 999px; text-decoration: none; box-shadow: 0 2px 0 var(--cobalt-deep); }
.btn:hover { background: var(--cobalt-deep); }
.btn.alt { background: #fff; color: var(--cobalt); box-shadow: inset 0 0 0 2px var(--cobalt); }
.btn.alt:hover { background: var(--tint); }
.cta .btn.alt { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.cta .btn.alt:hover { background: rgba(255,255,255,.1); }
.cta .actions { justify-content: flex-start; }
.note { font-size: 0.95rem; color: var(--ink-soft); }

.call { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 22px 22px 18px; box-shadow: 0 30px 60px -30px rgba(31, 63, 166, 0.35); max-width: 460px; justify-self: end; width: 100%; }
.call-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--tint); }
.call-head .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--cobalt); display: grid; place-items: center; }
.call-head .dot img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.call-head strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.call-head small { color: var(--ink-soft); font-size: 0.85rem; }
.call-head .time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.9rem; }
.lines { list-style: none; margin: 0; padding: 18px 0 8px; display: flex; flex-direction: column; gap: 10px; min-height: 330px; }
.lines li { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: 0.98rem; line-height: 1.45; }
.lines .them { align-self: flex-end; background: var(--ochre-tint); border-bottom-right-radius: 6px; }
.lines .us { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 6px; }
.lines .search { align-self: flex-start; background: none; padding: 0 4px; font-size: 0.85rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.lines .search svg { flex: none; }
.wave { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px; }
.wave i { width: 5px; border-radius: 3px; background: var(--cobalt); height: 8px; opacity: 0.35; transition: height 0.18s ease, opacity 0.2s; }
.wave.on i { opacity: 1; }
.wave.on i:nth-child(4n+3) { background: var(--ochre); }

/* demo dal vivo nella home */
.demo > * + * { margin-top: 16px; }
.live { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--ochre-tint); color: #8A5A00; font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #D9822B; }
.demo-lead { font-size: 1.02rem; }
.demo-ideas { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.demo-ideas li { background: var(--tint); border-radius: 999px; padding: 6px 12px; font-size: 0.92rem; }
.demo-btn { width: 100%; text-align: center; border: 0; cursor: pointer; }
.demo-btn[disabled] { opacity: 0.6; cursor: default; }
.demo-btn.on { background: #B42318; box-shadow: 0 2px 0 #7A1A12; }
.demo-note { font-size: 0.85rem; }

/* animazione: le battute compaiono una alla volta (solo se non è richiesto movimento ridotto) */
.js .lines li { opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; }
.js .lines li.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .lines li { opacity: 1; transform: none; transition: none; }
  .wave i { transition: none; }
  html { scroll-behavior: auto; }
}

/* --- sezioni --- */
section { padding: 88px 0; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-weight: 720; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 20ch; }
.intro { color: var(--ink-soft); font-size: 1.1rem; max-width: 38rem; margin: 16px 0 0; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px 64px; margin-top: 52px; }
.feature { display: grid; grid-template-columns: 52px 1fr; gap: 18px; }
.feature .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--tint); display: grid; place-items: center; }
.feature h3 { font-size: 1.25rem; font-weight: 700; margin: 4px 0 6px; }
.feature p { margin: 0; color: var(--ink-soft); }

.pricing { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; margin-top: 52px; align-items: stretch; }
.plan { background: var(--cobalt); color: #fff; border-radius: 28px; padding: 40px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.plan .fine { margin: auto 0 0; padding-top: 28px; font-size: 0.95rem; color: #C9D3F2; }
.plan h3 { color: #fff; font-size: 1.3rem; font-weight: 650; }
.plan .price { font: 780 clamp(3rem, 7vw, 4.6rem)/1 var(--display); letter-spacing: -0.03em; margin: 18px 0 4px; }
.plan .yearly { margin: 6px 0 0; color: #DCE3F7; font-size: 1.05rem; }
.plan .yearly strong { color: #fff; }
.plan .price small { font-size: 1.1rem; font-weight: 500; letter-spacing: 0; opacity: 0.85; }
.plan ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px; border-left: 3px solid var(--ochre); border-bottom: 3px solid var(--ochre); transform: rotate(-45deg); }
.plan .bars { position: absolute; right: 28px; top: 34px; display: flex; gap: 7px; align-items: center; opacity: 0.22; }
.plan .bars i { width: 10px; border-radius: 5px; background: #fff; }
.side { display: grid; gap: 20px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.box h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.box p { margin: 0; color: var(--ink-soft); }
.topups { width: 100%; border-collapse: collapse; margin-top: 10px; }
.topups td { padding: 11px 0; border-bottom: 1px solid var(--tint); }
.topups tr:last-child td { border-bottom: 0; }
.topups td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.steps { list-style: none; padding: 0; margin: 52px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 22px; }
.steps li::before { content: counter(step); display: block; font: 780 3.2rem/1 var(--display); color: var(--cobalt); margin-bottom: 14px; }
.steps h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-soft); }

.faq { margin-top: 40px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font: 650 1.15rem/1.35 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cobalt); font-size: 1.5rem; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: var(--ink-soft); max-width: 62ch; }

.cta { background: var(--ink); color: #fff; border-radius: 32px; padding: 56px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta h2 { color: #fff; max-width: 22ch; }
.cta p { color: #C9D0E4; margin: 14px 0 0; max-width: 40rem; }
.cta .btn { background: var(--ochre); color: var(--ink); box-shadow: 0 2px 0 #B98226; }
.cta .btn:hover { background: #F2BA55; }

footer { padding: 44px 0 56px; color: var(--ink-soft); font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
footer .brand img { width: 28px; height: 28px; }
footer .brand span { font-size: 1.05rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--ink-soft); }
footer a.social { display: inline-flex; align-items: center; }
footer a.social:hover { color: var(--ink); }
footer .made { max-width: calc(var(--wrap) - 40px); margin: 28px auto 0; padding: 20px 0 0; border-top: 1px solid var(--line); text-align: center; font-size: 0.9rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block-start: 16px; }
  .call { justify-self: stretch; max-width: none; }
  .features, .pricing { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .cta { grid-template-columns: 1fr; padding: 40px 28px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .top nav:not(.lang) { display: none; }
  section { padding: 64px 0; }
  .plan { padding: 32px 26px; }
  .lines { min-height: 0; }
}

/* --- selettore di lingua --- */
.top .right { display: flex; align-items: center; gap: 26px; }
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.88rem; }
.lang a { padding: 5px 11px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 650; }
.lang a:hover { color: var(--cobalt); }
.lang a[aria-current="page"] { background: var(--ink); color: #fff; }
@media (max-width: 520px) { .top .right { gap: 14px; } }
