/* EasyMap — sito web
   Stesso mondo visivo dell'app (vedi DESIGN.md): nero OLED, campiture piene
   nei colori delle mascotte, fogli arrotondati, tab bar "glass" flottante. */

:root {
    /* palette dell'app */
    --blue: #007AFF;
    --lime: #E6FF27;
    --red: #FF0000;
    --cyan: #1BE7FF;
    --orange: #F86624;

    /* superfici (dark mode dell'app) */
    --black: #000;
    --surface: #1C1C22;
    --raised: #27272F;
    --text: #fff;
    --text-2: #A0A0AC;
    --line: rgba(255, 255, 255, .12);

    /* superfici (light mode dell'app) */
    --paper: #F4F4F6;
    --card: #fff;
    --ink: #131318;
    --ink-2: #5E5E6B;
    --line-ink: rgba(0, 0, 0, .09);

    --r-sm: 10px;
    --r-lg: 20px;
    --r-xl: 32px;
    --pill: 999px;

    --display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --gutter: clamp(16px, 4vw, 40px);
    --wrap: 1200px;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);

    /* compatibilità con gli script in pagina */
    --bg: #000;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    background: var(--black);
    scrollbar-color: var(--raised) var(--black);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--black);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--lime);
    color: #000;
}

img,
video {
    max-width: 100%;
}

a {
    color: inherit;
    text-underline-offset: .18em;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

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

.on-light :focus-visible,
.sheet--lime :focus-visible {
    outline-color: var(--blue);
}

h1,
h2,
.display {
    font-family: var(--display);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.03em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
}

h1 em,
h2 em {
    font-style: normal;
    color: var(--lime);
}

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* etichetta: come i cartellini degli edifici sulla mappa dell'app */
.section-label,
.hero-label,
.team-role,
.st-chapter-num,
.prose-header .label,
.part-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    padding: .28rem .65rem;
    border-radius: 8px;
    border: 2px solid var(--tag, var(--blue));
    background: #fff;
    color: var(--ink);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.3;
}

.section-label {
    margin-bottom: 1.25rem;
}

/* comparsa allo scorrimento: il contenuto è visibile anche senza script */
.js .fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.js .fade-up.visible {
    opacity: 1;
    transform: none;
}

/* ---------- NAV: la tab bar flottante dell'app ---------- */
nav,
.app-header {
    position: fixed;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 200;
    max-width: 1180px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 60px;
    padding: 0 10px 0 16px;
    border-radius: var(--pill);
    background: rgba(22, 22, 27, .62);
    border: 1px solid var(--line);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: block;
}

.nav-links {
    display: flex;
    gap: .25rem;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: .5rem .9rem;
    border-radius: var(--pill);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-2);
    transition: color .2s, background .2s;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.nav-links a[aria-current="page"] {
    color: var(--blue);
}

.nav-store-btns {
    display: flex;
    gap: .4rem;
}

/* pulsante del menu: solo su telefono */
.nav-toggle {
    display: none;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .3s var(--ease);
}

nav.is-open .nav-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
}

nav.is-open .nav-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

.nav-store-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 40px;
    padding: 0 1rem;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}

.nav-store-btn img {
    height: 15px;
    width: auto !important;
}

.nav-store-btn:hover {
    background: rgba(255, 255, 255, .2);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
    background: var(--black);
}

.hero-video,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video {
    object-fit: cover;
    object-position: 60% 50%;
    background: #000 url("/video/hero-poster.jpg") center / cover no-repeat;
    pointer-events: none;
    /* è uno sfondo: un tocco non deve far comparire i controlli */
}

/* su iPhone (soprattutto nei browser di WhatsApp, Instagram...) nasconde i controlli del player */
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-play-button,
.hero-video::-webkit-media-controls-start-playback-button,
.hero-video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0 !important;
}

/* se il telefono blocca l'autoplay (es. risparmio energetico) resta l'immagine fissa */
.hero.no-video .hero-video {
    display: none;
}

