/* VoceFlow — stile morbido ed elegante */
:root {
  --teal: #1A9AA0;
  --teal-deep: #137479;
  --yellow: #F2C230;
  --yellow-soft: #F8E3A1;
  --cream: #FBF5E4;
  --cream-deep: #F3EAD0;
  --paper: #FFFDF6;
  --ink: #1C1B19;
  --ink-soft: #4A463F;
  --line: #E7DCBE;

  --serif: "EB Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 24px;
  --radius-s: 14px;
  --shadow: 0 30px 60px -30px rgba(28, 27, 25, .28), 0 8px 20px -12px rgba(28, 27, 25, .12);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--yellow-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: 600 .82em/1 var(--sans); display: inline-block; padding: .28em .45em; background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; vertical-align: .08em; white-space: nowrap; }
del { text-decoration: line-through; text-decoration-color: var(--teal); text-decoration-thickness: .1em; color: var(--ink-soft); opacity: .75; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
.section { padding: clamp(88px, 12vw, 150px) 0; }

.title { font: 400 clamp(2.3rem, 1.4rem + 3.6vw, 4.2rem)/1.04 var(--serif); letter-spacing: -.015em; }
.title em, h1 em { font-style: italic; color: var(--teal-deep); }
.title.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--ink-soft); max-width: 36em; margin-top: 22px; }
.kicker { font-size: .95rem; color: var(--teal-deep); font-weight: 500; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  background: var(--ink); color: var(--cream); border: 0; border-radius: 999px;
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--teal-deep); box-shadow: 0 12px 24px -12px rgba(19, 116, 121, .6); }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.link-soft { font-weight: 600; text-decoration: none; color: var(--ink); transition: color .2s; }
.link-soft:hover { color: var(--teal-deep); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(251, 245, 228, .97); transition: box-shadow .3s; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 500 1.4rem var(--serif); text-decoration: none; }
.logo-img { display: block; width: 28px; height: 28px; }
.nav-links { display: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
@media (min-width: 880px) { .nav-links { display: flex; } }

/* Hero */
.hero { padding: clamp(40px, 6vw, 76px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-inner { text-align: center; }
.hero h1 { margin-top: 18px; font: 400 clamp(3rem, 1.6rem + 6.4vw, 6.6rem)/.98 var(--serif); letter-spacing: -.025em; }
.hero .lead { margin: 26px auto 0; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; }

.btn-big { min-height: 58px; padding: 0 30px; font-size: 1.05rem; background: var(--yellow); color: var(--ink); }
.btn-big:hover { background: var(--ink); color: var(--cream); }
.btn-big span { transition: transform .25s var(--ease); }
.btn-big:hover span { transform: translateX(4px); }
.hero-note { margin-top: 18px; font-size: .88rem; color: var(--ink-soft); }

/* Il tasto e il foglio */
.keydemo { margin: clamp(40px, 5vw, 60px) auto 0; max-width: 980px; display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.key-side { display: grid; justify-items: center; gap: 18px; }
.key { width: 132px; height: 132px; border-radius: 28px; background: var(--paper); display: grid; place-content: center; text-align: center;
  box-shadow: 0 10px 0 var(--line), 0 24px 40px -18px rgba(28, 27, 25, .35); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.key-sym { font: 400 3.4rem/1 var(--sans); }
.key-name { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.key.down { transform: translateY(8px); box-shadow: 0 2px 0 var(--line), 0 10px 20px -12px rgba(28, 27, 25, .35); background: var(--yellow-soft); }
.key-listen { height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ink); display: flex; align-items: center; opacity: 0; transform: scale(.85); transition: opacity .3s, transform .4s var(--ease); }
.key-listen .wave i { background: var(--cream); }
.key-listen.on { opacity: 1; transform: none; }
.key-said { min-height: 4.4em; margin: 0; max-width: 30ch; text-align: center; font: italic 400 1.15rem/1.4 var(--serif); color: var(--ink-soft); }
.paper { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 30px 34px; min-height: 260px; }
.paper-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }
.paper-head span:first-child { font-weight: 600; color: var(--teal-deep); }
.paper-text { font: 400 clamp(1.35rem, 1.1rem + .9vw, 1.85rem)/1.4 var(--serif); white-space: pre-line; }
.paper .caret { display: inline-block; vertical-align: -.15em; margin-left: 2px; }

/* Il tasto da premere */
.key-wrap { position: relative; }
.key { border: 0; cursor: pointer; font: inherit; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: none; user-select: none; }
.key:hover { background: #FFF8E6; }
.burst { position: absolute; inset: 50% auto auto 50%; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -3px; top: -11px; width: 6px; height: 22px; border-radius: 3px; background: var(--teal); opacity: 0; transform: rotate(var(--a)) translateY(-92px) scaleY(.3); }
.burst i:nth-child(odd) { background: var(--yellow); }
.key-wrap.pressed .burst i { animation: burst .55s var(--ease); }
.key-wrap.idle .burst i { animation: hint 2.4s var(--ease) infinite; }
@keyframes burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-80px) scaleY(.3); } 35% { opacity: 1; transform: rotate(var(--a)) translateY(-98px) scaleY(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-118px) scaleY(.4); } }
@keyframes hint { 0%, 55%, 100% { opacity: 0; transform: rotate(var(--a)) translateY(-84px) scaleY(.3); } 70% { opacity: .9; transform: rotate(var(--a)) translateY(-96px) scaleY(.8); } 85% { opacity: 0; transform: rotate(var(--a)) translateY(-106px) scaleY(.4); } }
.sound-toggle { border: 0; background: none; font: 500 .82rem var(--sans); color: var(--ink-soft); cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.sound-toggle:hover { background: var(--cream-deep); color: var(--ink); }

/* Pillola */
.pill { --pill-bg: var(--ink); --pill-bar: var(--cream); --pill-dot: var(--yellow);
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: var(--pill-bg);
  box-shadow: 0 14px 30px -14px rgba(28, 27, 25, .55); transition: background-color .5s var(--ease); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pill-dot); transition: background-color .5s; }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--pill-bar); transform: scaleY(.3); transition: background-color .5s; }
