/* Blocco "cad-bike" — il telaio FIRE che si disegna a matita e si vernicia scorrendo (js/blocks/cad-bike.js) */
.hm-cad .hm-eyebrow{ display:block; font-family:var(--font-sans); font-size:.72rem; font-weight:600; letter-spacing:.28em; text-transform:uppercase; color:var(--terracotta); }
/* ---------------- APERTURA "Il disegno": il telaio FIRE si traccia a matita, si vernicia, poi la strada ----------------
   (ref. Longbow + Cipher Digital: foglio tecnico con griglia e crocini) */
.hm-cad{ position:relative; height:260vh; padding:0; background:var(--cream); color:var(--ink);
  --tyre-wall:#c9a274; --tyre-tread:#26292c; --rim:#1d2124; --paint-main:#6b1f2a; --paint-accent:#6b1f2a; --paint-head:#6b1f2a;
  --paint-fork:#6b1f2a; --paint-b:#d98a3d; --logo:#f4f1ea; --tape:#d9cba8; --saddle:#1c1e21; --line:#111; }
.hm-cad__stage{ position:sticky; top:0; height:100vh; height:100svh; overflow:hidden; background:var(--cream); }
.hm-cad__sheet{ position:absolute; inset:0;
  background-image:linear-gradient(to right, rgba(44,68,89,.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(44,68,89,.07) 1px, transparent 1px);
  background-size:calc(100% / 12) calc(100% / 8); }
.hm-cad__sheet i{ position:absolute; width:14px; height:14px; transform:translate(-50%,-50%); }
.hm-cad__sheet i::before, .hm-cad__sheet i::after{ content:""; position:absolute; background:rgba(44,68,89,.45); }
.hm-cad__sheet i::before{ left:6.5px; top:0; width:1px; height:14px; }
.hm-cad__sheet i::after{ top:6.5px; left:0; width:14px; height:1px; }
.hm-cad__bike{ position:absolute; left:30vw; right:4vw; top:calc(62px + 13vh); bottom:16vh; }
.hm-cad__bike svg, .hm-cad__fallback{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.hm-cad__fallback{ object-fit:contain; }
.hm-cad__line svg *{ fill:none !important; stroke:#2C4459 !important; stroke-width:.9px !important; vector-effect:non-scaling-stroke; filter:none !important; }
.hm-cad__line svg text, .hm-cad__line svg image{ display:none; }
.js-cad .hm-cad__paint{ clip-path:inset(0 100% 0 0); }
.hm-cad__scan{ position:absolute; top:calc(62px + 11vh); bottom:14vh; left:8vw; width:1px; background:var(--terracotta); opacity:0;
  box-shadow:0 0 18px 2px rgba(140,59,34,.4); z-index:3; }
.hm-cad__title{ position:absolute; left:var(--pad); top:calc(62px + 6vh); z-index:6; }
.hm-cad__title .hm-eyebrow{ margin-bottom:.9rem; }
.hm-cad__h1{ font-family:var(--font-sans); font-weight:600; text-transform:uppercase; letter-spacing:-.02em; line-height:.92;
  font-size:clamp(2.6rem,6vw,5.8rem); margin:0; color:var(--ink); }
.hm-cad__h1 em{ font-family:var(--font-serif); font-style:italic; font-weight:400; text-transform:none; letter-spacing:-.01em; color:var(--terracotta); }
.hm-cad__h1 .hm-ln{ display:block; overflow:hidden; padding-bottom:.06em; }
.hm-cad__h1 .hm-ln > span{ display:inline-block; }
.hm-cad__spec{ position:absolute; right:var(--pad); bottom:9vh; z-index:6; margin:0; text-align:right; font-family:var(--font-mono);
  font-size:.66rem; line-height:1.9; letter-spacing:.14em; text-transform:uppercase; color:var(--navy); }
.hm-cad__spec b{ color:var(--terracotta); font-weight:400; }
.hm-cad__foot{ position:absolute; left:var(--pad); right:var(--pad); bottom:3vh; z-index:6; display:flex; justify-content:space-between;
  font-family:var(--font-mono); font-size:.7rem; letter-spacing:.18em; text-transform:uppercase; color:var(--muted-foreground); }
.hm-cad__cue{ position:absolute; left:50%; bottom:0; transform:translateX(-50%); z-index:7; display:flex; flex-direction:column; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:.7rem; letter-spacing:.24em; text-transform:uppercase; color:var(--muted-foreground); }
/* il filo rosso del percorso parte gia' qui, dall'apertura */
.hm-cad__cue i{ display:block; width:2px; height:clamp(34px,6vh,60px);
  background:repeating-linear-gradient(to bottom, var(--terracotta) 0 7px, transparent 7px 13px); animation:hmDash 1.4s linear infinite; }
@keyframes hmDash{ to{ background-position:0 13px } }
@media (max-width:900px){
  .hm-cad{ height:230vh; }
  .hm-cad__scan{ top:calc(62px + 28vh); bottom:18vh; }
  .hm-cad__bike{ left:3vw; right:3vw; top:calc(62px + 30vh); bottom:20vh; }
  .hm-cad__spec{ left:var(--pad); right:auto; text-align:left; bottom:8vh; font-size:.56rem; }
  .hm-cad__title{ top:calc(62px + 4vh); }
}
@media (max-width:420px){
  .hm-cad__foot{ display:none; }
}
/* telefono in orizzontale e schermi bassi: titolo a sinistra, bici a destra */
@media (max-height:520px) and (min-width:600px){
  .hm-cad{ height:220vh; }
  .hm-cad__bike{ left:44vw; right:3vw; top:calc(62px + 3vh); bottom:10vh; }
  .hm-cad__scan{ top:calc(62px + 3vh); bottom:10vh; }
  .hm-cad__spec, .hm-cad__foot{ display:none; }
  .hm-cad__title{ top:calc(62px + 4vh); max-width:42vw; }
}
/* movimento ridotto: niente fogli lunghi, si vede subito la bici verniciata */
@media (prefers-reduced-motion:reduce){
  .hm-cad{ height:auto; } .hm-cad__stage{ position:relative; }
  .js-cad .hm-cad__paint{ clip-path:none; } .hm-cad__line, .hm-cad__cue i{ display:none; }
}

/* scritta di avanzamento (Laboratorio): "Caricamento... 46%" mentre la vernice avanza, poi "Pronta per partire." (js/blocks/cad-bike.js) */
.hm-cad__load{ position:absolute; left:0; right:0; top:calc(62px + 5vh); z-index:6; margin:0; text-align:center; display:grid; place-items:center; }
.hm-cad__load > span{ grid-area:1/1; transition:opacity .5s ease, transform .5s ease; }
.hm-cad__load-txt{ font-family:var(--font-mono); font-size:.78rem; letter-spacing:.22em; text-transform:uppercase; color:var(--ink); opacity:.75; }
.hm-cad__load-pct{ color:var(--terracotta); letter-spacing:.08em; margin-left:.4em; font-variant-numeric:tabular-nums; }
.hm-cad__dots i{ font-style:normal; animation:hmDot 1.4s infinite; opacity:.2; }
.hm-cad__dots i:nth-child(2){ animation-delay:.2s } .hm-cad__dots i:nth-child(3){ animation-delay:.4s }
@keyframes hmDot{ 0%,100%{ opacity:.2 } 40%{ opacity:1 } }
.hm-cad__ready{ font-family:var(--font-serif); font-style:italic; font-size:clamp(1.6rem,2.6vw,2.4rem); letter-spacing:-.01em; color:var(--terracotta); opacity:0; transform:translateY(10px); }
.hm-cad__load.is-ready .hm-cad__load-txt{ opacity:0; transform:translateY(-10px); }
.hm-cad__load.is-ready .hm-cad__ready{ opacity:1; transform:none; }
@media (max-width:760px){ .hm-cad__load{ top:calc(62px + 3vh); } .hm-cad__load-txt{ font-size:.66rem; } }
@media (max-height:520px) and (min-width:600px){ .hm-cad__load{ top:calc(62px + 1.5vh); } }
@media (prefers-reduced-motion: reduce){ .hm-cad__dots i{ animation:none; opacity:1; } }