/* scurisce a sinistra per il testo e sfuma in basso verso la pagina */
.hero-shade {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .4) 38%, rgba(0, 0, 0, 0) 64%),
        linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .55) 22%, rgba(0, 0, 0, 0) 48%);
}

.hero-inner {
    width: 100%;
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 7.5rem var(--gutter) 4.5rem;
}

.hero-label {
    border: 1px solid var(--line);
    border-radius: var(--pill);
    padding: .4rem .85rem;
    background: rgba(22, 22, 27, .62);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.4rem;
}

.hero-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
}

.hero-text {
    max-width: 640px;
}

.hero h1 {
    font-size: clamp(3rem, 8.4vw, 5.5rem);
    line-height: 1;
    margin-bottom: 1.4rem;
    text-shadow: 0 4px 40px rgba(0, 0, 0, .55);
}

.hero-lead {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: .8rem;
}

.hero-sub {
    max-width: 52ch;
    color: #D9D9E0;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    margin-bottom: 2rem;
}

.hero-chips li {
    padding: .4rem .85rem;
    border-radius: var(--pill);
    border: 1px solid var(--line);
    background: rgba(22, 22, 27, .62);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

.hero-actions,
.story-next {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.btn-main,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 50px;
    border-radius: var(--pill);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background .2s, color .2s, opacity .2s;
}

.btn-main {
    padding: 0 1.6rem;
    background: #fff;
    color: #000;
}

.btn-main:hover {
    background: var(--lime);
}

.btn-ghost {
    padding: 0 .9rem;
    color: #fff;
}

.btn-ghost:hover {
    color: var(--lime);
}

.btn-main:active,
.btn-ghost:active {
    opacity: .75;
}

/* ---------- NUMERI: una riga asciutta sul nero, senza blocchi ---------- */
.strip {
    position: relative;
    background: var(--black);
}

.strip-inner {
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin-inline: auto;
    padding: 1rem var(--gutter) 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strip-item {
    padding: .25rem clamp(1rem, 3vw, 2.5rem);
    border-left: 1px solid var(--line);
    text-align: center;
}

.strip-item:first-child {
    border-left: 0;
}

.strip-num {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.6rem, 6vw, 4.25rem);
    line-height: 1;
    letter-spacing: -.04em;
    color: #fff;
    margin-bottom: .5rem;
}

.strip-label {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-2);
    max-width: 22ch;
    margin-inline: auto;
}

/* ---------- FOGLI: ogni sezione è un foglio che sale sopra la precedente ---------- */
.section,
.reviews-section,
.download-section {
    position: relative;
    padding-block: clamp(5rem, 10vw, 8.5rem);
}

.section > *,
.reviews-inner,
.download-inner {
    max-width: var(--wrap);
    margin-inline: auto;
}

.section,
.reviews-inner,
.download-inner {
    padding-inline: var(--gutter);
}

.section > :not(.section-label):not(.story-back) {
    width: 100%;
}

.section > .section-label,
.section > .story-back {
    display: flex;
    margin-left: max(0px, (100% - var(--wrap)) / 2);
}

.divider {
    display: none;
}

.sheet {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    margin-top: calc(var(--r-xl) * -1);
    padding-bottom: calc(clamp(5rem, 10vw, 8.5rem) + var(--r-xl));
}

/* ---------- FUNZIONALITÀ (foglio chiaro, light mode dell'app) ---------- */
.feat {
    margin-top: clamp(3.5rem, 7vw, 5.5rem);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    background: var(--paper);
    color: var(--ink);
    padding-bottom: calc(clamp(5rem, 10vw, 8.5rem) + var(--r-xl));
}

.feat h2 em {
    color: var(--blue);
}

.feat-head {
    margin-bottom: 2.25rem;
}

.feat-intro {
    margin-top: 1.1rem;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink-2);
}

