/* Tutta la landing un po' più compatta: i rem partono da 15px */
html { font-size: 15px; }
/* Landing: la taglia, impaginata larga. Colori e caratteri vengono da style.css (inchiostro del mestiere, legno, carta). */

.l-wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { transition: background-color .5s ease; }

.motto { font-family: var(--display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wood-text); margin: 0 0 14px; }

/* Testata */
.l-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--ground); border-bottom: 1px solid transparent; transition: border-color .2s, background-color .5s; }
.l-top.scrolled { border-bottom-color: var(--rule); }
.l-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.l-top .brand svg { width: 40px; height: 40px; }
.l-nav { display: none; gap: 28px; }
.l-nav a { font-weight: 700; text-decoration: none; color: var(--text); }
.l-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.l-top-cta { display: flex; align-items: center; gap: 16px; }
.button.sm { min-height: 44px; padding: 0 16px; }
@media (min-width: 880px) { .l-nav { display: flex; } }

.button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button { transition: transform .15s ease, background-color .5s, border-color .5s, color .5s; }
.button:hover { transform: translateY(-1px); }
.l-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.l-cta .button { min-height: 48px; padding: 0 22px; font-size: 1rem; }

/* Primo schermo */
.hero { overflow: hidden; }
.hero-in { display: grid; gap: 40px; padding-top: 28px; padding-bottom: 64px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 14ch; margin: 0 0 18px; text-wrap: balance; }
.hero .lead { font-size: 1.2rem; max-width: 40ch; }

.switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
.switch-label { flex-basis: 100%; font-size: 0.9rem; color: var(--muted); }
.switch button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--paper); color: var(--text); font: 700 0.95rem 'Atkinson Hyperlegible', system-ui, sans-serif; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch button i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.switch button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.switch button[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--paper); }

/* La demo: il telefono del cliente sopra la taglia che si riempie di tacche */
.demo { position: relative; justify-self: center; width: min(360px, 100%); padding: 40px 0 72px; }
.tally { position: absolute; left: 50%; top: 50%; width: 170%; transform: translate(-50%, -54%) rotate(-30deg); z-index: 0; }
.t-ceppo { fill: var(--ink); transition: fill .5s; }
.t-matrice { fill: var(--wood); }
.t-cuts path { fill: var(--ground); transition: fill .5s; transform-box: view-box; }
@media (prefers-reduced-motion: no-preference) {
  .t-cuts path.new { animation: cut .45s cubic-bezier(.2,.9,.3,1.3); }
  @keyframes cut { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
.screen { position: relative; z-index: 1; margin: 0 auto; width: 280px; background: var(--ground); border: 9px solid var(--text); border-radius: 34px; padding: 18px 14px 16px; font-size: 0.92rem; transition: background-color .5s; }
.screen-bar { display: flex; align-items: center; gap: 8px; color: var(--ink); margin-bottom: 8px; }
.screen-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.screen-bar b { font-family: var(--display); font-size: 1rem; }
.screen-title { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; color: var(--ink); margin: 0; }
.screen .stamp { font-size: 0.78rem; border-width: 2px; padding: 2px 7px; margin: 8px 0 10px; }
.items { list-style: none; margin: 0; padding: 0 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; }
.items li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.items li:last-child { border-bottom: 0; }
.items b { display: block; font-size: 0.9rem; }
.items em { font-style: normal; font-size: 0.78rem; color: var(--muted); }
.step { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.step > span { width: 28px; height: 28px; border-radius: 7px; border: 1.5px solid var(--ink); color: var(--ink); display: grid; place-items: center; font-weight: 700; transition: background-color .15s, color .15s; }
.step > span.tap { background: var(--ink); color: var(--paper); }
.step .q { width: 14px; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.screen-total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 2px 10px; }
.screen-total b { font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.screen-btn { display: block; text-align: center; background: var(--ink); color: var(--paper); font-weight: 700; border-radius: 8px; padding: 11px; transition: transform .15s, background-color .5s; }
.screen-btn.tap { transform: scale(.96); }
.screen-btn.done { background: var(--open); }
.d-toast { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; font-size: 0.85rem; box-shadow: 0 6px 20px rgba(36, 24, 15, 0.12); }
.d-toast span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--open); margin-right: 8px; vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .d-toast.show { animation: toast .4s ease-out; }
  @keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
}
.counter { position: absolute; z-index: 2; right: -8px; top: 6px; margin: 0; background: var(--wood); color: var(--text); font-weight: 700; font-size: 0.85rem; border-radius: 999px; padding: 4px 12px; font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1.1fr 0.9fr; padding-top: 48px; padding-bottom: 96px; }
  .demo { padding: 60px 0 80px; }
}

/* Sezioni */
.l-section { padding: 72px 0; }
.l-section + .l-section { border-top: 1px solid var(--rule); }
.l-section h2, .story h2, .final h2 { font-size: clamp(1.55rem, 3.4vw, 2.25rem); line-height: 1.08; max-width: 22ch; margin-bottom: 14px; text-wrap: balance; }
.l-section .intro { font-size: 1.15rem; max-width: 52ch; color: var(--muted); }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.reverse > :first-child { order: 2; }
}

