@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  --ash: #a3a3a3;
  --smoke: #808080;
  --line: #262626;
  --display: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 5vw, 48px);
  --col: 1040px;
  /* Il titolo deve riempire la colonna senza mai sbordare.
     "Should I buy?" nel font del display misura 6,09 em (spaziatura negativa
     e cursore compresi): divido la larghezza utile per 6,35 e resto al sicuro
     anche con la barra di scorrimento e con il font di ripiego. */
  --hero-size: calc((min(100vw, var(--col)) - var(--pad) * 2) / 6.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* Le ancore non finiscono sotto la barra fissa */
[id] { scroll-margin-top: 80px; }
body {
  margin: 0; background: #000; color: #fff; overflow-x: clip;
  font: 17px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: #000; z-index: 11; }
a { color: inherit; }
a:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 14px; border-radius: 999px; z-index: 20; }
.skip:focus { left: 12px; }
.wrap { max-width: var(--col); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Barra in alto */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(0,0,0,.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 19px/1 var(--display); letter-spacing: 3px; text-decoration: none; }
.logo img { display: block; height: 24px; width: auto; }
.langs { display: flex; gap: 4px; }
.langs a { font: 700 13px/1 var(--display); letter-spacing: 1px; text-decoration: none; color: var(--smoke);
  padding: 8px 10px; border-radius: 999px; }
.langs a[aria-current] { color: #000; background: #fff; }
.langs a { transition: color .2s ease, background-color .2s ease; }
.langs a:not([aria-current]):hover { color: #fff; background: rgba(255,255,255,.08); }

/* Apertura */
.hero { padding-top: clamp(72px, 16vh, 170px); padding-bottom: 24px; }
.code { font: 500 14px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--smoke); margin: 0 0 22px; }
.typed { font: 800 clamp(40px, var(--hero-size), 156px)/0.92 var(--display); letter-spacing: -0.045em; margin: 0;
  min-height: .92em; white-space: nowrap; }
.caret { display: inline-block; width: .09em; height: .78em; margin-left: .04em; background: #fff;
  vertical-align: -.04em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { font: 500 clamp(22px, 2.6vw, 30px)/1.3 var(--display); color: var(--ash); margin: 26px 0 0; max-width: 28ch; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.pill { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 17px/1 var(--display); text-decoration: none; border: 1.5px solid #fff;
  transition: transform .15s ease, background-color .22s ease, color .22s ease; }
.pill.solid { background: #fff; color: #000; }
@media (hover: hover) { .pill.solid:hover { background: #000; color: #fff; } }
.pill:active { transform: scale(.97); }
.textlink { color: var(--ash); font-weight: 600; text-underline-offset: 4px; transition: color .2s ease; }
.textlink:hover { color: #fff; }
/* Stato del prodotto accanto al pulsante, con un punto che respira. */
.status { display: inline-flex; align-items: center; gap: 11px; color: var(--ash); font-size: 15px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none;
  box-shadow: 0 0 0 0 rgba(255,255,255,.55); animation: ping 2.6s cubic-bezier(.22,1,.36,1) infinite; }
@keyframes ping { 60% { box-shadow: 0 0 0 11px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
/* Senza JS resta tutto visibile: la comparsa progressiva e' solo un di piu'. */
.js .rise { opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--i, 0) * 90ms); }
.js .rise.in { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Telefono */
.stage { position: relative; display: flex; justify-content: center; padding: 56px 0 0; }
/* Un alone appena accennato: stacca il telefono dal nero senza aggiungere colore. */
.stage::before { content: ""; position: absolute; inset: 0 -20% -6%; pointer-events: none;
  background: radial-gradient(58% 46% at 50% 46%, rgba(255,255,255,.08), rgba(255,255,255,0) 70%); }
.stage .phone { position: relative; }
/* L'alone resta dentro lo schermo: su iPhone allargava la pagina. */
.stage { overflow-x: clip; }
.calc > * { min-width: 0; }
.phone { width: min(340px, 80vw); aspect-ratio: 390 / 844; border-radius: 50px; padding: 9px;
  background: #0f0f0f; border: 1px solid #2c2c2c; }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 42px; }

/* Sezioni */
.block { padding-top: clamp(56px, 8vw, 96px); margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.block > .code { margin-bottom: 20px; }
h2 { font: 800 clamp(36px, 5.6vw, 64px)/1.02 var(--display); letter-spacing: -0.035em; margin: 0; max-width: 18ch; }
.body { color: var(--ash); max-width: 46ch; margin: 18px 0 0; font-size: 18px; }
.body a { color: #fff; text-underline-offset: 4px; }

/* Calcolatore */
.calc { margin-top: 44px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: stretch; }
.sentence { font: 500 clamp(22px, 2.4vw, 29px)/1.65 var(--display); color: var(--ash); margin: 0; }
/* La larghezza definitiva la imposta lo script sul contenuto: queste servono
   da partenza e come ripiego se il JS non gira. */
.sentence input { font: 800 1em/1 var(--display); color: #fff; background: transparent; border: 0;
  border-bottom: 2px solid #fff; width: 3.4ch; padding: 0 2px; text-align: center; border-radius: 0;
  appearance: none; transition: border-color .15s; }
.sentence input.wide { width: 5ch; }
.sentence input:hover { border-bottom-color: var(--ash); }
.answer { background: #fff; color: #000; border-radius: 28px; padding: clamp(22px, 3vw, 32px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 260px;
  container-type: inline-size; }
.answer .label { color: #5c5c5c; font-weight: 600; font-size: 15px; }
.answer .big { font: 800 clamp(80px, 10vw, 128px)/.9 var(--display); letter-spacing: -0.05em; margin-top: 8px;
  font-variant-numeric: tabular-nums; }
/* Un risultato lungo (p.es. 128.000) sbordava dal riquadro bianco: lo script
   misura quanto e' largo il numero in em e qui lo rimpicciolisco solo quanto serve. */
.answer .big { font-size: min(clamp(80px, 10vw, 128px), calc(100cqw / var(--fit, 2.6))); }
.answer .unit { font: 700 22px/1.2 var(--display); margin-top: 6px; }
.answer .extra { color: #333; font-size: 15px; margin: 0; }
.answer .share { align-self: flex-start; font: 700 14px/1 var(--display); color: #000; background: transparent; cursor: pointer;
  border: 1.5px solid #000; border-radius: 999px; padding: 10px 16px; margin-top: -4px;
  transition: background-color .2s ease, color .2s ease, transform .15s ease; }
@media (hover: hover) { .answer .share:hover { background: #000; color: #fff; } }
.answer .share:active { transform: scale(.96); }
.answer .share:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.note { color: var(--smoke); font-size: 14px; margin: 16px 0 0; max-width: 60ch; }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }

/* Tre passi */
.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { border-top: 1px solid var(--line); padding-top: 20px; transition: border-color .3s ease; }
.steps li:hover { border-top-color: #fff; }
.steps .n { font: 700 14px/1 var(--display); color: var(--smoke); transition: color .3s ease; }
.steps li:hover .n { color: #fff; }
.steps h3 { font: 700 24px/1.2 var(--display); margin: 14px 0 0; }
.steps p { color: var(--ash); margin: 8px 0 0; font-size: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 0; } .steps li { padding: 22px 0 6px; } }

.privacy, .closer { padding-bottom: clamp(72px, 9vw, 110px); }

/* Pulsante nella barra: compare quando quello dell'apertura e' passato. */
.bar-end { display: flex; align-items: center; gap: 12px; }
.pill.mini { min-height: 36px; padding: 0 16px; font-size: 14px; }
.head-cta { opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background-color .22s ease, color .22s ease; }
.top.past .head-cta { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 340px) { .head-cta { display: none; } }

/* Prezzi pronti sotto la frase del calcolatore */
.ask { align-self: center; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.presets-label { font: 500 13px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--smoke); margin-right: 4px; }
.presets button { font: 700 14px/1 var(--display); color: var(--ash); background: transparent; cursor: pointer;
  border: 1px solid #3a3a3a; border-radius: 999px; padding: 9px 14px;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .15s ease; }
@media (hover: hover) { .presets button:hover { color: #fff; border-color: #fff; } }
.presets button:active { transform: scale(.96); }
.presets button[aria-pressed="true"] { color: #000; background: #fff; border-color: #fff; }
.presets button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Funzioni dell'app */
.feats { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; }
.feats li { background: #000; padding: clamp(22px, 3vw, 32px); transition: background-color .3s ease; }
.feats li:hover { background: #0b0b0b; }
.feats h3 { font: 700 22px/1.2 var(--display); margin: 0; }
.feats p { color: var(--ash); margin: 10px 0 0; font-size: 16px; }
@media (max-width: 900px) { .feats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feats { grid-template-columns: 1fr; } }

/* Domande */
.faq { margin-top: 40px; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font: 700 clamp(19px, 2vw, 22px)/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 500 28px/1 var(--display); color: var(--smoke);
  transition: transform .25s ease, color .2s ease; }
.faq summary:hover::after { color: #fff; }
.faq details[open] summary::after { transform: rotate(45deg); color: #fff; }
.faq summary:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.faq details p { color: var(--ash); margin: 0; padding: 0 0 24px; max-width: 62ch; }

/* Chiusura */
.closer h2 { font-size: clamp(40px, 7vw, 88px); max-width: 14ch; }
.closer .ctas { margin-top: 30px; }

/* Pagina non trovata */
.lost { padding-top: clamp(72px, 16vh, 150px); padding-bottom: clamp(96px, 16vw, 180px); }
.lost h1 { font: 800 clamp(96px, 26vw, 260px)/0.86 var(--display); letter-spacing: -0.05em; margin: 18px 0 0; }
.lost .lead { margin-top: 20px; }

/* Pagine legali */
.legal { padding-top: clamp(48px, 9vw, 92px); padding-bottom: clamp(96px, 12vw, 140px); max-width: 740px; }
.legal .code { margin-bottom: 18px; }
.legal h1 { font: 800 clamp(36px, 6vw, 56px)/1.05 var(--display); letter-spacing: -0.03em; margin: 0; }
.legal h2 { font: 700 22px/1.3 var(--display); letter-spacing: 0; margin: 46px 0 10px; max-width: none; }
.legal p { color: #c4c4c4; margin: 10px 0; line-height: 1.7; }
.legal .date { color: var(--smoke); font-size: 14px; margin-top: 14px; }
.legal .intro { color: #fff; font: 500 20px/1.5 var(--display); margin: 26px 0 0;
  padding-bottom: clamp(26px, 4vw, 38px); border-bottom: 1px solid var(--line); }
.legal a { color: #fff; text-underline-offset: 4px; }

footer { border-top: 1px solid var(--line); padding: 44px 0 calc(44px + env(safe-area-inset-bottom, 0px));
  color: var(--smoke); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start; }
.foot .logo { font-size: 17px; letter-spacing: 2.5px; }
.foot-tag { color: var(--ash); font: 500 16px/1.4 var(--display); margin: 14px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; justify-self: end; }
.foot .foot-copy { grid-column: 1 / -1; justify-self: start; color: var(--smoke); white-space: normal; }
.foot .foot-copy:hover { color: #fff; }
.foot a { color: var(--ash); text-decoration: none; white-space: nowrap; transition: color .2s ease; }
.foot a:hover { color: #fff; }
@media (max-width: 620px) { .foot { grid-template-columns: 1fr; gap: 24px; } .foot-links { justify-self: start; } }

@media (prefers-reduced-motion: reduce) {
  .caret, .status::before { animation: none; }
  .head-cta, .faq summary::after { transition: none; }
  .js .reveal, .js .rise { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Smartphone */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .bar { height: 58px; }
  .logo { font-size: 17px; letter-spacing: 2.5px; gap: 8px; }
  .logo img { height: 22px; }
  .bar-end { gap: 6px; }
  .langs a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 10px; }
  .pill.mini { min-height: 38px; padding: 0 14px; }
  .hero { padding-top: clamp(48px, 10vh, 90px); }
  .code { font-size: 12.5px; margin-bottom: 16px; }
  .lead { margin-top: 20px; font-size: 21px; }
  .ctas { gap: 16px; margin-top: 28px; }
  .ctas .pill { flex: 1 1 100%; justify-content: center; }
  .status { font-size: 14px; }
  .stage { padding-top: 40px; }
  .phone { width: min(300px, 78vw); border-radius: 44px; padding: 8px; }
  .phone img { border-radius: 37px; }
  h2 { font-size: clamp(32px, 9.4vw, 44px); }
  .body { font-size: 17px; }
  .calc { margin-top: 30px; gap: 22px; }
  .sentence { font-size: 22px; line-height: 1.8; }
  .sentence input { min-height: 44px; }
  .presets { flex-wrap: nowrap; overflow-x: auto; margin: 18px calc(var(--pad) * -1) 0; padding: 4px var(--pad);
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .presets::-webkit-scrollbar { display: none; }
  .presets-label { flex: none; }
  .presets button { flex: none; min-height: 40px; }
  .answer { min-height: 0; border-radius: 24px; }
  .answer .share { min-height: 44px; }
  .steps { margin-top: 30px; }
  .feats { margin-top: 30px; border-radius: 22px; }
  .faq { margin-top: 26px; }
  .faq summary { padding: 18px 0; min-height: 56px; }
  .closer h2 { font-size: clamp(40px, 12vw, 56px); }
  .foot-links { gap: 6px 20px; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 40px; }
}