.feat-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.feat-rail button {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    height: 48px;
    padding: 0 1.05rem 0 .4rem;
    border-radius: var(--pill);
    background: var(--card);
    border: 1px solid var(--line-ink);
    color: var(--ink);
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .3s var(--spring), background .2s, color .2s;
}

.feat-rail button img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c);
    display: block;
}

.feat-rail button:hover {
    transform: translateY(-2px);
}

.feat-rail button:hover img {
    animation: wiggle .5s var(--ease);
}

.feat-rail button[aria-selected="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

@keyframes wiggle {
    30% { transform: rotate(-12deg) scale(1.1); }
    65% { transform: rotate(9deg) scale(1.1); }
}

.feat-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: var(--card);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: 0 1px 0 var(--line-ink), 0 30px 60px -30px rgba(19, 19, 24, .25);
}

.feat-stage {
    position: relative;
    min-height: 640px;
    background: var(--c, var(--blue));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2.5rem 9% 2.5rem 0;
    transition: background .5s var(--ease);
}

.feat-mascot {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64%;
    aspect-ratio: 1;
    display: block;
}

.iphone {
    position: relative;
    width: min(270px, 62%);
    padding: 9px;
    border-radius: 46px;
    background: #0B0B0F;
    box-shadow: 0 0 0 1.5px #3A3A44, 0 30px 50px -18px rgba(0, 0, 0, .55);
}

.iphone-screen {
    aspect-ratio: 600 / 1304;
    border-radius: 38px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.iphone-screen img,
.iphone-screen video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.iphone-shots img {
    opacity: 0;
    transition: opacity .6s;
}

.iphone-shots img.is-active {
    opacity: 1;
}

.iphone-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.iphone-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
}

.iphone-dots i.is-active {
    background: #fff;
}

.iphone-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: .5rem;
    text-align: center;
    color: #fff;
    padding: 1rem;
}

.iphone-placeholder img {
    position: static;
    width: 96px;
    height: 96px;
}

.iphone-placeholder span {
    color: var(--text-2);
    font-size: .85rem;
}

.iphone-island {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 30%;
    height: 22px;
    transform: translateX(-50%);
    border-radius: var(--pill);
    background: #000;
}

.iphone-btn {
    display: none;
}

.feat-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(1.75rem, 4vw, 3.5rem);
}

.feat-count {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1rem;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    margin-bottom: 1rem;
}

.feat-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1;
    letter-spacing: -.03em;
    text-wrap: balance;
    margin-bottom: 1rem;
}

.feat-lead {
    font-size: 1.12rem;
    color: var(--ink-2);
    max-width: 46ch;
    margin-bottom: 1.6rem;
}

.feat-points {
    list-style: none;
    display: grid;
    gap: .7rem;
    margin-bottom: 2rem;
}

.feat-points li {
    position: relative;
    padding-left: 2.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.feat-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .05em;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 62% no-repeat;
}

.feat-nav {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.feat-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 54px;
    padding: 0 1.1rem;
    border-radius: var(--r-lg);
    background: var(--paper);
    font-weight: 700;
    font-size: .9rem;
    text-align: left;
    transition: background .2s, transform .3s var(--spring);
}

.feat-nav-btn--next {
    justify-content: flex-end;
    text-align: right;
    background: var(--ink);
    color: #fff;
}

.feat-nav-btn:hover {
    transform: translateY(-2px);
}

.feat-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* cambio funzionalità: la mascotte salta su, il telefono e il testo entrano */
.feat-panel.is-in .feat-mascot {
    animation: pop-up .7s var(--spring) both;
}

.feat-panel.is-in .iphone {
    animation: rise .6s var(--ease) both;
}

.feat-panel.is-in .feat-text > * {
    animation: rise .55s var(--ease) both;
}

.feat-panel.is-in .feat-text > :nth-child(2) { animation-delay: .04s; }
.feat-panel.is-in .feat-text > :nth-child(3) { animation-delay: .08s; }
.feat-panel.is-in .feat-text > :nth-child(4) { animation-delay: .12s; }

@keyframes pop-up {
    from { transform: translateY(70%); }
}

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

