* { box-sizing: border-box; }
:root {
  --bg: #0f172a;
  --card: #1b2438;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --yellow: #ffd23f;
  --orange: #ff5a36;
  --green: #8fd06b;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
}

/* HERO */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 3.5rem 1.2rem 2rem;
  background: radial-gradient(circle at 50% 0%, #243252, var(--bg) 70%);
}
.kicker { margin: 0; letter-spacing: .3em; text-transform: uppercase; color: var(--yellow); font-weight: 700; font-size: .85rem; }
h1 { font-size: clamp(2.6rem, 11vw, 6.5rem); margin: .2em 0 .1em; line-height: 1; letter-spacing: -.02em; }
h1 span { color: var(--orange); font-style: italic; display: inline-block; transform: skew(-8deg); }
.hero.turbo h1 span { animation: shake .12s infinite; }
.sub { color: var(--muted); max-width: 32rem; margin: 0 auto 1rem; font-size: 1.1rem; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }

.snail { width: min(420px, 85vw); height: auto; margin: 1rem auto 0; display: block; --speed: 0; position: relative; z-index: 1; }
.snail-body { animation: bob calc(1.6s - var(--speed) * .012s) ease-in-out infinite; transform-origin: center; }
.trail { fill: none; stroke: #bfe8ff; stroke-width: 5; stroke-linecap: round; opacity: .35; }

.lines { position: absolute; inset: 0; opacity: 0; pointer-events: none; --dur: 1.4s; }
.lines i {
  position: absolute; left: -30%; height: 3px; width: 30%;
  background: linear-gradient(90deg, transparent, #ffffffaa);
  animation: zoom var(--dur) linear infinite;
}
.lines i:nth-child(1) { top: 22%; animation-delay: 0s; }
.lines i:nth-child(2) { top: 40%; animation-delay: .3s; width: 45%; }
.lines i:nth-child(3) { top: 58%; animation-delay: .1s; }
.lines i:nth-child(4) { top: 72%; animation-delay: .5s; width: 38%; }
.lines i:nth-child(5) { top: 85%; animation-delay: .2s; }

/* CONTENUTO */
main { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; display: grid; gap: 1.5rem; }
.card { background: var(--card); border-radius: 22px; padding: 1.6rem; border: 1px solid #2b3752; box-shadow: 0 10px 30px #0006; }
.label { margin: 0 0 .3rem; text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; color: var(--yellow); font-weight: 700; }
h2 { margin: 0 0 .6rem; font-size: 1.8rem; }
.dict h2 { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 2.2rem; margin-bottom: 0; }
.pron { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.dict ol { margin: 0; padding-left: 1.3rem; }
.dict li { margin-bottom: .6rem; }
.dict em { color: var(--green); }
.src { color: var(--muted); font-size: .8rem; margin: 1rem 0 0; }

/* manetta interattiva */
.gauge-wrap { text-align: center; }
.gauge { width: min(320px, 90%); }
#needle { transition: transform .2s ease-out; }
#arc { transition: stroke-dashoffset .2s ease-out; }
.verdict { font-size: 1.25rem; font-weight: 700; color: var(--yellow); min-height: 2.6em; margin: .2rem 0 .8rem; }
.slider { display: flex; align-items: center; gap: 1rem; }
.slider span { font-weight: 700; }
input[type=range] { flex: 1; accent-color: var(--orange); height: 2.2rem; }

/* origine */
.origin-grid { display: grid; gap: 1.2rem; align-items: center; }
.origin-grid svg { width: 220px; max-width: 100%; margin: 0 auto; }
.origin-grid p { margin: 0; }
@media (min-width: 640px) { .origin-grid { grid-template-columns: 220px 1fr; } }

/* esempi */
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.ex { background: var(--card); border: 1px solid #2b3752; border-radius: 18px; padding: 1.1rem; text-align: center; transition: transform .2s; }
.ex:hover { transform: translateY(-4px) rotate(-1.5deg); }
.ex span { font-size: 2.4rem; display: block; }
.ex b { display: block; margin: .2rem 0; }
.ex em { color: var(--muted); font-size: .9rem; }

.note p { margin: 0 0 .6rem; }
.small { color: var(--muted); font-size: .9rem; }

footer { text-align: center; padding: 1.5rem 1rem 2.5rem; color: var(--muted); font-size: .85rem; }

/* animazioni */
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-1deg); } }
@keyframes zoom { from { transform: translateX(0); } to { transform: translateX(480%); } }
@keyframes shake { 0% { transform: skew(-8deg) translate(1px, 0); } 50% { transform: skew(-8deg) translate(-2px, 1px); } 100% { transform: skew(-8deg) translate(1px, -1px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .snail-body, .lines i, .hero.turbo h1 span { animation: none; }
  #needle, #arc { transition: none; }
}