@media (prefers-reduced-motion: no-preference) {
  .wave i { animation: bar 1.1s ease-in-out infinite; }
  .wave i:nth-child(2n) { animation-duration: .85s; } .wave i:nth-child(3n) { animation-duration: 1.35s; }
  .wave i:nth-child(1) { animation-delay: -.1s } .wave i:nth-child(2) { animation-delay: -.5s } .wave i:nth-child(3) { animation-delay: -.3s }
  .wave i:nth-child(4) { animation-delay: -.8s } .wave i:nth-child(5) { animation-delay: -.2s } .wave i:nth-child(6) { animation-delay: -.6s }
  .wave i:nth-child(7) { animation-delay: -.4s } .wave i:nth-child(8) { animation-delay: -.9s } .wave i:nth-child(9) { animation-delay: -.15s }
  .wave i:nth-child(10) { animation-delay: -.7s } .wave i:nth-child(11) { animation-delay: -.35s }
  .pill-dot { animation: pulse 1.6s ease-in-out infinite; }
}
.key-listen:not(.on) .wave i, .is-off .wave i, .is-off .pill-dot { animation-play-state: paused; }
@keyframes bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes pulse { 50% { opacity: .35; } }

/* Racconto a scorrimento */
.story { padding-top: clamp(88px, 12vw, 150px); }
.story .title { text-align: center; }
.story-track { margin-top: 64px; }
.story-grid { width: 100%; max-width: 1280px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 56px; align-items: center; }
.story-steps li { position: relative; padding: 12px 0 12px 20px; font: 400 1.5rem var(--serif); color: var(--ink-soft); cursor: pointer; transition: color .3s; }
.story-steps li::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--line); transition: background-color .3s; }
.story-steps li.is-on { color: var(--ink); }
.story-steps li.is-on::before { background: var(--yellow-soft); }