/* ---------- TEAM: ogni scheda è il corpo di una mascotte ---------- */
#team {
    background: var(--black);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 3rem;
    align-items: stretch;
}

.team-card {
    display: flex;
    flex-direction: column;
    color: var(--on, #000);
}

.team-info {
    position: relative;
    flex: 1;
    padding: 1.8rem 1.6rem 1.9rem;
    background: var(--c);
    border-radius: var(--r-xl);
}

.team-info h3 {
    font-family: var(--display);
    font-weight: 800;
    font-size: 2.1rem;
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: .7rem;
}

.team-role {
    --tag: #000;
    margin-bottom: 1rem;
}

.team-info p {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
}

.team-info strong {
    font-weight: 800;
}

/* ---------- RECENSIONI (foglio lime) ---------- */
.reviews-section {
    background: var(--lime);
    color: #000;
    overflow: hidden;
}

.reviews-section .section-label {
    --tag: #000;
}

.reviews-section h2 em {
    color: var(--blue);
}

.reviews-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.reviews-score {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.score-num {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(5rem, 11vw, 6rem);
    line-height: .8;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.stars,
.r-stars {
    letter-spacing: .12em;
}

.stars {
    font-size: 1.4rem;
    line-height: 1;
}

.score-count {
    font-weight: 700;
    font-size: .95rem;
}

.reviews-marquee {
    margin-inline: calc(var(--gutter) * -1);
    overflow: hidden;
}

.reviews-track {
    display: flex;
    column-gap: 12px;
    width: max-content;
}

.review-card {
    flex: none;
    will-change: transform;
    width: min(400px, 82vw);
    padding: 1.5rem 1.6rem 1.7rem;
    border-radius: var(--r-xl);
    background: #000;
    color: #fff;
}

.review-top {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}

.r-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-weight: 800;
    font-size: .9rem;
}

.r-name {
    font-weight: 800;
    line-height: 1.2;
}

.r-dept {
    font-size: .85rem;
    color: var(--text-2);
}

.r-stars {
    color: var(--lime);
    margin-bottom: .7rem;
}

.review-card p {
    font-size: 1rem;
    line-height: 1.55;
    color: #E4E4EA;
}

.reviews-controls {
    display: flex;
    gap: 10px;
    margin-top: 1.75rem;
}

.reviews-btn {
    position: relative;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    height: 60px;
    padding: 0 1.3rem 0 6px;
    border-radius: var(--pill);
    background: #000;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    transition: transform .3s var(--spring);
}

.reviews-btn--prev {
    flex-direction: row-reverse;
    padding: 0 6px 0 1.3rem;
}

.reviews-btn img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--c);
    display: block;
}

.reviews-btn:hover {
    transform: scale(1.06);
}

.reviews-btn:hover img {
    animation: wiggle .5s var(--ease);
}

.reviews-btn:active {
    transform: scale(.95);
}

/* ---------- DOWNLOAD (foglio blu, con la folla di mascotte) ---------- */
.download-section {
    background: var(--blue);
    color: #fff;
    padding-bottom: 0;
    overflow: hidden;
}

.download-section .section-label {
    --tag: #000;
}

.download-section h2 {
    font-size: clamp(3rem, 9vw, 6rem);
    line-height: .92;
    margin-bottom: 1.5rem;
}

.download-inner > p:not(.download-disclaimer) {
    max-width: 44ch;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 2.2rem;
}

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: .9rem;
    min-height: 68px;
    padding: 0 1.8rem 0 1.5rem;
    border-radius: var(--r-lg);
    background: #000;
    color: #fff;
    text-decoration: none;
    transition: transform .3s var(--spring);
}

.store-btn:hover {
    transform: translateY(-4px) scale(1.02);
}

.store-btn:active {
    transform: scale(.97);
}

.store-sub {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-2);
    line-height: 1.2;
}

