@font-face { font-family: 'Bricolage'; src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree-latin-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
    --brand: #C2410C;
    --brand-dark: #9A3412;
    --brand-soft: #FDEBDD;
    --amber: #F59E0B;
    --ink: #1F1A17;
    --muted: #5F574F;
    --paper: #FFF8EF;
    --card: #FFFFFF;
    --line: #F0DCC3;
    --night: #1A1411;
    --s: 1;
    --display: 'Bricolage', ui-sans-serif, system-ui, sans-serif;
    --body: 'Figtree', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-snap-type: y mandatory; scroll-behavior: smooth; background: var(--night); }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--night); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

/* ——— Slide: tela 1600×900 ridimensionata con zoom ——— */
.slide { height: 100vh; height: 100svh; display: grid; place-items: center; scroll-snap-align: start; overflow: hidden; }
.canvas {
    position: relative; width: 1600px; height: 900px; zoom: var(--s);
    padding: 72px 96px; background: var(--paper); overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; gap: 28px;
}
.canvas::after { /* filo di luci in basso */
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
    background: linear-gradient(90deg, var(--brand), var(--amber), var(--brand));
}

.kicker { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
h1 { font-size: 76px; line-height: 1.02; font-weight: 800; }
h1 em { font-style: normal; color: var(--brand); }
h2 { font-size: 52px; line-height: 1.08; font-weight: 800; max-width: 1300px; }
h3 { font-size: 26px; line-height: 1.2; font-weight: 700; }
.lead { font-size: 25px; line-height: 1.5; color: var(--muted); max-width: 760px; }
.lead b { color: var(--ink); }
.note { font-size: 21px; color: var(--muted); padding-top: 8px; }

/* ——— Copertina e chiusura ——— */
.cover { background: radial-gradient(1200px 600px at 80% 20%, #FFE9D2 0%, var(--paper) 60%); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding-top: 110px; }
.cover-text { display: flex; flex-direction: column; gap: 30px; }
.cover-logo { width: 360px; }
.cover .lead { font-size: 26px; }
.cover-shot { width: 760px; }
.cover-foot { position: absolute; left: 96px; bottom: 34px; font-size: 18px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: 19px; font-weight: 600; }
.lights {
    position: absolute; top: 34px; left: 0; right: 0; height: 20px;
    background:
        radial-gradient(circle at 10px 10px, var(--amber) 0 5px, transparent 6px) 0 0 / 40px 20px repeat-x,
        radial-gradient(circle at 10px 14px, var(--brand) 0 4px, transparent 5px) 20px 0 / 40px 20px repeat-x;
    opacity: 0.85;
}
.end { background: var(--night); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; gap: 30px; }
.end h2 { font-size: 72px; }
.end .lead { color: #D8CFC6; max-width: 900px; }
.end .cover-logo { width: 420px; }
.contacts { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 64px; padding: 0 30px; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 700; font-size: 24px; text-decoration: none; }
.btn.ghost { background: transparent; border: 2px solid #5A4A40; }
.btn:hover { filter: brightness(1.1); }
.qr { background: #fff; padding: 10px; border-radius: 16px; width: 170px; }
.qr.big { width: 150px; }

/* ——— Griglie e card ——— */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--brand); }
.card p { font-size: 20px; line-height: 1.45; color: var(--muted); }
.problems { margin-top: 10px; }

.split { display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 64px; }
.split.rev { grid-template-columns: 1.08fr 1fr; }
.split.wide-right { grid-template-columns: 1fr 1.25fr; }
.split.wide-left { grid-template-columns: 1.3fr 1fr; }
.split > div:not(.devices):not(.phones):not(.arch) { display: flex; flex-direction: column; gap: 26px; }
.split h2 { font-size: 48px; }

.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; font-size: 24px; line-height: 1.4; }
.checks li { padding-left: 42px; position: relative; color: var(--muted); }
.checks li b { color: var(--ink); }
.checks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.checks.small { font-size: 22px; gap: 14px; }
.checks.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 48px; margin-top: 16px; }

/* ——— Dispositivi ——— */
.devices { position: relative; padding: 0 40px 40px 0; }
.browser { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px -28px rgba(60, 25, 0, 0.45), 0 0 0 1px rgba(0,0,0,0.06); }
.browser .bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #F3EEE8; }
.browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: #E0D6CC; }
.browser .bar i:nth-child(1) { background: #FF6058; } .browser .bar i:nth-child(2) { background: #FFC02F; } .browser .bar i:nth-child(3) { background: #29CA41; }
.browser .bar span { margin-left: 12px; flex: 1; background: #fff; border-radius: 8px; padding: 5px 12px; font-size: 14px; color: #7A6F66; }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.phone { margin: 0; position: relative; background: #111; border-radius: 44px; padding: 10px; box-shadow: 0 30px 60px -20px rgba(30, 10, 0, 0.5), inset 0 0 0 2px #333; }
.phone::before { content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 72px; height: 22px; border-radius: 12px; background: #111; z-index: 2; }
.phone img { border-radius: 34px; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.devices .phone { position: absolute; right: 0; bottom: 0; width: 210px; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.phones .phone:nth-child(2) { margin-top: 40px; }
figcaption { text-align: center; color: var(--muted); font-size: 18px; font-weight: 600; margin-top: 16px; }
.phone figcaption { position: absolute; left: 0; right: 0; top: 100%; }

.shots { gap: 40px; padding: 0 30px; }
.shots { margin-bottom: 50px; }
.shots .phone { width: 250px; justify-self: center; }
.shots figcaption { position: absolute; width: 280px; left: 50%; transform: translateX(-50%); font-weight: 400; line-height: 1.35; }
.shots figcaption b { color: var(--ink); }

/* ——— Moduli ——— */
.modules article { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.modules b { font-family: var(--display); font-size: 25px; color: var(--brand); }
.modules span { font-size: 19px; color: var(--muted); line-height: 1.35; }
.modules .wide { grid-column: span 2; background: var(--brand); border-color: var(--brand); }
.modules .wide b, .modules .wide span { color: #fff; }

/* ——— Template ——— */
.themes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.themes figure { margin: 0; grid-column: span 2; }
.themes figure:nth-child(-n+2) { grid-column: span 3; }
.themes img { border-radius: 14px; box-shadow: 0 16px 40px -20px rgba(60, 25, 0, 0.5), 0 0 0 1px rgba(0,0,0,0.06); aspect-ratio: 16 / 9; object-fit: cover; object-position: top; width: 100%; }
.themes figure:nth-child(-n+2) img { aspect-ratio: 16 / 6.4; }
.themes img { aspect-ratio: 16 / 8.2; }
.themes figcaption { text-align: left; font-weight: 400; font-size: 17px; margin-top: 10px; }
.themes figcaption b { display: block; font-family: var(--display); font-size: 22px; color: var(--ink); }
#s12 .canvas { gap: 18px; padding-top: 56px; padding-bottom: 50px; }
#s12 h2 { font-size: 46px; }
.themes { row-gap: 16px; }

/* ——— Passi e roadmap ——— */
.steps, .roadmap { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li, .roadmap li { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.steps li > span { width: 60px; height: 60px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 30px; }
.steps p, .roadmap p { font-size: 20px; line-height: 1.45; color: var(--muted); }
.roadmap li > span { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 16px; color: var(--brand); }
.roadmap li:first-child { background: var(--brand); border-color: var(--brand); }
.roadmap li:first-child * { color: #fff !important; }
.roadmap li:last-child { background: var(--night); border-color: var(--night); }
.roadmap li:last-child h3, .roadmap li:last-child p { color: #fff; }
.roadmap li:last-child span { color: var(--amber); }

/* ——— Numeri ——— */
.stats article { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 30px; display: flex; flex-direction: column; gap: 8px; }
.stats b { font-family: var(--display); font-size: 58px; font-weight: 800; color: var(--brand); line-height: 1; letter-spacing: -0.03em; }
.stats span { font-size: 21px; line-height: 1.4; color: var(--ink); }
.stats small { font-size: 15px; color: var(--muted); margin-top: auto; }
.segments .card p { font-size: 21px; }
#s16 .canvas, #s17 .canvas { gap: 24px; }

.biz .card p { font-size: 19px; }
.levers p { font-size: 20px; line-height: 1.45; color: var(--muted); border-top: 3px solid var(--brand); padding-top: 14px; }
.levers b { display: block; color: var(--ink); font-family: var(--display); font-size: 24px; margin-bottom: 4px; }

/* ——— Confronto ——— */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 21px; margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.compare th, .compare td { padding: 15px 20px; text-align: center; border-bottom: 1px solid var(--line); color: var(--muted); }
.compare th { font-family: var(--display); font-size: 20px; color: var(--ink); background: #FBF3E8; }
.compare td:first-child { text-align: left; color: var(--ink); font-weight: 600; }
.compare tr:last-child td { border-bottom: 0; }
.compare .us { background: var(--brand); color: #fff; font-weight: 800; }
.compare th.us { background: var(--brand-dark); color: #fff; }

/* ——— Architettura ——— */
.arch { display: flex; flex-direction: column; gap: 18px; }
.arch-core { background: var(--night); color: #fff; border-radius: 22px; padding: 28px; text-align: center; }
.arch-core b { display: block; font-family: var(--display); font-size: 32px; }
.arch-core span { color: #D8CFC6; font-size: 20px; }
.arch-mods, .arch-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.arch-themes { grid-template-columns: repeat(3, 1fr); }
.arch-mods span, .arch-themes span { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; font-weight: 700; font-size: 18px; }
.arch-themes span { background: var(--brand-soft); border-color: #F6CBA8; }
.arch .new { border-style: dashed; color: var(--brand); background: transparent !important; }

/* ——— Slide scura (demo) ——— */
.dark { background: radial-gradient(900px 600px at 85% 30%, #3A2418 0%, var(--night) 65%); color: #fff; }
.dark .lead { color: #D8CFC6; }
.dark .kicker { color: var(--amber); }
.qr-row { display: flex; align-items: center; gap: 26px; }
.qr-row p { font-size: 22px; color: #D8CFC6; line-height: 1.5; }
.qr-row b { color: #fff; font-size: 28px; }

/* ——— Navigazione ——— */
.nav { position: fixed; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 6px; background: rgba(26, 20, 17, 0.82); backdrop-filter: blur(8px); color: #fff; border-radius: 999px; padding: 6px; z-index: 10; font-size: 15px; }
.nav button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.nav button:hover, .nav button:focus-visible { background: rgba(255,255,255,0.14); outline: none; }
.nav .count { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.nav i { font-style: normal; opacity: 0.7; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 10; }
.progress span { display: block; height: 100%; width: 0; background: var(--amber); transition: width 0.3s; }

/* ——— Telefono e schermi stretti: le slide diventano pagine che scorrono ——— */
@media (max-width: 999px), (orientation: portrait) {
    html { scroll-snap-type: none; }
    .slide { height: auto; display: block; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .canvas { zoom: 1; width: 100%; height: auto; padding: 48px 16px 56px; gap: 20px; }
    h1 { font-size: 40px; }
    h2, .split h2 { font-size: 31px; }
    .end h2 { font-size: 36px; }
    h3 { font-size: 21px; }
    .kicker { font-size: 14px; }
    .lead, .cover .lead { font-size: 18px; }
    .note { font-size: 16px; margin-top: 0; }
    .cover, .split, .split.rev { display: flex; flex-direction: column; align-items: stretch; gap: 26px; }
    .cover { padding-top: 70px; }
    .split.rev > .devices, .split > .phones:first-child, .split > .arch { order: 2; }
    .cover-logo { width: 240px; }
    .end .cover-logo { width: 260px; }
    .cover-shot { width: 100%; }
    .shots { margin-bottom: 0; }
    .cover-foot { position: static; font-size: 14px; }
    .tags span { font-size: 15px; padding: 6px 12px; }
    .g2, .g3, .g4, .checks.cols { grid-template-columns: 1fr; }
    .modules { grid-template-columns: 1fr 1fr; gap: 10px; }
    .modules .wide { grid-column: span 2; }
    .modules article { padding: 14px; }
    .modules b { font-size: 18px; }
    .modules span { font-size: 15px; }
    .card { padding: 18px 20px; }
    .card p, .steps p, .roadmap p, .levers p, .biz .card p { font-size: 17px; }
    .checks, .checks.small { font-size: 18px; gap: 12px; }
    .checks li { padding-left: 36px; }
    .checks li::before { width: 22px; height: 22px; top: 2px; background-size: 13px; }
    .steps, .roadmap { grid-template-columns: 1fr; gap: 14px; margin-top: 0; }
    .steps li > span { width: 46px; height: 46px; font-size: 22px; border-radius: 14px; }
    .devices { padding: 0 24px 40px 0; }
    .devices .phone { width: 34%; border-radius: 26px; padding: 6px; }
    .devices .phone img { border-radius: 21px; }
    .phone::before { width: 40px; height: 12px; top: 12px; }
    .phones { gap: 10px; padding-bottom: 36px; }
    .phones .phone { border-radius: 26px; padding: 6px; }
    .phones .phone img { border-radius: 21px; }
    .phones .phone:nth-child(2) { margin-top: 20px; }
    figcaption { font-size: 13px; margin-top: 8px; }
    .shots { grid-template-columns: 1fr 1fr; gap: 20px 16px; padding: 0; }
    .shots .phone { width: 100%; margin-bottom: 70px; border-radius: 26px; padding: 6px; }
    .shots .phone img { border-radius: 21px; }
    .shots figcaption { width: 100%; font-size: 14px; }
    .themes { grid-template-columns: 1fr; gap: 18px; }
    .themes figure, .themes figure:nth-child(-n+2) { grid-column: auto; }
    .themes figure:nth-child(-n+2) img { aspect-ratio: 16 / 9; }
    .stats b { font-size: 40px; }
    .stats span { font-size: 17px; }
    .compare { font-size: 13px; display: block; overflow-x: auto; }
    .compare th, .compare td { padding: 10px 8px; }
    .compare th { font-size: 13px; }
    .arch-mods { grid-template-columns: repeat(3, 1fr); }
    .arch-mods span, .arch-themes span { font-size: 14px; }
    .arch-core b { font-size: 24px; } .arch-core span { font-size: 15px; }
    .qr { width: 130px; }
    .qr-row p { font-size: 17px; } .qr-row b { font-size: 21px; }
    .btn { min-height: 52px; font-size: 18px; padding: 0 20px; width: 100%; justify-content: center; }
    .nav { right: 10px; bottom: 10px; }
}

/* ——— Stampa / PDF: una slide per pagina ——— */
@page { size: 1600px 900px; margin: 0; }
@media print {
    html, body { background: #fff; }
    html { scroll-snap-type: none; }
    .nav, .progress { display: none; }
    .slide { height: 900px; display: block; page-break-after: always; break-after: page; }
    .canvas { zoom: 1 !important; }
}