.window { position: relative; max-width: 700px; width: 100%; margin: 0 auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; background: var(--cream-deep); font-size: .82rem; color: var(--ink-soft); }
.win-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.win-bar b { font-weight: 500; margin-left: 10px; }
.win-body { min-height: 400px; padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 20px; font-size: 1.12rem; line-height: 1.4; }
.bubble-in { align-self: flex-start; background: var(--cream-deep); border-bottom-left-radius: 6px; }
.bubble-out { align-self: flex-end; background: var(--teal-deep); color: #fff; border-bottom-right-radius: 6px; }
.raw { font: italic 400 1.45rem/1.45 var(--serif); color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font: 500 .78rem var(--sans); }
.tags li { padding: 5px 10px; border-radius: 999px; background: var(--yellow-soft); color: var(--ink); }
.win-input { margin: 0 16px 16px; padding: 12px 16px; border-radius: 999px; background: var(--cream); display: flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: .95rem; }
.caret { width: 2px; height: 1.1em; background: var(--teal); }
.pill-win { position: absolute; right: 22px; bottom: 21px; padding: 8px 14px; transform: translateY(8px) scale(.9); opacity: 0; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.pill-win .wave { height: 18px; }
[data-show] { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.window[data-step="2"] .pill-win, .window[data-step="1"] .pill-win { opacity: 1; transform: none; }
.window[data-step="2"] [data-show="2"], .window[data-step="3"] [data-show="3"] { opacity: 1; transform: none; }
.window[data-step="3"] .win-placeholder::after { content: " — inviato"; }
.story-text { position: relative; min-height: 240px; }
.story-copy p { font-size: 1.05rem; }
.story-copy { position: absolute; inset: 0 0 auto; opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; }
.story-copy.is-on { opacity: 1; transform: none; pointer-events: auto; }
.story-copy h3 { font: 400 2.3rem/1.1 var(--serif); }
.story-steps li .bar-fill { position: absolute; left: 0; top: 10px; width: 3px; height: 0; border-radius: 2px; background: var(--teal); }
.story-steps li.is-on .bar-fill { animation: fill var(--step-ms, 3200ms) linear forwards; }
@keyframes fill { to { height: calc(100% - 20px); } }
.story-copy p { margin-top: 14px; color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: blink 1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes fill-x { to { width: 100%; } }

/* Prova */
.try .title, .try .wrap > .lead { text-align: center; margin-left: auto; margin-right: auto; }
.try-card { margin: 48px auto 0; max-width: 860px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px 20px; }
.try-label { font-size: .85rem; font-weight: 600; color: var(--teal-deep); }
.try-card textarea { display: block; width: 100%; margin-top: 8px; border: 0; resize: none; background: transparent; font: italic 400 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.35 var(--serif); color: var(--ink); field-sizing: content; min-height: 2.7em; }
.try-card textarea:focus { outline: none; }
.try-card:focus-within { box-shadow: var(--shadow), 0 0 0 3px var(--teal); }
.examples { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-soft); }
.examples button { font: 500 .9rem var(--sans); color: var(--ink); background: var(--cream); border: 0; border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: background-color .2s, transform .2s var(--ease); }
.examples button:hover { background: var(--yellow-soft); transform: translateY(-1px); }
.try-sub { margin: 40px auto 0; max-width: 860px; text-align: center; font: italic 400 1.3rem var(--serif); color: var(--ink-soft); }
.try-out { margin: 18px auto 0; max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.out-card { background: var(--paper); border-radius: var(--radius); padding: 24px 26px; }
.out-ai { background: var(--ink); color: var(--cream); }
.out-ai .out-label { color: var(--yellow); }
.out-ai ul { display: grid; gap: 6px; }
.out-ai li { padding-left: 18px; position: relative; }
.out-ai li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.out-bubble { margin-top: 14px; margin-left: auto; width: fit-content; font-size: 1.05rem; }
.app-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: .05em; }
.dot-wa { background: #25A366; } .dot-sl { background: #B04C8A; } .dot-ml { background: #3B82D6; } .dot-ai { background: var(--yellow); }
.out-label { font-size: .85rem; font-weight: 600; color: var(--teal-deep); }
.out-text { margin-top: 10px; font: 400 1.25rem/1.4 var(--serif); white-space: pre-line; }
.out-ai .out-text { white-space: normal; }
.flash { animation: flash .6s var(--ease); }
@keyframes flash { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sent { color: var(--ink-soft); font-weight: 500; }
.note { margin: 18px auto 0; max-width: 860px; font-size: .88rem; color: var(--ink-soft); text-align: center; }

/* Funzioni */
.features .title { text-align: center; }
.feat-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat { background: var(--paper); border-radius: var(--radius); padding: 18px 18px 26px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat-demo { min-height: 170px; padding: 18px; border-radius: var(--radius-s); background: var(--cream); display: flex; flex-direction: column; justify-content: center; gap: 8px; font-size: .92rem; }
.feat h3 { margin: 22px 8px 0; font: 400 1.6rem/1.15 var(--serif); }
.feat > p { margin: 10px 8px 0; color: var(--ink-soft); font-size: .98rem; }
.demo-sel { background: var(--yellow-soft); padding: 6px 10px; border-radius: 8px; align-self: flex-start; }
.demo-cmd { color: var(--teal-deep); font-weight: 600; }
.demo-res { font: 400 1.15rem/1.35 var(--serif); }
.demo-small { font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
.demo-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--paper); border-radius: 10px; }
.paused { color: var(--teal-deep); font-weight: 600; }
.sent-mark { margin-left: 6px; color: var(--ink-soft); font-weight: 500; }
.chips { flex-direction: row; flex-wrap: wrap; align-content: center; }
.chips span { padding: 7px 11px; border-radius: 999px; background: var(--paper); }
.chips .chip-new { background: var(--yellow-soft); }

/* Pillola personalizzabile */
.pill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.swatches { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 0; border-radius: 999px; background: var(--paper); font: 500 .95rem var(--sans); cursor: pointer; transition: box-shadow .2s, transform .2s var(--ease); }
.swatches button::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(28, 27, 25, .15); }
.swatches button:hover { transform: translateY(-1px); }
.swatches button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink); }
.pill-stage { aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--teal); display: grid; place-items: center; overflow: hidden; }
.pill-big { transform: scale(2.1); }

/* Prezzi */
.plans { margin: 56px auto 0; max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { background: var(--paper); border-radius: var(--radius); padding: 34px 30px; display: flex; flex-direction: column; transition: transform .35s var(--ease); }
.plan:hover { transform: translateY(-4px); }
.plan-main { background: var(--ink); color: var(--cream); }
.plan h3 { font: 400 1.8rem var(--serif); }
.price { font: 400 3.2rem/1 var(--serif); margin: 14px 0 18px; }
.price small { font: 400 1rem var(--sans); color: var(--ink-soft); }
.plan p:not(.price) { color: var(--ink-soft); }
.plan-main p:not(.price) { color: rgba(251, 245, 228, .78); }
.plan ul { margin: 22px 0 30px; flex: 1; display: grid; gap: 8px; align-content: start; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.plan-main li::before { border-color: var(--yellow); }
.plan .btn { align-self: flex-start; }
.plan-main .btn { background: var(--yellow); color: var(--ink); }
.plan-main .btn:hover { background: var(--paper); box-shadow: none; }
.badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 5px 10px; border-radius: 999px; background: var(--yellow-soft); font: 600 .72rem var(--sans); }

/* Privacy */
.privacy { margin: 0 var(--gutter); border-radius: 36px; background: var(--teal); color: var(--ink); padding: clamp(64px, 9vw, 110px) 0; }
.privacy .title em { color: var(--paper); }
.privacy-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.privacy-list { display: grid; gap: 14px; }
.privacy-list li { background: rgba(255, 253, 246, .92); border-radius: var(--radius-s); padding: 22px 24px; }
.privacy-list h3 { font: 400 1.45rem var(--serif); }
.privacy-list p { margin-top: 6px; color: var(--ink-soft); }

/* Domande */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; position: relative; padding: 22px 44px 22px 0; font: 400 1.35rem/1.3 var(--serif); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border-right: 2px solid var(--teal-deep); border-bottom: 2px solid var(--teal-deep); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list details p { padding: 0 44px 24px 0; color: var(--ink-soft); }
.faq-list details[open] p { animation: flash .5s var(--ease); }

/* Chiusura */
.close { margin: 0 var(--gutter); border-radius: 36px; background: var(--ink); color: var(--cream); padding: clamp(72px, 10vw, 130px) 0; text-align: center; overflow: hidden; }
.close .title em { color: var(--yellow); }
.close .lead { margin: 22px auto 0; color: rgba(251, 245, 228, .78); }
.pill-close { --pill-bg: var(--cream); --pill-bar: var(--ink); --pill-dot: var(--teal); margin-bottom: 36px; }
.beta-form { margin: 34px auto 0; max-width: 520px; display: flex; gap: 8px; padding: 6px; background: var(--cream); border-radius: 999px; }
.beta-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 18px; font: 1rem var(--sans); color: var(--ink); }
.beta-form input:focus { outline: none; }
.beta-form:focus-within { box-shadow: 0 0 0 3px var(--yellow); }
.beta-form .btn { background: var(--yellow); color: var(--ink); }
.beta-form .btn:hover { background: var(--teal); color: var(--paper); }
.form-msg { min-height: 1.6em; margin-top: 16px; font-weight: 600; }
.form-msg.is-error { color: var(--yellow); }
.form-legal { margin-top: 4px; font-size: .85rem; color: rgba(251, 245, 228, .7); }
.form-legal a { color: var(--cream); }
.inline-link { color: var(--teal-deep); font-weight: 600; text-decoration: none; white-space: nowrap; }
.inline-link:hover { text-decoration: underline; }

/* Footer */
.footer { padding: 56px 0 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .92rem; }
.footer-links a { text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.credits { margin-top: 32px; max-width: 90ch; font-size: .82rem; line-height: 1.55; color: var(--ink-soft); }
.legal { margin-top: 12px; font-size: .82rem; color: var(--ink-soft); }

/* Entrate */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--stagger, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .hero-inner > * { opacity: 0; transform: translateY(18px); animation: rise 1.1s var(--ease) forwards; }
  .js .hero-inner > :nth-child(2) { animation-delay: .12s; }
  .js .hero-inner > :nth-child(3) { animation-delay: .3s; }
  .js .hero-inner > :nth-child(4) { animation-delay: .42s; }
  .js .keydemo { opacity: 0; animation: rise 1.2s var(--ease) .55s forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Tablet */
@media (max-width: 960px) {
  .story-grid { grid-template-columns: 1fr; gap: 20px; }
  .story-steps { display: flex; justify-content: center; gap: 18px; }
  .story-steps li { padding: 6px 0 10px; font-size: 1.05rem; }
  .story-steps li::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 3px; }
  .story-text { min-height: 150px; text-align: center; }
  .story-copy h3 { font-size: 1.5rem; }
  .story-copy p { margin-top: 8px; font-size: .95rem; }
  .win-body { min-height: 300px; padding: 22px; }
  .story-steps li .bar-fill { top: auto; bottom: 0; width: 0; height: 3px; }
  .story-steps li.is-on .bar-fill { animation-name: fill-x; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .keydemo { grid-template-columns: 1fr; gap: 24px; }
  .key-side { justify-items: center; gap: 12px; }
  .pill-grid, .privacy-grid, .faq-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Telefono */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero h1 { font-size: clamp(2.6rem, 11.5vw, 3.4rem); }
  .win-body { padding: 16px; min-height: 250px; }
  .raw { font-size: 1.1rem; }
  .bubble { font-size: 1rem; }
  .story-steps li { font-size: 1.15rem; }
  .try-out, .feat-grid, .plans { grid-template-columns: 1fr; }
  .key { width: 96px; height: 96px; border-radius: 22px; }
  .burst { transform: scale(.75); }
  .key-sym { font-size: 2.5rem; }
  .key-said { min-height: 3em; font-size: 1.05rem; }
  .paper { padding: 18px 20px 26px; min-height: 200px; }
  .try-card { padding: 20px; }
  .pill-big { transform: scale(1.5); }
  .privacy, .close { margin: 0 8px; border-radius: 26px; }
  .beta-form { flex-direction: column; border-radius: 22px; }
  .beta-form input { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .burst { display: none; }
  html { scroll-behavior: auto; }
  .wave i { transform: scaleY(.6); }
}

/* ---------- Pagine legali ---------- */
.legal-wrap { max-width: 780px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: 72px; }
.draft-note { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--yellow-soft); font: 600 .78rem var(--sans); color: var(--ink); }
.legal-title { margin-top: 18px; font: 400 clamp(2.3rem, 1.6rem + 2.6vw, 3.6rem)/1.05 var(--serif); letter-spacing: -.015em; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.toc { margin: 32px 0 8px; padding: 20px 24px; border-radius: var(--radius-s); background: var(--paper); }
.toc-title { font: 600 .85rem var(--sans); color: var(--teal-deep); cursor: pointer; }
.toc details summary { list-style: none; }
.toc details summary::-webkit-details-marker { display: none; }
.toc details summary::after { content: " ▾"; }
.toc details:not([open]) summary::after { content: " ▸"; }
.toc-list { margin-top: 12px; padding-left: 0; counter-reset: none; display: grid; gap: 6px; font-size: .95rem; }
.toc-list ol { margin: 6px 0 4px 16px; display: grid; gap: 4px; font-size: .9rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--teal-deep); text-decoration: underline; }
.toc-chips ul { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.toc-chips a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); font-size: .9rem; }
.toc-chips a:hover { background: var(--yellow-soft); text-decoration: none; }

.legal-body { margin-top: 24px; font-size: 1.02rem; line-height: 1.7; }
.legal-body > * + * { margin-top: 16px; }
.legal-body h2 { margin-top: 48px; font: 400 clamp(1.6rem, 1.3rem + 1vw, 2.1rem)/1.15 var(--serif); scroll-margin-top: 90px; }
.legal-body h3 { margin-top: 32px; font: 500 1.3rem/1.25 var(--serif); scroll-margin-top: 90px; }
.legal-body ul, .legal-body ol { padding-left: 22px; list-style: revert; display: grid; gap: 6px; }
.legal-body ul ul { margin-top: 6px; }
.legal-body li::marker { color: var(--teal); }
.legal-body a { color: var(--teal-deep); text-underline-offset: .15em; overflow-wrap: anywhere; }
.legal-body code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--cream-deep); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.legal-body hr { border: 0; height: 1px; background: var(--line); margin: 40px 0; }
.legal-body blockquote { margin: 24px 0 0; padding: 16px 20px; border-radius: var(--radius-s); background: var(--cream-deep); font-size: .95rem; }
.legal-body blockquote p { margin: 0; }
.ph { background: var(--yellow-soft); border-radius: 4px; padding: 0 .2em; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-s); background: var(--paper); }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 12px 14px; }
.legal-body thead th { background: var(--cream-deep); font-weight: 600; }
.legal-body tbody tr + tr td { border-top: 1px solid var(--line); }
.back-top { margin-top: 48px; font-size: .9rem; }
.back-top a { color: var(--teal-deep); }