.store-name {
    display: block;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.download-disclaimer {
    max-width: 64ch;
    padding: 1rem 1.2rem;
    border-radius: var(--r-lg);
    background: rgba(0, 0, 0, .3);
    font-size: .88rem;
    line-height: 1.55;
    color: #fff;
}

.download-disclaimer a {
    font-weight: 700;
}

.crowd {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin-top: clamp(3rem, 7vw, 5rem);
    max-width: none;
}

.crowd img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / .82;
    object-fit: cover;
    object-position: top;
    transform-origin: bottom;
    transition: transform .45s var(--spring);
}

.crowd img:hover {
    transform: scaleY(1.12);
}

.js .crowd img {
    transform: translateY(100%);
}

.js .crowd.visible img {
    transform: none;
    transition: transform .8s var(--spring);
    transition-delay: calc(var(--i) * 70ms);
}

.js .crowd.visible img:hover {
    transform: scaleY(1.12);
    transition-delay: 0s;
    transition-duration: .45s;
}

/* ---------- FOOTER ---------- */
footer {
    position: relative;
    background: var(--black);
    color: var(--text-2);
    padding: 4rem var(--gutter) 2rem;
}

.footer-inner {
    max-width: var(--wrap);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 2.5rem;
}

.footer-brand .logo {
    font-size: 1.6rem;
}

.footer-brand p {
    margin-top: .6rem !important;
    font-size: .92rem;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: .55rem;
    font-size: .95rem;
}

.footer-links h4 {
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    margin-bottom: .3rem;
}

.footer-links a {
    text-decoration: none;
    transition: color .2s;
    overflow-wrap: anywhere;
}

.footer-links a:hover {
    color: #fff;
}

.footer-ig {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.footer-bottom {
    max-width: var(--wrap);
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: .85rem;
}

/* =====================================================
   /storia
   ===================================================== */
.story-page {
    padding-top: 8.5rem;
}

.story-back,
.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-2);
    text-decoration: none;
    transition: color .2s;
}

.story-back:hover {
    color: #fff;
}

.st-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

.st-title {
    font-size: clamp(2.8rem, 6.4vw, 5.25rem);
    line-height: .94;
    margin-bottom: 1.5rem;
}

.st-intro {
    max-width: 44ch;
    font-size: 1.2rem;
    font-weight: 500;
    color: #D9D9E0;
}

.st-mac-wrap {
    position: relative;
    padding-top: 22%;
}

/* le tre mascotte sbucano da dietro la cornice */
.st-peek {
    position: absolute;
    top: 0;
    left: 6%;
    right: 6%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.st-peek img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / .8;
    object-fit: cover;
    object-position: top;
    animation: peek 4.5s var(--ease) var(--d, 0s) infinite alternate;
}

@keyframes peek {
    0%, 55% { transform: translateY(12%); }
    100% { transform: translateY(0); }
}

.ipad {
    position: relative;
    padding: 12px;
    border-radius: 34px;
    background: var(--surface);
    box-shadow: 0 0 0 1.5px #3A3A44, 0 40px 70px -30px rgba(0, 0, 0, .8);
}

.ipad-btn {
    display: none;
}

.ipad-screen {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 23px;
    overflow: hidden;
    background: #000;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

.ipad-screen.is-dragging {
    cursor: grabbing;
}

.ipad-track {
    display: flex;
    height: 100%;
    transition: transform .6s var(--ease);
}

.ipad-screen.is-dragging .ipad-track {
    transition: none;
}

.ipad-slide {
    position: relative;
    flex: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ipad-slide .bg {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(.55);
}

.ipad-slide img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.ipad-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    border-radius: 50%;
    background: rgba(22, 22, 27, .62);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    font-size: 1.15rem;
    transition: transform .3s var(--spring);
}

.ipad-arrow--prev { left: 12px; }
.ipad-arrow--next { right: 12px; }

.ipad-arrow:hover {
    transform: scale(1.1);
}

.st-mac-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: .75rem;
}

.st-mac-dots button {
    position: relative;
    width: 28px;
    height: 28px;
}

