/* ============================================================================
   Vetrina di Master Chess (index.html) — ottobre 2026.

   Foglio a sé: masterchess-theme.css resta a privacy.html, che non cambia.
   Tema unico scuro, come l'identità del marchio (navy + blu del logo): le
   catture dell'app sono scure e una pagina chiara le farebbe sembrare ritagli.
   Colori come token qui sotto; nessun colore scritto a mano nelle regole.

   Sei blocchi: hero, il percorso (telefono fisso che cambia schermata),
   oltre l'analisi, scarica o apri, chi sono con i contatti, piede.
   ============================================================================ */

:root {
    --bg: #0a0f1d;
    --bg-2: #0d1426;
    --surface: #111a31;
    --elevated: #17213d;
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.24);
    --t1: #eef2f8;
    --t2: #a3aec2;
    --t3: #6f7b91;
    --accent: #3b82f6;
    --accent-hover: #2f6fe0;
    --accent-soft: rgba(59, 130, 246, 0.14);
    --accent-line: rgba(59, 130, 246, 0.38);
    --shadow: 0 30px 80px -20px rgba(3, 8, 24, 0.85), 0 10px 30px -10px rgba(16, 40, 96, 0.45);

    /* I colori dei giudizi, gli stessi dell'app */
    --q-best: #22c55e;
    --q-great: #4ade80;
    --q-good: #86efac;
    --q-book: #c08457;
    --q-inacc: #facc15;
    --q-mistake: #fb923c;
    --q-blunder: #ef4444;

    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 10px;

    /* Scala dei livelli: barra in alto e menu, finestra iOS sopra tutto */
    --z-nav: 40;
    --z-modal: 60;

    --nav-h: 68px;
    --font: 'Geist', 'Segoe UI', system-ui, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 8px);
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--t2);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3 {
    color: var(--t1);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 4.2vw, 3.25rem);
}

h3 {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    text-wrap: pretty;
}

strong {
    color: var(--t1);
    font-weight: 600;
}

.wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    z-index: var(--z-modal);
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── Pulsanti ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font: 600 15px/1 var(--font);
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease), color 0.25s var(--ease);
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-ghost {
    color: var(--t1);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.btn-sm {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.btn i {
    font-size: 0.95em;
}

/* Su Android il pulsante principale porta a Google Play (classe messa in testa alla pagina) */
.only-android,
.android .not-android {
    display: none;
}

.android .only-android {
    display: inline-flex;
}

.play-badge {
    display: inline-flex;
    line-height: 0;
    border-radius: 10px;
    transition: transform 0.2s var(--ease);
}

.play-badge:hover {
    transform: translateY(-1px);
}

/* ── Barra in alto ────────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    height: var(--nav-h);
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.scrolled {
    background: rgba(10, 15, 29, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

.nav .wrap {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--t1);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand img {
    width: 34px;
    height: 34px;
}

.nav-links {
    display: flex;
    gap: 26px;
    margin-left: auto;
}

.nav-links a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--t2);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--t1);
}

.nav-end {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
}

.lang button {
    border: 0;
    background: none;
    color: var(--t3);
    font: 700 12px/1 var(--font);
    letter-spacing: 0.04em;
    width: 36px;
    height: 28px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.lang button.active {
    background: var(--accent-soft);
    color: var(--t1);
}

.burger {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: none;
    color: var(--t1);
    font-size: 17px;
    cursor: pointer;
}

/* ── Telefono ─────────────────────────────────────────────────────────────── */

.phone {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 600 / 1300;
    padding: 9px;
    border-radius: 44px;
    background: linear-gradient(160deg, #1d2742, #070b16 60%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 35px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    padding: 40px 0 32px;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: calc(var(--nav-h) * -1) 0 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 55% 60% at 78% 40%, rgba(59, 130, 246, 0.18), transparent 70%),
        radial-gradient(ellipse 40% 50% at 10% 0%, rgba(59, 130, 246, 0.07), transparent 70%);
}

.hero .wrap {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
    min-height: min(680px, calc(100dvh - var(--nav-h) - 80px));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--t1);
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

.eyebrow i {
    color: var(--accent);
    font-size: 11px;
}

.hero h1 {
    margin: 22px 0 20px;
    font-size: clamp(2.6rem, 5.6vw, 4.6rem);
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    max-width: 34ch;
}

.hero-ctas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hero-visual {
    position: relative;
    height: 600px;
}

.hero-visual .phone {
    position: absolute;
    max-width: 268px;
}

.hero-visual .phone-front {
    right: 4%;
    top: 0;
    z-index: 2;
}

.hero-visual .phone-back {
    right: 46%;
    top: 70px;
    transform: rotate(-6deg);
    opacity: 0.92;
}

/* Le piattaforme, sotto l'hero */
.sources {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
}

.sources .wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
    padding-top: 20px;
    padding-bottom: 20px;
}

.sources span {
    font-size: 14px;
    color: var(--t3);
}

.sources a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--t1);
    font-weight: 600;
    font-size: 17px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.sources a:hover {
    opacity: 1;
}

.sources img {
    width: 26px;
    height: 26px;
}

/* ── Sezioni ──────────────────────────────────────────────────────────────── */

.section {
    padding: 96px 0;
}

.section+.section {
    padding-top: 24px;
}

.section-head {
    max-width: 640px;
    margin-bottom: 44px;
}

.section-head p {
    margin-top: 16px;
    font-size: 1.08rem;
    max-width: 52ch;
}

/* ── Il percorso: telefono fisso, passi che scorrono ──────────────────────── */

.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    position: relative;
}