/* "I tuoi dati": schede leggibili */
.legal-plain .legal-body { font-size: 1.08rem; }
.legal-plain .gist { padding: 22px 24px; border-radius: var(--radius); background: var(--teal); color: var(--ink); font: 400 1.35rem/1.45 var(--serif); }
.legal-plain .gist strong { font-weight: 500; }
.data-card { margin-top: 18px; padding: 26px 28px; border-radius: var(--radius); background: var(--paper); }
.data-card h2 { margin-top: 0; font-size: 1.75rem; }
.data-card p { margin-top: 14px; }
.data-card .label { display: block; font: 600 .78rem var(--sans); letter-spacing: .02em; color: var(--teal-deep); margin-bottom: 2px; }

@media (max-width: 640px) {
  .legal-page .nav-links { display: none; }
  .toc { padding: 16px 18px; }
  .data-card { padding: 20px; }
  .legal-plain .gist { font-size: 1.2rem; padding: 18px 20px; }
  /* tabelle come schede impilate sul telefono */
  .legal-body table, .legal-body tbody, .legal-body tr, .legal-body td { display: block; }
  .legal-body thead { display: none; }
  .legal-body tbody tr + tr { border-top: 1px solid var(--line); }
  .legal-body tbody tr + tr td { border-top: 0; }
  .legal-body td { padding: 6px 14px; }
  .legal-body td:first-child { padding-top: 14px; font-weight: 600; }
  .legal-body td:last-child { padding-bottom: 14px; }
  .legal-body td:not(:first-child)::before { content: attr(data-label); display: block; font: 600 .75rem var(--sans); color: var(--ink-soft); }
}