.pad { list-style: none; margin: 24px 0 0; padding: 0; max-width: 640px; }
.pad li { padding: 14px 0 14px 30px; border-bottom: 1px solid var(--rule); font-size: 1.06rem; position: relative; }
.pad li:last-child { border-bottom: 0; }
.pad li::before { content: ''; position: absolute; left: 2px; top: 22px; width: 14px; height: 10px; background: var(--wood); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.pad strong { color: var(--ink); }

.phone { margin: 0; justify-self: center; width: min(300px, 78vw); border: 10px solid var(--text); border-radius: 34px; overflow: hidden; background: var(--paper); transform: rotate(2deg); }
.split.reverse .phone { transform: rotate(-2deg); }
.phone img { display: block; width: 100%; height: auto; }

/* La scena di WhatsApp */
.chat { display: grid; gap: 10px; justify-items: start; max-width: 420px; }
.bubble { position: relative; margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px 14px 14px 14px; padding: 10px 14px; font-size: 1.02rem; box-shadow: 0 1px 0 var(--rule); }
.bubble b { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.bubble:nth-child(2) { margin-left: 24px; }
.bubble:nth-child(3) { margin-left: 8px; }
.bubble.late { margin-left: 36px; border-color: var(--closed); }
.bubble.late b { color: var(--closed); }

/* Come funziona: una tacca per passo */
.steps { list-style: none; margin: 36px 0 0; padding: 26px 0 0; display: grid; gap: 28px; position: relative; }
.steps::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; border-radius: 7px; background: var(--ink); }
.steps li { position: relative; padding-top: 16px; }
.steps .notch { position: absolute; top: -26px; left: 0; width: 22px; height: 15px; background: var(--ground); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.steps h3 { font-family: var(--display); font-size: 1.35rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Il riepilogo in numeri */
.tot { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 6px; }
.tot p { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 16px; min-width: 130px; }
.tot b { display: block; font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.tot span { color: var(--muted); font-size: 0.95rem; }

.cards { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.cards li { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }
.cards h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 6px; }
.cards p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* La storia */
.story { background: var(--ink); color: var(--ground); overflow: hidden; transition: background-color .5s; }
.story-in { display: grid; gap: 24px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.story h2 { color: var(--ground); }
.story p { max-width: 56ch; font-size: 1.1rem; color: var(--ground); opacity: .92; }
.story .motto { color: #e2bd86; opacity: 1; }
.story-mark svg { width: min(360px, 70vw); height: auto; display: block; margin: -40px auto; color: var(--ground); }
@media (min-width: 880px) { .story-in { grid-template-columns: 0.8fr 1.2fr; gap: 56px; } }

/* Mestieri */
.trade-cards { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.trade-cards li { background: var(--ground); border: 1px solid var(--rule); border-radius: 12px; transition: transform .2s ease; }
.trade-cards li:hover { transform: translateY(-4px) rotate(-.5deg); }
.trade-cards a { display: grid; gap: 8px; padding: 22px; text-decoration: none; color: var(--text); height: 100%; }
.trade-cards svg { width: 72px; height: 72px; color: var(--ink); margin: -6px 0 4px -6px; }
.trade-cards .tc-kind { font-family: var(--display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.trade-cards b { font-family: var(--display); font-size: 1.3rem; line-height: 1.15; color: var(--ink); }
.trade-cards .tc-go { margin-top: auto; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 760px) { .trade-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .trade-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Dati */
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; }
.facts li { border-top: 4px solid var(--wood); padding-top: 14px; }
.facts b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--ink); margin-bottom: 4px; }
.facts span { color: var(--muted); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.faq { max-width: 780px; margin-top: 20px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.faq summary { font-size: 1.1rem; }
.faq p { color: var(--text); margin: 0 0 16px; }

/* Chiusura */
.final { background: var(--wood); }
.final-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 64px; padding-bottom: 64px; }
.final h2 { color: var(--text); margin-bottom: 8px; }
.final p { margin: 0; font-size: 1.15rem; color: var(--text); }
.final-btn { background: var(--text); color: var(--paper); border-color: var(--text); min-height: 50px; padding: 0 26px; font-size: 1.02rem; }

.l-foot { padding: 40px 0 56px; }
.foot-in { display: grid; gap: 8px; justify-items: start; }
.l-foot .motto { margin: 0; }

/* Comparsa allo scorrimento: solo se lo script c'è e il movimento è gradito */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Pagine per mestiere ---------- */
.eyebrow-trade { display: inline-block; margin: 0 0 14px; font-family: var(--display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.trade-hero .phone { transform: rotate(3deg); }
.week { list-style: none; margin: 28px 0 0; padding: 0; max-width: 860px; }
.week li { display: grid; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.week li:last-child { border-bottom: 0; }
.week .day { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.2rem; }
.week p { margin: 0; font-size: 1.05rem; }
@media (min-width: 720px) { .week li { grid-template-columns: 220px 1fr; } }

.trades { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.trades span { border: 1.5px solid var(--rule); border-radius: 999px; padding: 8px 16px; font-weight: 700; background: var(--paper); }

.trade-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.trade-links a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--text); font-weight: 700; text-decoration: none; }
.trade-links a::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--chip); flex: none; }
.trade-links a:hover { border-color: var(--chip); }
.stack-cards { grid-template-columns: 1fr !important; margin-top: 20px; }

/* La storia del marchio in quattro disegni */
.story { padding-bottom: 72px; }
.story-in { padding-bottom: 32px; }
.tally-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tally-steps li { background: #f4efe8; color: #24180f; border-radius: 12px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.tally-steps svg { width: 100%; height: auto; display: block; }
.tally-steps p { margin: 0; font-size: 1rem; line-height: 1.35; color: #24180f; opacity: 1; }
@media (min-width: 880px) { .tally-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.story-key { margin-top: 28px; border-top: 1px solid rgba(244, 239, 232, 0.25); padding-top: 24px; }
.story-key-title { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin: 0 0 12px; opacity: 1; }
.story-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 14px; }
.story-key-mark { background: #f4efe8; border-radius: 14px; padding: 6px; }
.story-key-mark svg { width: 104px; height: 104px; display: block; color: #4a3020; }
.story-key ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 1.08rem; }
.story-key li { display: flex; align-items: center; gap: 10px; }
.story-key i { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.story-key i.notch { background: #e2bd86; clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 0; }