/* La linea che lega i quattro passi */
.story-steps {
    position: relative;
    padding-left: 36px;
}

.story-steps::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 30vh;
    bottom: 30vh;
    width: 2px;
    background: linear-gradient(var(--line-strong), var(--line-strong)) no-repeat;
}

.step {
    position: relative;
    min-height: 56vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.5s var(--ease);
}

.step.active {
    opacity: 1;
}

.step::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line-strong);
    transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.step.active::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 6px var(--accent-soft);
}

.step-verb {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.step h3 {
    margin-top: 8px;
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.step p {
    margin-top: 16px;
    font-size: 1.08rem;
    max-width: 44ch;
}

.judgements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    max-width: 460px;
}

.judgements span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--t1);
    padding: 7px 12px 7px 10px;
    border-radius: 8px;
    background: var(--elevated);
}

.judgements span::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--c);
}

/* La schermata del passo: solo su telefono (su computer c'è quella fissa) */
.step-shot {
    display: none;
}

.story-stage {
    position: sticky;
    top: calc(var(--nav-h) + (100dvh - var(--nav-h) - 620px) / 2);
    height: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    isolation: isolate;
}

.story-stage::before {
    content: "";
    position: absolute;
    width: 460px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 65%);
    z-index: -1;
}

.story-stage .phone {
    max-width: 268px;
}

.story-stage .shot {
    position: absolute;
    inset: 9px;
    width: calc(100% - 18px);
    height: calc(100% - 18px);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.story-stage .shot.on {
    opacity: 1;
    transform: none;
}

.stage-dots {
    display: flex;
    gap: 8px;
}

.stage-dots i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--line-strong);
    transition: width 0.4s var(--ease), background-color 0.4s var(--ease);
}

.stage-dots i.on {
    width: 22px;
    background: var(--accent);
}

/* ── Oltre l'analisi: tessere ─────────────────────────────────────────────── */

.bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.tile {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.tile p {
    margin-top: 10px;
    font-size: 15.5px;
}

/* Testo a sinistra, schermata che esce dal fondo a destra */
.tile-shot {
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 24px;
    padding-bottom: 0;
    min-height: 330px;
}

.tile-shot:first-child {
    background:
        radial-gradient(ellipse 60% 70% at 90% 100%, rgba(59, 130, 246, 0.2), transparent 70%),
        var(--surface);
}

.tile-shot:nth-child(2) {
    background:
        radial-gradient(ellipse 60% 70% at 90% 100%, rgba(148, 163, 184, 0.13), transparent 70%),
        var(--surface);
}

.tile-shot .copy-in {
    padding-bottom: 32px;
}

.tile-crop {
    align-self: end;
    height: 290px;
    overflow: hidden;
    padding: 7px 7px 0;
    border-radius: 30px 30px 0 0;
    background: linear-gradient(160deg, #1d2742, #070b16 60%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 0;
    box-shadow: var(--shadow);
}

.tile-crop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 24px 24px 0 0;
}

/* Il motore: la scelta della forza sta nella metà bassa dello schermo */
.tile-crop.crop-bottom img {
    object-position: center 78%;
}

/* ── Scarica o apri: fascia ───────────────────────────────────────────────── */

.band {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse 60% 80% at 100% 100%, rgba(59, 130, 246, 0.22), transparent 70%),
        linear-gradient(180deg, var(--surface), var(--bg-2));
    padding: 56px 64px 0;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 48px;
}

