/* ==========================================================================
   Lendmates | home page (IT ed EN)
   Struttura: intro, due metà Vendi / Noleggia con i passaggi animati,
   sicurezza, quattro modi, categorie, guide, domande, chiusura.
   Le animazioni partono da assets/home.js. Senza JavaScript tutto il testo
   è visibile e le due metà restano affiancate.
   ========================================================================== */

.h { --ink: #1C1C1C; --ink-2: #4A4A4A; --yellow: #FFC400; --line: #E9E9E9; --soft: #FAFAFA; --green: #2CBE6E; }
.h { color: var(--ink); overflow-x: clip; }
.h-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.h h1, .h h2, .h h3 { letter-spacing: -.02em; }
.h-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.h-kicker::before { content: ''; width: 26px; height: 3px; border-radius: 2px; background: var(--yellow); }

/* ---------- Badge store (creati da assets/stores.js) ---------- */
.h .stores { display: flex; flex-wrap: wrap; gap: 12px; }
.h .store {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: #FFFFFF; border-radius: 14px; padding: 10px 18px 10px 15px;
  text-decoration: none; opacity: .62; cursor: default;
}
.h .store svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.h .store__txt { display: flex; flex-direction: column; line-height: 1.15; }
.h .store__top { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.h .store__bot { font-size: 16px; font-weight: 700; }
.h .store--live { opacity: 1; cursor: pointer; }
.h .store--live:hover { background: #000000; }

/* ---------- Intro ---------- */
.h-intro { padding: 30px 0 28px; }
.h-intro .h-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; }
.h-intro__lead { margin: 0; max-width: 62ch; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.h-intro__lead strong { color: var(--ink); }

/* ---------- Le due metà ---------- */
.h-split { display: flex; min-height: 780px; }
.h-panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  padding: 40px clamp(24px, 4vw, 64px) 56px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 26px;
  transition: flex-grow .7s cubic-bezier(.2, .8, .2, 1);
}
.h-panel--sell { background: var(--ink); color: #FFFFFF; }
.h-panel--rent { background: var(--yellow); color: var(--ink); }

.h-tabwrap { margin: 0; }
.h-tab {
  all: unset; cursor: pointer; box-sizing: border-box;
  display: inline-flex; align-items: baseline; gap: 18px;
  font-family: inherit; font-weight: 700; font-size: clamp(52px, 7.4vw, 124px); line-height: .92; letter-spacing: -.045em;
}
.h-tab:focus-visible { outline: 3px solid currentColor; outline-offset: 6px; border-radius: 8px; }

.h-body { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; flex: 1; }
.h-text { flex: 1 1 360px; min-width: 0; }
.h-title { margin: 0 0 26px; font-size: clamp(27px, 2.7vw, 40px); line-height: 1.12; font-weight: 700; }
.h-panel--sell .h-title .hl { color: var(--yellow); }

/* passaggi */
.h-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.h-step {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; align-items: start;
  padding: 15px 20px; border-radius: 20px; border: 2px solid currentColor;
  font-family: inherit; transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.h-step:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.h-step__n { font-weight: 700; font-size: 19px; line-height: 1.4; }
.h-step__t { font-weight: 700; font-size: 19px; line-height: 1.4; }
.h-step__b {
  grid-column: 2; font-size: 16px; line-height: 1.5; font-weight: 500;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .45s ease, opacity .3s ease, margin .3s ease;
}
.h-step[aria-pressed="true"] .h-step__b { max-height: 140px; opacity: 1; margin-top: 6px; }
.h-panel--sell .h-step { border-color: #5A5A5A; }
.h-panel--sell .h-step:hover { border-color: #FFFFFF; }
.h-panel--sell .h-step[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.h-panel--rent .h-step { border-color: rgba(28, 28, 28, .35); }
.h-panel--rent .h-step:hover { border-color: var(--ink); }
.h-panel--rent .h-step[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.h-note { margin: 22px 0 0; font-size: 15px; font-weight: 600; }

/* il riquadro animato */
.h-stagewrap { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.h-stage {
  position: relative; width: 100%; max-width: 470px; aspect-ratio: 1 / 1;
  border-radius: 44px; box-sizing: border-box; color: var(--ink);
}
.h-panel--sell .h-stage { background: var(--yellow); }
.h-panel--rent .h-stage { background: var(--ink); }
.h-stage { display: grid; padding: 8%; }
.h-scene {
  grid-area: 1 / 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.h-scene.is-on { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.h-card {
  width: 100%; background: #FFFFFF; border-radius: 18px; padding: 22px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 14px;
}
.h-scene.is-on .h-card { animation: hPop .5s ease both; }
.h-lbl { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.h-val { margin: 2px 0 0; font-weight: 700; font-size: 18px; }
.h-big { margin: 0; font-weight: 700; font-size: 32px; line-height: 1; }
.h-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 2px solid var(--line); padding-top: 12px; }
.h-thumb { width: 84px; height: 66px; object-fit: cover; border-radius: 10px; background: #F3F3F3; }
.h-chip { font-weight: 700; font-size: 13px; background: var(--ink); color: #FFFFFF; border-radius: 999px; padding: 6px 12px; }

/* scena: fotografia */
.h-shot { position: relative; width: 100%; background: #FFFFFF; border-radius: 18px; padding: 22px; box-sizing: border-box; }
.h-shot img { width: 100%; height: auto; display: block; border-radius: 10px; }
.h-corner { position: absolute; width: 30px; height: 30px; border: 0 solid var(--ink); }
.h-corner--tl { top: 10px; left: 10px; border-top-width: 4px; border-left-width: 4px; border-radius: 6px 0 0 0; }
.h-corner--tr { top: 10px; right: 10px; border-top-width: 4px; border-right-width: 4px; border-radius: 0 6px 0 0; }
.h-corner--bl { bottom: 10px; left: 10px; border-bottom-width: 4px; border-left-width: 4px; border-radius: 0 0 0 6px; }
.h-corner--br { bottom: 10px; right: 10px; border-bottom-width: 4px; border-right-width: 4px; border-radius: 0 0 6px 0; }
.h-flash { position: absolute; inset: 0; background: #FFFFFF; border-radius: 18px; opacity: 0; }
.h-shutter { width: 58px; height: 58px; border-radius: 50%; background: #FFFFFF; border: 5px solid var(--ink); box-sizing: border-box; margin: 20px auto 0; }
.h-scene.is-on .h-shot { animation: hPop .5s ease both; }
.h-scene.is-on .h-corner { animation: hFocus .6s ease .25s both; }
.h-scene.is-on .h-flash { animation: hFlash .7s ease-out 1s both; }
.h-scene.is-on .h-shutter { animation: hPress .3s ease .9s both; }

/* scena: annuncio che si scrive */
.h-type { clip-path: inset(0 100% 0 0); }
.h-scene.is-on .h-type { animation: hType var(--d, .6s) steps(var(--s, 20)) var(--w, .2s) both; }

/* scena: spedizione */
.h-barcode { height: 60px; background: repeating-linear-gradient(90deg, #1C1C1C 0 4px, #FFFFFF 4px 7px, #1C1C1C 7px 9px, #FFFFFF 9px 15px, #1C1C1C 15px 21px, #FFFFFF 21px 24px); }
.h-track { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.h-track span { display: block; height: 100%; width: 100%; background: var(--green); border-radius: 999px; }
.h-scene.is-on .h-track span { animation: hFill 2.2s ease-in-out .3s both; }
.h-legs { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.h-later { opacity: 0; }
.h-scene.is-on .h-later { animation: hUp .4s ease var(--w, 2.2s) both; }

/* scena: calendario */
.h-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; text-align: center; font-weight: 700; font-size: 13px; }
.h-cal span { padding: 6px 0; border-radius: 9px; }
.h-cal .h-dow { color: var(--ink-2); padding: 2px 0; }
.h-scene.is-on .h-cal .h-sel { animation: hDay .45s ease var(--w, .7s) both; }

/* scena: QR */
.h-qr { position: relative; width: 58%; aspect-ratio: 1 / 1; margin: 0 auto; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.h-qr span { border-radius: 2px; background: #FFFFFF; }
.h-qr span.on { background: var(--ink); }
.h-scan { position: absolute; left: -5%; right: -5%; top: 0; height: 6px; border-radius: 999px; background: var(--green); opacity: 0; }
.h-scene.is-on .h-scan { animation: hScan 1.4s ease-in-out .3s 2 alternate both; }
.h-ok { display: inline-flex; align-items: center; gap: 10px; align-self: center; background: var(--ink); color: #FFFFFF; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 15px; opacity: 0; }
.h-ok svg { width: 18px; height: 18px; }
.h-scene.is-on .h-ok { animation: hPopIn .4s ease 3.1s both; }

/* scena: cauzione e recensione */
.h-stars { display: flex; gap: 4px; }
.h-stars svg { width: 26px; height: 26px; opacity: 0; }
.h-scene.is-on .h-stars svg { animation: hStar .35s ease var(--w, 2.6s) both; }

/* stati delle due metà (solo con JavaScript: senza, restano affiancate e aperte) */
.js .h-split[data-side="sell"] .h-panel--sell, .js .h-split[data-side="rent"] .h-panel--rent { flex-grow: 4; }
.js .h-panel.is-closed { cursor: pointer; }
.js .h-panel.is-closed .h-body { opacity: 0; visibility: hidden; position: absolute; pointer-events: none; }
.js .h-panel.is-closed .h-tab { writing-mode: vertical-rl; transform: rotate(180deg); }
.js .h-panel:not(.is-closed) .h-body { animation: hUp .5s ease .2s both; }

@media (max-width: 960px) {
  .h-split { flex-direction: column; min-height: 0; }
  .h-panel { flex: none; padding: 40px 24px 52px; }
  .js .h-panel.is-closed .h-body { opacity: 1; visibility: visible; position: static; pointer-events: auto; }
  .js .h-panel.is-closed .h-tab { writing-mode: horizontal-tb; transform: none; }
  .js .h-panel.is-closed { cursor: auto; }
  .h-tab { cursor: default; }
  .h-stage { max-width: 420px; }
}

/* ---------- Sezioni sotto ---------- */
.h-sec { padding: 104px 0; }
.h-sec--soft { background: var(--soft); }
.h-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 48px; margin-bottom: 48px; }
.h-head h2 { margin: 0; max-width: 18ch; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; font-weight: 700; }
.h-head p { margin: 0; max-width: 46ch; font-size: 18px; line-height: 1.55; color: var(--ink-2); }

/* sicurezza */
.h-trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.h-trust li { padding: 34px 30px 38px 0; border-bottom: 2px solid var(--ink); }
.h-trust li:not(:nth-child(3n + 1)) { padding-left: 30px; border-left: 2px solid var(--ink); }
.h-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--yellow); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: transform .3s ease; }
.h-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.h-trust li:hover .h-ico { transform: rotate(-8deg) scale(1.06); }
.h-trust h3 { margin: 0 0 8px; font-size: 21px; font-weight: 700; }
.h-trust p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 960px) {
  .h-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-trust li, .h-trust li:not(:nth-child(3n + 1)) { padding: 30px 24px 32px 0; border-left: 0; }
  .h-trust li:nth-child(2n) { padding-left: 24px; border-left: 2px solid var(--ink); }
}
@media (max-width: 620px) {
  .h-trust { grid-template-columns: 1fr; }
  .h-trust li, .h-trust li:nth-child(2n) { padding: 26px 0 28px; border-left: 0; }
}

/* quattro modi e guide: righe a tutta larghezza */
.h-index { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.h-index li { border-bottom: 2px solid var(--ink); }
.h-index a {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.15fr) 48px; gap: 10px 32px; align-items: baseline;
  padding: 26px 16px; text-decoration: none; color: inherit; overflow: hidden;
}
.h-index a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.h-index a:hover, .h-index a:focus-visible { color: #FFFFFF; }
.h-index a:hover::before, .h-index a:focus-visible::before { transform: scaleY(1); }
.h-index__n { font-size: 15px; font-weight: 700; }
.h-index__t { margin: 0; font-size: clamp(28px, 3.8vw, 54px); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; }
.h-index__b { font-size: 17px; line-height: 1.5; }
.h-index__go { justify-self: end; font-size: 28px; font-weight: 700; transition: transform .3s ease; }
.h-index a:hover .h-index__go { transform: translateX(6px); color: var(--yellow); }
.h-index--guides .h-index__t { font-size: clamp(22px, 2.6vw, 34px); }
@media (max-width: 860px) {
  .h-index a { grid-template-columns: 40px minmax(0, 1fr) 32px; padding: 22px 8px; }
  .h-index__b { grid-column: 2 / 3; }
  .h-index__go { grid-row: 1; grid-column: 3; font-size: 22px; }
  .h-index--guides .h-index__b { display: none; }
}
.h-more { margin: 40px 0 0; }
.h-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px;
  background: var(--ink); color: #FFFFFF; font-weight: 700; font-size: 16px; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.h-btn:hover { background: var(--yellow); color: var(--ink); }

/* categorie: due nastri che scorrono in direzioni opposte */
.h-cats { display: flex; flex-direction: column; gap: 14px; }
.h-belt { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.h-belt__track { display: flex; width: max-content; }
.h-belt ul { list-style: none; margin: 0; padding: 0 12px 0 0; display: flex; gap: 12px; }
.h-belt li { white-space: nowrap; padding: 14px 24px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; font-size: 18px; background: #FFFFFF; }
.h-belt--b li { background: var(--yellow); border-color: var(--yellow); }
/* home.js ripete le categorie finché il nastro copre tutto lo schermo e imposta
   di quanto scorrere (--belt-shift) e la durata, uguale velocità a ogni larghezza */
.js .h-belt__track { animation: hBelt var(--belt-dur, 42s) linear infinite; }
.js .h-belt--b .h-belt__track { animation-direction: reverse; }
.h-belt:hover .h-belt__track { animation-play-state: paused; }
.h-belt__copy { display: none; }
.js .h-belt__copy { display: flex; }

/* domande frequenti */
.h-faqgrid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 40px 64px; align-items: start; }
.h-faqgrid .h-head { margin: 0; position: sticky; top: 100px; display: block; }
.h-faqgrid .h-head p { margin-top: 18px; }
.h-faqgrid .h-head a { color: inherit; font-weight: 700; }
.h-faq details { border-bottom: 2px solid var(--ink); }
.h-faq details:first-child { border-top: 2px solid var(--ink); }
.h-faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 54px 22px 0; font-weight: 700; font-size: 19px; line-height: 1.35;
}
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary h3 { display: inline; margin: 0; font: inherit; letter-spacing: normal; color: inherit; }
.h-faq summary::after {
  content: ''; position: absolute; right: 0; top: 50%; width: 34px; height: 34px; margin-top: -17px;
  border-radius: 50%; background: var(--yellow) no-repeat center / 14px 14px;
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 14px 2px, 2px 14px; transition: transform .3s ease;
}
.h-faq details[open] summary::after { transform: rotate(45deg); }
.h-faq details p { margin: 0 0 24px; max-width: 64ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 860px) {
  .h-faqgrid { grid-template-columns: 1fr; }
  .h-faqgrid .h-head { position: static; }
}

/* chiusura */
.h-end { padding: 0 0 104px; }
.h-end__box {
  position: relative; overflow: hidden; background: var(--yellow); border-radius: 44px;
  padding: clamp(48px, 7vw, 96px) clamp(28px, 6vw, 88px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.h-end__box h2 { margin: 0 0 18px; font-size: clamp(38px, 5.6vw, 78px); line-height: .98; font-weight: 700; letter-spacing: -.04em; max-width: 12ch; }
.h-end__box p { margin: 0; max-width: 44ch; font-size: 19px; line-height: 1.55; }
.h-end__ring { position: absolute; right: -90px; top: -90px; width: 300px; height: 300px; border-radius: 50%; border: 2px solid var(--ink); opacity: .18; }
.js .h-end__ring { animation: hSpin 24s linear infinite; border-style: dashed; }

/* comparsa delle sezioni allo scorrere (solo con JavaScript) */
.hjs .h-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--rd, 0s); }
.hjs .h-reveal.is-in { opacity: 1; transform: none; }

@keyframes hPop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes hPopIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes hUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hFocus { from { transform: scale(1.35); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hFlash { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes hPress { 0%, 100% { transform: scale(1); } 50% { transform: scale(.86); } }
@keyframes hType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hFill { from { width: 6%; } to { width: 100%; } }
@keyframes hDay { 0% { background: #FFFFFF; transform: scale(.6); } 70% { transform: scale(1.15); } 100% { background: #FFC400; transform: none; } }
@keyframes hScan { from { top: 0; opacity: 1; } to { top: calc(100% - 6px); opacity: 1; } }
@keyframes hStar { from { opacity: 0; transform: scale(.3) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes hBelt { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--belt-shift, 50%))); } }
@keyframes hSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .h *, .h *::before, .h *::after { animation: none !important; transition: none !important; }
  .h-type, .h-later, .h-ok, .h-stars svg { clip-path: none; opacity: 1; }
  .h-track span { width: 100%; }
  .hjs .h-reveal { opacity: 1; transform: none; }
  .js .h-belt__track { flex-wrap: wrap; width: auto; }
  .js .h-belt__copy { display: none; }
}
.h-row > span:first-child { white-space: nowrap; }
@media (max-width: 420px) { .h-stars svg { width: 22px; height: 22px; } }