.st-mac-dots button::before {
    content: "";
    position: absolute;
    inset: 10px 6px;
    border-radius: var(--pill);
    background: var(--raised);
    transition: background .2s, inset .3s var(--ease);
}

.st-mac-dots button[aria-current="true"]::before {
    inset: 10px 0;
    background: var(--lime);
}

.st-chapters {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.st-chapter {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.6rem;
    border-radius: var(--r-xl);
    background: var(--surface);
}

.st-chapter-icon {
    flex: none;
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: var(--c);
    display: block;
}

.st-chapter-num {
    --tag: var(--c);
    margin-bottom: 1rem;
}

.st-chapter p {
    max-width: 68ch;
    color: #D9D9E0;
}

.st-chapter p + p {
    margin-top: 1rem;
}

.st-chapter strong {
    color: #fff;
    font-weight: 800;
}

.story-next {
    margin-top: 3.5rem;
}

/* =====================================================
   /privacy (pagina di lettura: light mode dell'app)
   ===================================================== */
.on-light {
    background: var(--paper);
    color: var(--ink);
}

.page-wrap {
    max-width: calc(1120px + var(--gutter) * 2);
    margin-inline: auto;
    padding: 8.5rem var(--gutter) 6rem;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.toc {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 1.1rem;
    border-radius: var(--r-lg);
    background: var(--card);
    border: 1px solid var(--line-ink);
}

.toc-label {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin: .2rem .6rem .5rem;
}

.toc ul + .toc-label {
    margin-top: 1.1rem;
}

.toc ul {
    list-style: none;
}

.toc a {
    display: block;
    padding: .42rem .6rem;
    border-radius: var(--r-sm);
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
    transition: background .2s, color .2s;
}

.toc a:hover {
    color: var(--ink);
    background: var(--paper);
}

.toc a.active {
    color: #fff;
    background: var(--blue);
}

.prose {
    min-width: 0;
    max-width: 72ch;
}

.back-link {
    color: var(--ink-2);
}

.back-link:hover {
    color: var(--ink);
}

.prose-header {
    margin-bottom: 2.25rem;
}

.prose-header .label {
    margin-bottom: 1.1rem;
}

.prose-header h1 {
    font-size: clamp(2.5rem, 5.6vw, 4.25rem);
    margin-bottom: 1rem;
}

.last-update {
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-2);
}

.alert {
    padding: 1.6rem 1.7rem;
    border-radius: var(--r-xl);
    background: var(--lime);
    color: #000;
    margin-bottom: 3rem;
}

.alert > strong {
    display: block;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.alert ul {
    display: grid;
    gap: .6rem;
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.prose-section {
    padding-top: 2.75rem;
    margin-top: 2.75rem;
    border-top: 1px solid var(--line-ink);
}

.part-label {
    margin-bottom: 1rem;
}

.prose h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.prose h3 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 1.9rem 0 .6rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose-section ul,
.prose-section ol {
    display: grid;
    gap: .45rem;
    padding-left: 1.3rem;
    margin-bottom: 1.1rem;
}

.prose-section li::marker {
    color: var(--blue);
}

.prose a {
    color: #0062CC;
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
    margin: 1.25rem 0 1.5rem;
    border-radius: var(--r-lg);
    background: var(--card);
    border: 1px solid var(--line-ink);
}

.table-wrap table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .94rem;
    font-variant-numeric: tabular-nums;
}

.table-wrap th,
.table-wrap td {
    padding: .8rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line-ink);
}

.table-wrap th {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-2);
    background: var(--paper);
}

.table-wrap tr:last-child td {
    border-bottom: 0;
}

.contact-box {
    padding: 1.7rem;
    border-radius: var(--r-xl);
    background: var(--ink);
    color: #fff;
    margin-top: 1.5rem;
}

.contact-box h3 {
    font-family: var(--display);
    font-size: 1.7rem;
    letter-spacing: -.02em;
    margin: 0 0 .5rem;
}