.band>div:first-child {
    padding-bottom: 56px;
}

.where {
    margin-top: 30px;
}

.where li {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.where li>i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--elevated);
    color: var(--t1);
    font-size: 19px;
}

.where h3 {
    font-size: 1.08rem;
}

.where p {
    margin-top: 3px;
    font-size: 14.5px;
    max-width: 46ch;
}

.where .act {
    display: flex;
    gap: 10px;
    align-items: center;
}

.where .play-badge img {
    height: 48px;
    width: auto;
}

/* Il telefono del widget esce dal fondo della fascia */
.band>.phone {
    align-self: end;
    justify-self: center;
    max-width: 260px;
    aspect-ratio: 600 / 1000;
    padding-bottom: 0;
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.band>.phone img {
    object-position: top;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* ── Chi sono e contatti ──────────────────────────────────────────────────── */

.contact {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    align-items: center;
}

.person {
    display: flex;
    align-items: center;
    gap: 20px;
}

.person img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    object-position: top;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.person h2 {
    font-size: clamp(1.7rem, 2.8vw, 2.2rem);
}

.person span {
    display: block;
    margin-top: 6px;
    font-size: 15px;
}

.person-text {
    margin-top: 24px;
    font-size: 1.08rem;
    max-width: 48ch;
}

.contact-meta {
    margin-top: 26px;
    display: grid;
    gap: 12px;
}

.contact-meta a,
.contact-meta div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--t1);
    font-weight: 500;
}

.contact-meta a:hover {
    color: #fff;
}

.contact-meta i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--elevated);
    color: var(--t2);
    font-size: 14px;
}

.anchor {
    position: absolute;
    top: 0;
}

.form {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--t1);
}

.field input,
.field textarea {
    width: 100%;
    font: 400 15.5px/1.5 var(--font);
    color: var(--t1);
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form .btn {
    width: 100%;
    border-radius: var(--radius-sm);
}

#form-msg:empty {
    display: none;
}

#form-msg {
    font-size: 14.5px;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

#form-msg.ok {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #a7f3c0;
}

#form-msg.err {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.trap {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* ── Piede ────────────────────────────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--line);
    padding: 36px 0 44px;
    font-size: 14px;
}

.footer .wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px 40px;
    align-items: center;
}

.footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
}

.footer nav a:hover {
    color: var(--t1);
}

.footer .legal {
    grid-column: 1 / -1;
    color: var(--t3);
    font-size: 13px;
}

/* ── Finestra istruzioni iPhone ───────────────────────────────────────────── */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(5, 9, 20, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-box {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow);
}

.modal-box h3 {
    margin-bottom: 12px;
}

.modal-box ol {
    list-style: decimal;
    margin: 18px 0 24px 20px;
    display: grid;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 0;
    background: var(--elevated);
    color: var(--t2);
    font-size: 16px;
    cursor: pointer;
}

.modal-box .btn {
    width: 100%;
}

/* ── Comparsa allo scorrimento (solo se il sistema non chiede meno movimento) ── */

