/* imango — stili (mobile-first) */
:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --bg: #fbfbfd;
  --mango: #ff9f1a;
  --mango-ink: #b45309; /* accento con contrasto AA su bianco */
  --error: #b3261e;
  --radius: 18px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  color: var(--ink);
  background: radial-gradient(90% 420px at 50% 0, rgba(255, 176, 32, .18), transparent) no-repeat, var(--bg);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--mango-ink); outline-offset: 3px; }
h2:focus { outline: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Layout */
.page { max-width: 520px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom)); text-align: center; }
.logo { display: block; width: auto; height: 36px; margin: clamp(0px, 5vh, 40px) auto clamp(28px, 7vh, 64px); }
h1 { margin: 0 0 14px; font-size: clamp(32px, 9vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
.lead { margin: 0 0 clamp(28px, 5vh, 44px); color: var(--muted); font-size: 18px; text-wrap: balance; }

/* Area interattiva */
.panel { position: relative; max-width: 420px; margin: 0 auto; }
.stage { transition: height .28s var(--ease); }
.screen { display: flow-root; }
h2 { margin: 0 0 20px; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
.screen:not(.home) h2 { display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 calc(var(--tap) + 4px); }
.back { position: absolute; top: 0; left: 0; z-index: 1; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s, transform .2s var(--ease); }
.back.on { opacity: 1; visibility: visible; }
.back:active { transform: scale(.92); }

/* Elementi selezionabili */
.tile, .card, .row { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
@media (hover: hover) {
  .tile:hover, .card:hover, .row:hover { transform: translateY(-2px); border-color: var(--mango); box-shadow: 0 10px 28px rgba(255, 159, 26, .2); }
}
.tile:active, .card:active, .row:active { transform: scale(.975); border-color: var(--mango); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 104px; padding: 16px 8px; }
.tile b { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }
.tile small { margin-top: 4px; font-size: 14px; color: var(--muted); }

.card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; text-align: left; border-radius: 24px; background: linear-gradient(160deg, #fff 55%, #fff4e0); box-shadow: 0 12px 32px rgba(255, 159, 26, .18), 0 1px 2px rgba(0, 0, 0, .05); }
.card .gb, .card .price { display: block; }
.card .gb { font-size: 44px; line-height: 1; letter-spacing: -.035em; font-weight: 700; }
.card .price { margin-top: 8px; font-size: 22px; font-weight: 600; color: var(--mango-ink); }
.go { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; background: var(--ink); }

.link { display: block; margin: 16px auto 0; padding: 10px 16px; border: 0; border-radius: 12px; background: none; color: var(--mango-ink); font-weight: 600; }
@media (hover: hover) { .link:hover { text-decoration: underline; text-underline-offset: 4px; } }

.list { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 12px; padding: 18px 16px 18px 20px; text-align: left; }
.row b { font-size: 20px; font-weight: 600; }
.row span, .row .i { color: var(--muted); }

/* Form */
.field, .mail { display: grid; gap: 12px; text-align: left; }
select, input { width: 100%; min-height: 54px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background-color: #fff; font-size: 17px; }
select { -webkit-appearance: none; appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d1d1f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; }
input[aria-invalid="true"] { border-color: var(--error); }
.mail label { margin-bottom: -6px; font-size: 14px; color: var(--muted); }
.err { margin: 0; font-size: 14px; color: var(--error); }
.err:empty { margin-top: -12px; }
.cta { min-height: 54px; padding: 12px 24px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; line-height: 1.25; transition: transform .2s var(--ease), opacity .2s, background .2s; }
@media (hover: hover) { .cta:hover:not(:disabled) { background: #000; transform: translateY(-1px); } }
.cta:active:not(:disabled) { transform: scale(.98); }
.cta:disabled { opacity: .55; cursor: default; }
@media (min-width: 480px) { .field { grid-template-columns: 1fr auto; } }

.note { margin: 0 0 20px; color: var(--muted); text-wrap: balance; }
.fine { display: block; font-size: 13px; color: var(--muted); text-align: center; }
.check { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; color: var(--ink); background: linear-gradient(135deg, #ffc93c, #ff8a1f); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Consenso privacy, honeypot, pagina informativa */
.mail .consent { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.consent input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--ink); }
.consent input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.consent a { color: var(--mango-ink); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.legal { max-width: 640px; text-align: left; }
.legal h1 { font-size: clamp(28px, 7vw, 36px); }
.legal h2 { margin: 28px 0 8px; font-size: 18px; }
.legal p { color: var(--muted); }
.legal a { color: var(--mango-ink); }
mark.todo { padding: 1px 6px; border-radius: 6px; background: #fff0c2; color: var(--ink); }