.contact-box a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 1.2rem;
    border-radius: var(--pill);
    background: var(--lime);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    overflow-wrap: anywhere;
}

/* =====================================================
   /app (pagina di passaggio verso lo store)
   ===================================================== */
.app-page {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--blue);
}

.app-header .header-link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 1rem;
    border-radius: var(--pill);
    background: var(--raised);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.app-page main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7.5rem var(--gutter) 0;
}

.app-content {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
}

.app-avatar img {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .45);
}

.app-page .section-label {
    --tag: #000;
}

.app-page h1 {
    font-size: clamp(4rem, 14vw, 6rem);
    line-height: .88;
    margin-bottom: 1.25rem;
}

.app-desc {
    max-width: 46ch;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.btn-wrap {
    margin-bottom: 1rem;
}

.alt-store-wrap {
    font-size: 1.2rem;
    font-weight: 700;
}

.alt-store-wrap a {
    font-weight: 800;
}

.app-page .crowd {
    margin-top: 3rem;
}

.app-page footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    padding: 1.5rem var(--gutter);
    font-size: .88rem;
}

.app-page footer a {
    color: #fff;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 980px) {
    .feat-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .feat-stage {
        min-height: 0;
        justify-content: center;
        padding: 2rem 0 2rem 30%;
    }

    .feat-mascot {
        width: min(58%, 340px);
    }

    .iphone {
        width: min(230px, 58vw);
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

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

    .st-hero,
    .page-wrap {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
        max-height: none;
    }

    .toc ul {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
    }
}

@media (max-width: 820px) {
    nav {
        gap: .4rem;
    }

    .nav-store-btns {
        margin-left: auto;
    }

    .nav-toggle {
        display: flex;
    }

    /* l'elenco delle sezioni si apre sotto la barra */
    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 2px;
        padding: 8px;
        border-radius: 26px;
        background: rgba(22, 22, 27, .97);
        border: 1px solid var(--line);
        box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
    }

    nav.is-open .nav-links {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .nav-links a {
        padding: .85rem 1rem;
        border-radius: 18px;
        font-size: 1.05rem;
        color: #fff;
    }

    .strip-inner {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .strip-item {
        padding: 1.1rem 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .strip-item:first-child {
        border-top: 0;
    }

    .feat-rail {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-inline: calc(var(--gutter) * -1);
        padding: 4px var(--gutter);
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .feat-rail::-webkit-scrollbar {
        display: none;
    }

    .feat-rail button {
        flex: none;
        scroll-snap-align: center;
    }

    .crowd {
        grid-template-columns: repeat(3, 1fr);
    }

    .crowd img:nth-child(n + 4) {
        display: none;
    }

    .st-chapters {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 560px) {
    body {
        font-size: 1rem;
    }

    nav,
    .app-header {
        top: 10px;
        left: 10px;
        right: 10px;
        height: 56px;
        padding: 0 8px 0 10px;
    }

    .logo-text {
        display: none;
    }

    .nav-store-btn {
        padding: 0 .8rem;
        font-size: .8rem;
    }

    .feat-text {
        padding: 1.5rem 1.25rem;
    }

    .feat-nav-btn {
        font-size: .85rem;
    }

    .hero-inner {
        padding-bottom: 2.5rem;
    }

    .hero-shade {
        background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .82) 38%, rgba(0, 0, 0, .25) 72%, rgba(0, 0, 0, .35) 100%);
    }

    .feat-nav-btn {
        padding: 0 .9rem;
    }

    .store-btn {
        flex: 1 1 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .reviews-score {
        gap: .75rem;
    }

    .reviews-controls {
        justify-content: center;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .js .fade-up,
    .js .crowd img {
        opacity: 1;
        transform: none;
    }
}

/* telefoni stretti: i pulsanti store restano solo con l'icona */
@media (max-width: 390px) {
    .nav-store-btn {
        width: 40px;
        padding: 0;
        gap: 0;
        justify-content: center;
        font-size: 0;
    }
}