@media (prefers-reduced-motion: no-preference) {
    .js .rv {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
        transition-delay: calc(var(--i, 0) * 90ms);
    }

    .js .rv.in {
        opacity: 1;
        transform: none;
    }

    .hero-visual .phone-front {
        animation: rise 1s var(--ease) both;
    }

    .hero-visual .phone-back {
        animation: rise-back 1.1s 0.12s var(--ease) both;
    }

    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(40px);
        }
    }

    @keyframes rise-back {
        from {
            opacity: 0;
            transform: translateY(50px) rotate(-2deg);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .story-stage .shot,
    .step,
    .step::before,
    .stage-dots i {
        transition: none;
    }
}

/* ── Schermi medi ─────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
    .nav-links {
        gap: 18px;
    }

    .tile-shot {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .tile-shot .copy-in {
        padding-bottom: 0;
    }

    .tile-crop {
        width: 230px;
        justify-self: center;
        height: 240px;
    }

    .band {
        padding: 44px 44px 0;
    }
}

/* ── Telefono e tablet stretto ────────────────────────────────────────────── */

@media (max-width: 860px) {
    .nav .wrap {
        gap: 12px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 24px 18px;
        background: rgba(10, 15, 29, 0.97);
        border-bottom: 1px solid var(--line);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--line);
    }

    .nav-end {
        margin-left: auto;
    }

    .nav-end .btn {
        display: none;
    }

    .burger {
        display: grid;
        place-items: center;
    }

    .hero {
        padding-top: 28px;
    }

    .hero .wrap {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 44px;
    }

    .hero-visual {
        height: auto;
        display: flex;
        justify-content: center;
    }

    .hero-visual .phone-front {
        position: relative;
        right: auto;
        max-width: 250px;
    }

    .hero-visual .phone-back {
        display: none;
    }

    .section {
        padding: 72px 0;
    }

    .section+.section {
        padding-top: 8px;
    }

    .section-head {
        margin-bottom: 28px;
    }

    /* Il percorso diventa una fila di schede da scorrere di lato */
    .story {
        display: block;
    }

    .story-stage {
        display: none;
    }

    .story-steps {
        display: flex;
        gap: 14px;
        padding: 0 24px 6px;
        margin: 0 -24px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 24px;
        scrollbar-width: none;
    }

    .story-steps::-webkit-scrollbar {
        display: none;
    }

    .story-steps::before {
        display: none;
    }

    .step {
        flex: 0 0 82%;
        min-height: 0;
        opacity: 1;
        justify-content: flex-start;
        scroll-snap-align: start;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        padding: 24px 22px 0;
        overflow: hidden;
    }

    .step::before {
        display: none;
    }

    .step h3 {
        font-size: 1.45rem;
    }

    .step p {
        font-size: 15.5px;
        margin-top: 10px;
    }

    .judgements {
        gap: 6px;
        margin-top: 14px;
    }

    .judgements span {
        font-size: 12px;
        padding: 5px 9px 5px 8px;
    }

    /* Il telefono riempie la scheda fino al bordo in basso: le schede sono
       alte quanto la più lunga, e il telefono prende tutto lo spazio che resta */
    .step-shot {
        display: block;
        flex: 1 1 auto;
        width: 100%;
        max-width: 220px;
        min-height: 300px;
        aspect-ratio: auto;
        margin: 22px auto 0;
        padding-bottom: 0;
        border-bottom: 0;
        border-radius: 32px 32px 0 0;
    }

    .step-shot img {
        position: absolute;
        inset: 9px 9px 0;
        width: calc(100% - 18px);
        height: calc(100% - 9px);
        object-position: top;
        border-radius: 25px 25px 0 0;
    }

    .bento {
        grid-template-columns: 1fr;
    }

    .tile {
        padding: 26px 24px;
    }

    .tile-shot {
        padding-bottom: 0;
    }

    .band,
    .contact {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .band {
        padding: 34px 24px 0;
        border-radius: 22px;
    }

    .band>div:first-child {
        padding-bottom: 0;
    }

    .band>.phone {
        max-width: 220px;
    }

    .where li {
        grid-template-columns: 44px 1fr;
    }

    .where .act {
        grid-column: 2;
        flex-wrap: wrap;
    }

    .form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer .wrap {
        grid-template-columns: 1fr;
    }

    .footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .wrap {
        padding: 0 16px;
    }

    .story-steps {
        padding: 0 16px 6px;
        margin: 0 -16px;
        scroll-padding: 0 16px;
    }

    .person img {
        width: 80px;
        height: 80px;
    }

    .hero-ctas .btn {
        flex: 1 1 auto;
    }
}
