/* =========================================================
   Motorline s.r.l. — mobile first
   Idea: il sito come una scheda di misura d'officina.
   Linee di quota, righelli, cartiglio. Il rosso è il segno
   di vernice che si mette sul bullone serrato.
   ========================================================= */
:root {
  --ink: #121212;
  --ink-2: #1c1c1c;
  --paper: #ebe9e3;
  --paper-2: #f5f4f0;
  --line: rgba(18, 18, 18, .16);
  --line-dark: rgba(255, 255, 255, .14);
  --muted: #6b6a66;
  --muted-dark: #9c9b96;
  --red: #d7141a;
  --wa: #25d366;

  --f: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --gut: 20px;
  --dock-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: calc(var(--dock-h) + var(--safe-b) + 16px);
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
.wrap { padding-inline: var(--gut); max-width: 1240px; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Titoli: condensato, corsivo e pesante come il logo */
.display, h1, h2 {
  font-family: var(--f);
  font-stretch: 62%;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.01em;
  margin: 0;
}
h1 { font-size: clamp(56px, 17vw, 132px); }
h2 { font-size: clamp(44px, 12vw, 96px); }
h3 { font-stretch: 75%; font-weight: 700; font-size: 24px; line-height: 1.1; margin: 0 0 .3em; }

.mono, .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.label { color: var(--muted); display: block; }
.on-ink .label { color: var(--muted-dark); }
.red { color: var(--red); }

/* Numero di sezione, come il riferimento di un foglio */
.sheet {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.sheet::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.sheet b { color: var(--red); font-weight: 600; }
.on-ink .sheet { color: var(--muted-dark); }

/* Linea di quota |<——>| */
.dim {
  position: relative; display: block; height: 14px; margin: 10px 0 0;
  border-inline: 1.5px solid currentColor;
}
.dim::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor;
}
.dim span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--bg, var(--paper)); padding: 0 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; white-space: nowrap;
}

/* ---------- Barra in alto: solo logo ---------- */
.top {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gut);
}
.top .logo img { height: 40px; width: auto; }
.top nav { display: none; }
.top .tel { font-family: var(--mono); font-size: 12px; color: var(--muted-dark); text-decoration: none; letter-spacing: .04em; }

/* ---------- Dock in basso (pollice) ---------- */
.dock {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  height: calc(var(--dock-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(18, 18, 18, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-dark);
}
.dock a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: #d8d7d2; text-decoration: none;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
}
.dock svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.dock a:active { color: #fff; background: rgba(255,255,255,.05); }
.dock a[aria-current] { color: #fff; }
.dock a[aria-current] svg { stroke: var(--red); }
.dock .wa svg { stroke: var(--wa); }
/* Preventivo: pulsante centrale rialzato, a forma di cartellino */
.dock .quote { color: #fff; justify-content: flex-end; padding-bottom: 9px; position: relative; }
.dock .quote-tag {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  width: 58px; height: 50px; display: grid; place-items: center;
  background: var(--red); border-radius: 6px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  padding-left: 8px;
  box-shadow: 0 8px 18px rgba(215,20,26,.45);
}
.dock .quote-tag::before {
  content: ''; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--ink);
}
.dock .quote svg { stroke: #fff; width: 22px; height: 22px; }

/* ---------- HERO ---------- */
.hero {
  background: var(--ink); color: #fff;
  padding-top: 76px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.hero-left { display: contents; }
.hero-text { order: 1; }
.hero-figure { order: 3; }
.tag-wrap { order: 2; }
.hero-text { padding: 18px var(--gut) 8px; }
.hero h1 .q { position: relative; display: inline-block; color: var(--red); }
.hero-sub { color: #c9c8c3; font-size: 17px; max-width: 30em; margin: 22px 0 0; }
.hero-figure { margin: 22px 0 0; position: relative; --bg: var(--ink); }
.hero-figure svg { width: 100%; height: auto; display: block; }
.hero-figure .ann-box { fill: var(--ink); }
.hero-figure .ann-t { font: italic 800 38px var(--f); font-stretch: 62%; fill: #fff; text-transform: uppercase; }
.hero-figure .ann-s { font: 400 24px var(--mono); fill: #d2d1cb; }
.hero-figure .ann-n { font: 600 21px var(--mono); fill: var(--red); }
.hero-figure .ann-line { stroke: var(--red); stroke-width: 3; fill: none; }
.hero-figure .ann-dot { fill: var(--red); }
.hero-figure .ann-ring { fill: none; stroke: var(--red); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.ann { opacity: 0; animation: ann-in .6s ease-out forwards; }
.ann:nth-of-type(2) { animation-delay: .25s; }
.ann:nth-of-type(3) { animation-delay: .5s; }
.ann:nth-of-type(4) { animation-delay: .75s; }
.ann:nth-of-type(5) { animation-delay: 1s; }
@keyframes ann-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cartellino preventivo ---------- */
.tag-wrap { padding: 30px var(--gut) 6px 34px; background: var(--ink); }
.tag-cta {
  --tag: var(--red);
  position: relative; display: flex; align-items: stretch;
  text-decoration: none; color: #fff;
  transform-origin: 18px 50%;
  transform: rotate(-2deg);
  animation: tag-swing 1.6s cubic-bezier(.3,.6,.3,1) .4s both;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
  -webkit-tap-highlight-color: transparent;
}
.tag-cta:active { transform: rotate(0deg) scale(.985); }
@keyframes tag-swing {
  0% { transform: rotate(-11deg); }
  35% { transform: rotate(4deg); }
  60% { transform: rotate(-4deg); }
  80% { transform: rotate(-1deg); }
  100% { transform: rotate(-2deg); }
}
.tag-body {
  flex: 1; min-width: 0;
  background: var(--tag);
  padding: 20px 18px 20px 52px;
  clip-path: polygon(30px 0, 100% 0, 100% 100%, 30px 100%, 0 50%);
  display: flex; flex-direction: column; gap: 8px;
}
.tag-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.tag-title {
  font-stretch: 62%; font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(40px, 11.5vw, 72px); line-height: .86; letter-spacing: -.01em;
}
.tag-foot { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; border-top: 1.5px dashed rgba(255,255,255,.5); padding-top: 10px; margin-top: 4px; }
.tag-stub {
  flex: none; width: 66px; background: var(--tag); position: relative;
  display: grid; place-items: center;
  border-left: 2px dashed rgba(0,0,0,.35);
  border-radius: 0 6px 6px 0;
}
.tag-stub svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2.2; transition: transform .25s; }
.tag-cta:hover .tag-stub svg { transform: translateX(4px); }
.tag-hole {
  position: absolute; left: 20px; top: 50%; width: 16px; height: 16px; margin-top: -8px; z-index: 2;
  border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #e9e7e1;
}
.tag-string {
  position: absolute; z-index: 3; left: -20px; top: calc(50% - 86px); width: 48px; height: 90px; overflow: visible;
}
.tag-string path { fill: none; stroke: #e9e7e1; stroke-width: 2.5; stroke-linecap: round; }
.tag-help { display: inline-block; margin-top: 22px; font-size: 14px; color: var(--muted-dark); text-decoration: none; border-bottom: 1px solid #4a4945; padding-bottom: 2px; }
.tag-help:hover { color: #fff; }

/* Campo codice: grande, da pollice */
.code {
  padding: 26px var(--gut) 34px;
  background: var(--ink); color: #fff;
}
.code label { display: block; margin-bottom: 10px; }
.code-field {
  display: flex; align-items: stretch;
  border-bottom: 2px solid #fff;
}
.code-field input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: #fff;
  font-family: var(--mono); font-size: 20px; letter-spacing: .04em; text-transform: uppercase;
  padding: 14px 0; outline: none;
}
.code-field input::placeholder { color: #67665f; text-transform: none; letter-spacing: 0; }
.code-field button {
  border: 0; background: none; color: #fff; padding: 0 0 0 16px; cursor: pointer;
  display: flex; align-items: center;
}
.code-field button svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.code-field:focus-within { border-color: var(--red); }
.code small { display: block; margin-top: 12px; color: var(--muted-dark); font-size: 14px; }
.code small a { color: #fff; }

/* ---------- Sezioni ---------- */
.sec { padding: 72px 0; }
.sec-intro { font-size: 18px; color: #3d3c39; max-width: 34em; margin-top: 20px; }
.on-ink { background: var(--ink); color: #fff; --bg: var(--ink); }
.on-ink .sec-intro { color: #c9c8c3; }

/* Processo lungo un righello */
.ruler { list-style: none; margin: 40px 0 0; padding: 0 0 0 46px; position: relative; counter-reset: s; }
.ruler::before {
  /* tacche ogni 8px, tacca lunga ogni 40px */
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 22px;
  background:
    repeating-linear-gradient(to bottom, var(--ink) 0 1.5px, transparent 1.5px 40px) left / 22px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 8px) left / 11px 100% no-repeat;
  border-left: 1.5px solid var(--ink);
  opacity: .55;
}
.ruler li { position: relative; padding: 0 0 34px; counter-increment: s; }
.ruler li:last-child { padding-bottom: 0; }
.ruler li::before {
  content: '0' counter(s); position: absolute; left: -46px; top: 2px;
  width: 30px; height: 22px; display: grid; place-items: center;
  background: var(--paper); color: var(--red);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.ruler h3 { font-size: 26px; }
.ruler p { margin: 0; color: #4a4945; }

/* ---------- Scaffale motori (swipe) ---------- */
.rack-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.rack-count { font-family: var(--mono); font-size: 13px; color: var(--muted-dark); white-space: nowrap; }
.rack-count b { color: #fff; font-weight: 600; }
.rack {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 30px var(--gut) 8px; margin-top: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-padding-inline: var(--gut);
}
.rack::-webkit-scrollbar { display: none; }
.eng {
  position: relative; flex: 0 0 78vw; max-width: 360px; scroll-snap-align: start;
  background: #fff; overflow: hidden; margin: 0;
}
.eng img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.eng figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: end; gap: 10px;
  padding: 48px 14px 14px;
  background: linear-gradient(to top, rgba(18,18,18,.92), rgba(18,18,18,0));
  color: #fff;
}
.eng .ref { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.eng .ref small { display: block; font-weight: 400; color: #c9c8c3; letter-spacing: .02em; text-transform: none; font-size: 12px; margin-top: 2px; }
.eng .ask {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none; color: #fff; border-bottom: 2px solid var(--red); padding-bottom: 2px; white-space: nowrap;
}
.eng .zoom { position: absolute; inset: 0 0 60px; border: 0; background: none; cursor: zoom-in; }
/* Righello di scorrimento: una tacca per motore */
.scrub { display: flex; gap: 0; padding: 18px var(--gut) 0; height: 44px; align-items: end; }
.scrub button {
  flex: 1; height: 26px; border: 0; background: none; padding: 0; cursor: pointer; position: relative;
}
.scrub button::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 1.5px; height: 10px; background: #5f5e59; transition: height .2s, background .2s;
}
.scrub button[aria-current="true"]::after { height: 24px; background: var(--red); width: 3px; }
.scrub-line { height: 1.5px; background: #5f5e59; margin: 0 var(--gut); }

/* ---------- Reparti ---------- */
.dept { border-top: 1.5px solid var(--ink); }
.dept:last-of-type { border-bottom: 1.5px solid var(--ink); }
.dept summary {
  list-style: none; cursor: pointer; padding: 22px 0 18px;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px;
}
.dept summary::-webkit-details-marker { display: none; }
.dept summary .display { font-size: clamp(46px, 13vw, 104px); }
.dept summary .label { grid-column: 1 / -1; order: -1; }
.dept .plus {
  width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 6px; transition: transform .25s, background .25s;
}
.dept .plus svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; }
.dept[open] .plus { transform: rotate(45deg); background: var(--ink); color: #fff; }
.ops { list-style: none; margin: 0; padding: 0 0 26px; }
.ops li {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 14px 0; border-top: 1px dashed var(--line);
}
.ops strong { font-weight: 700; font-stretch: 85%; font-size: 19px; }
.ops span { font-size: 15px; color: var(--muted); }
.dept .go {
  display: inline-block; margin: 0 0 28px; font-family: var(--mono); font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 3px;
}

/* ---------- Completo / semicompleto ---------- */
.switch {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 34px;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px; position: relative;
}
.switch button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 12px 8px; border-radius: 999px;
  font-stretch: 75%; font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .02em;
  transition: color .25s;
}
.switch button[aria-pressed="true"] { color: #fff; }
.switch .knob {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  background: var(--ink); border-radius: 999px; transition: transform .3s cubic-bezier(.3,.7,.2,1);
}
.switch[data-v="completo"] .knob { transform: translateX(100%); }
.parts { list-style: none; margin: 24px 0 0; padding: 0; }
.parts li {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
  transition: opacity .3s;
}
.parts .st {
  flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border: 1.5px solid currentColor; border-radius: 3px;
}
.parts li.in .st { color: var(--red); }
.parts li.out { opacity: .38; }
.parts li.out .st { border-style: dashed; }
.parts-note { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 34px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-stretch: 85%; font-weight: 700; font-size: 20px; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details > p { color: #3d3c39; padding-bottom: 20px; margin: 0; max-width: 40em; }

/* ---------- Contatti ---------- */
.call {
  display: block; text-decoration: none; margin-top: 30px;
  font-family: var(--mono); font-size: clamp(28px, 8.4vw, 56px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
}
.call small { display: block; font-size: 12px; letter-spacing: .08em; color: var(--muted-dark); font-weight: 400; margin-bottom: 8px; }
.links { margin-top: 26px; display: grid; gap: 0; }
.links a, .links div {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line-dark); text-decoration: none; font-size: 17px;
}
.links a::after { content: '→'; color: var(--red); font-family: var(--mono); }
.links .label { margin: 0; }
.stars { color: #f2b500; letter-spacing: 1px; margin-right: 4px; }
.hours { margin: 0; width: 100%; }
.hours div { display: flex; justify-content: space-between; padding: 4px 0; border: 0 !important; }
.hours dt { color: var(--muted-dark); }
.hours dd { margin: 0; font-family: var(--mono); font-size: 14px; }

/* ---------- Cartiglio (footer) ---------- */
.cartiglio {
  margin: 0 var(--gut) 24px; border: 1.5px solid var(--ink); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; font-size: 14px;
}
.cartiglio > div {
  padding: 10px 12px; min-width: 0;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  margin: 0 -1px -1px 0;
}
.cartiglio .wide { grid-column: 1 / -1; display: flex; align-items: center; background: var(--ink); color: #fff; }
.cartiglio .wide img { height: 38px; width: auto; }
.cartiglio .label { font-size: 10px; margin-bottom: 2px; }
.cartiglio b { font-weight: 600; overflow-wrap: anywhere; }
.cartiglio a { text-decoration: none; }

/* ---------- Pagine interne ---------- */
.page-top { background: var(--ink); color: #fff; padding: 84px 0 40px; }
.crumb { font-family: var(--mono); font-size: 12px; color: var(--muted-dark); margin-bottom: 26px; }
.crumb a { color: #fff; text-decoration: none; }
.page-top h1 { font-size: clamp(48px, 13vw, 112px); }
.page-top .lead { color: #c9c8c3; font-size: 18px; margin: 22px 0 0; max-width: 34em; }

.article { padding-top: 48px; }
.article h2 { font-size: clamp(38px, 10vw, 72px); margin: 64px 0 18px; }
.article > p, .article .p { font-size: 18px; color: #2d2c29; max-width: 36em; }

.diagram { margin: 30px calc(var(--gut) * -1) 0; background: var(--paper-2); padding: 20px var(--gut); border-block: 1px solid var(--line); }
.diagram svg { width: 100%; height: auto; display: block; max-width: 760px; margin: 0 auto; }
.diagram figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; max-width: 760px; margin-inline: auto; }

/* Righe marca con il codice quotato */
.brand-row { padding: 26px 0; border-top: 1.5px solid var(--ink); }
.brand-row:last-of-type { border-bottom: 1.5px solid var(--ink); }
.brand-row h3 { font-stretch: 62%; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: 1; margin-bottom: 16px; }
.codes { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-bottom: 14px; }
.cq { display: inline-flex; gap: 6px; font-family: var(--mono); font-size: clamp(20px, 6vw, 28px); font-weight: 600; letter-spacing: .02em; }
.cq > span { display: flex; flex-direction: column; align-items: stretch; }
.cq > span > i {
  font-style: normal; position: relative; height: 12px; margin-top: 6px;
  border-inline: 1.5px solid var(--red);
}
.cq > span > i::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--red); }
.cq > span > em {
  font-style: normal; font-weight: 400; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  text-align: center; margin-top: 4px; white-space: nowrap;
}
.cq .sep { color: var(--muted); }
.brand-row p { margin: 0; color: #3d3c39; font-size: 16px; max-width: 36em; }

.check { margin-top: 26px; }
.check .code { margin: 0 calc(var(--gut) * -1); }
.check-out { font-family: var(--mono); font-size: 13px; color: var(--muted-dark); margin: 12px 0 0; min-height: 1.5em; }
.check-out.ok { color: #6fe39d; }

/* Azioni testuali (niente pulsantoni) */
.actions { margin-top: 36px; border-top: 1.5px solid var(--ink); }
.actions a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  font-stretch: 75%; font-weight: 700; font-size: 24px; text-transform: uppercase;
}
.actions a small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .05em; text-transform: none; font-stretch: 100%; margin-top: 2px; }
.actions a svg { width: 26px; height: 26px; flex: none; stroke: var(--red); fill: none; stroke-width: 1.8; }
.actions a.wa svg { stroke: #18a84f; }

/* ---------- Preventivo a passaggi ---------- */
.steps-bar { display: flex; gap: 6px; margin: 0 0 6px; }
.steps-bar span { flex: 1; height: 4px; background: rgba(255,255,255,.18); }
.steps-bar span.on { background: var(--red); }
.q-form { padding-block: 34px 20px; }
.q-step { display: none; }
.q-step.on { display: block; animation: ann-in .35s ease-out; }
.q-step h2 { font-size: clamp(40px, 11vw, 72px); margin-bottom: 8px; }
.q-step .hint { color: var(--muted); margin-bottom: 26px; }
.pick { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.pick label {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.pick label b { display: block; font-stretch: 75%; font-weight: 700; font-size: 26px; text-transform: uppercase; line-height: 1; }
.pick label small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .dot { flex: none; width: 24px; height: 24px; border: 1.5px solid var(--ink); border-radius: 50%; position: relative; }
.pick label:has(input:checked) .dot::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--red); }
.pick label:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: -2px; }
.fld { display: block; margin-bottom: 22px; }
.fld .label { margin-bottom: 4px; }
.fld input, .fld textarea {
  width: 100%; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; border-radius: 0;
  font: inherit; font-size: 20px; padding: 10px 0; color: var(--ink); outline: none;
}
.fld textarea { min-height: 90px; resize: vertical; font-size: 17px; }
.fld input:focus, .fld textarea:focus { border-color: var(--red); }
.fld .upper { font-family: var(--mono); text-transform: uppercase; letter-spacing: .03em; }
.consent { display: flex; gap: 12px; font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.consent input { width: 20px; height: 20px; accent-color: var(--red); flex: none; margin-top: 1px; }
.q-err { color: var(--red); font-size: 14px; min-height: 1.4em; margin: 10px 0 0; }

.q-nav {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  padding: 10px var(--gut) calc(10px + var(--safe-b));
  background: var(--paper); border-top: 1px solid var(--line);
  display: flex; gap: 10px;
}
.q-nav button {
  border: 1.5px solid var(--ink); background: transparent; cursor: pointer;
  height: 54px; padding: 0 18px; border-radius: 999px;
  font-stretch: 75%; font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .02em;
}
.q-nav .next { flex: 1; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; }
.q-nav .next.send { background: #18a84f; border-color: #18a84f; }
.q-nav .next svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.q-nav .back[hidden] { display: none; }
.q-alt { font-size: 14px; color: var(--muted); text-align: center; margin-top: 18px; }
.q-alt a { color: var(--ink); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(10,10,10,.92); }
.lightbox img { max-width: 100vw; max-height: 86vh; object-fit: contain; }
.lb-close {
  position: fixed; top: 14px; right: 14px; width: 46px; height: 46px; border: 1.5px solid #fff; border-radius: 50%;
  background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}

/* =========================================================
   Da tablet in su
   ========================================================= */
@media (min-width: 760px) {
  :root { --gut: 40px; }
  .eng { flex-basis: 300px; }
  .ops { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .cartiglio { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .cartiglio .wide { grid-column: 1; grid-row: span 2; justify-content: center; }
  .cartiglio .wide img { height: 54px; }
}

/* Desktop: la dock diventa una pillola centrata, in alto compare il menu testuale */
@media (min-width: 1000px) {
  body { font-size: 18px; padding-bottom: 104px; }
  .top { padding-block: 22px; }
  .top .logo img { height: 52px; }
  .top nav { display: flex; gap: 30px; }
  .top nav a {
    font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
    color: #d8d7d2; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
  }
  .top nav a:hover, .top nav a[aria-current] { color: #fff; border-color: var(--red); }
  .top .tel { display: none; }

  .dock {
    left: 50%; right: auto; bottom: 22px; transform: translateX(-50%);
    width: 440px; height: 62px; padding: 0; border-radius: 999px;
    border: 1px solid var(--line-dark); box-shadow: 0 14px 40px rgba(0,0,0,.28);
  }
  .dock a { flex-direction: row; gap: 8px; font-size: 11px; }
  .dock svg { width: 20px; height: 20px; }
  .dock .hide-lg { display: none; }
  .dock { grid-template-columns: 1.3fr 1fr 1fr; width: 480px; }
  .dock .quote { background: var(--red); border-radius: 999px 0 0 999px; padding-bottom: 0; justify-content: center; }
  .dock .quote-tag { position: static; transform: none; width: auto; height: auto; background: none; clip-path: none; padding: 0; box-shadow: none; }
  .dock .quote-tag::before { display: none; }

  .hero { padding-top: 0; min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
  .hero-left { display: flex; order: 0; flex-direction: column; justify-content: center; padding: 120px 0 60px; }
  .hero-text { padding: 0 var(--gut) 0 max(var(--gut), calc((100vw - 1240px) / 2 + var(--gut))); }
  .hero-figure { margin: 0; display: flex; align-items: center; justify-content: center; padding: 100px 40px 40px 0; }
  .hero-figure svg { max-height: calc(100vh - 140px); width: auto; max-width: 100%; }
  .hero h1 { font-size: clamp(64px, 7.4vw, 108px); }
  .hero-sub { margin-top: 18px; }
  .hero-left { padding-top: 104px !important; padding-bottom: 110px !important; }
  .tag-title { font-size: clamp(44px, 4.2vw, 60px); }
  .tag-wrap { padding: 34px var(--gut) 0 calc(max(var(--gut), calc((100vw - 1240px) / 2 + var(--gut))) + 14px); max-width: 640px; background: none; }

  .sec { padding: 120px 0; }
  .split { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .split > :first-child { position: sticky; top: 64px; }
  .ruler { margin-top: 0; }
  .ruler h3 { font-size: 30px; }

  .rack { padding-inline: max(var(--gut), calc((100vw - 1240px) / 2 + var(--gut))); scroll-padding-inline: max(var(--gut), calc((100vw - 1240px) / 2 + var(--gut))); }
  .scrub { max-width: 1240px; margin: 0 auto; }
  .scrub-line { max-width: calc(1240px - 2 * var(--gut)); margin: 0 auto; }

  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }

  .article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 80px; }
  .article-main { min-width: 0; }
  .toc { position: sticky; top: 64px; align-self: start; margin-top: 64px; border-left: 2px solid var(--red); padding-left: 18px; }
  .toc a { display: block; text-decoration: none; padding: 6px 0; font-size: 15px; }
  .toc a:hover { color: var(--red); }
  .diagram { margin-inline: 0; border: 1px solid var(--line); }

  .q-wrap { max-width: 680px; }
  .q-nav { position: static; background: none; border: 0; padding: 30px 0 0; }
}
@media (max-width: 999px) { .toc { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ann { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- Calibro a corsoio: avanzamento della pagina ----------
   Il becco mobile scorre con la pagina; il nonio legge da 0 a 150 mm.
   Le tacche rosse sono le sezioni: toccandole ci si salta. */
.cal {
  --steel: #d6d4cd; --steel-2: #b9b7af;
  --cal-h: 30px; --cal-l: 26px; --jaw: 13px;
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--ink);
  transform: translateY(calc(-100% - var(--jaw) - 2px));
  transition: transform .28s ease;
  font-family: var(--mono);
  user-select: none; -webkit-user-select: none;
}
.cal.on { transform: none; }
.cal-beam { position: relative; height: var(--cal-h); }
.cal-scale { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cal-scale line { stroke: #8f8e88; stroke-width: 1; shape-rendering: crispEdges; }
.cal-scale text { fill: #8f8e88; font-size: 8.5px; font-family: var(--mono); }

/* becco fisso */
.cal-fixed {
  position: absolute; left: 0; top: 0; width: var(--cal-l); height: calc(var(--cal-h) + var(--jaw));
  background: var(--steel);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 55% 100%, 0 var(--cal-h));
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.35));
}
/* cursore con becco mobile */
.cal-slider {
  position: absolute; left: 0; top: 0; height: var(--cal-h);
  display: flex; align-items: stretch;
  touch-action: none; cursor: grab; will-change: transform;
}
.cal-slider:active { cursor: grabbing; }
.cal-jaw {
  width: 14px; height: calc(var(--cal-h) + var(--jaw)); background: var(--steel);
  clip-path: polygon(0 0, 100% 0, 100% var(--cal-h), 45% 100%, 0 100%);
}
.cal-win {
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 4px;
  background: var(--steel); color: var(--ink); white-space: nowrap;
  position: relative;
}
/* nonio: tacche fini sul bordo basso del cursore */
.cal-win::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: repeating-linear-gradient(90deg, #6d6c67 0 1px, transparent 1px 4.6px);
}
.cal-read { font-weight: 600; font-size: 13px; letter-spacing: .02em; font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; }
.cal-read small { font-size: 9px; font-weight: 400; margin-left: 2px; }
.cal-lbl {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em;
  border-left: 1px solid var(--steel-2); padding-left: 6px; max-width: 13ch; overflow: hidden; text-overflow: ellipsis;
}
.cal-grip {
  width: 14px;
  background: repeating-linear-gradient(90deg, var(--red) 0 2px, #9e0e12 2px 3.5px);
}
/* tacche delle sezioni */
.cal-marks button {
  position: absolute; top: 0; height: var(--cal-h); width: 28px; margin-left: -14px;
  border: 0; padding: 0; background: none; cursor: pointer;
}
.cal-marks button::before {
  content: ""; position: absolute; left: 50%; top: 0; margin-left: -4px;
  border: 4px solid transparent; border-top: 6px solid var(--red);
}
.cal-marks button::after {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(215,20,26,.55);
}
@media (min-width: 760px) {
  .cal { --cal-h: 32px; --cal-l: 34px; --jaw: 15px; }
  .cal-read { font-size: 14px; }
  .cal-lbl { font-size: 10px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cal { transition: none; }
}
/* le ancore non finiscono sotto il calibro */
[id] { scroll-margin-top: 52px; }

/* Schermi larghi: il cartellino non si stringe, l'apertura sta tutta nel primo schermo
   e la foto finisce sopra la barra in basso. */
@media (min-width: 1000px) {
  .tag-wrap { max-width: none; padding-top: 26px; padding-right: var(--gut); }
  .tag-wrap > * { max-width: 540px; }
  .hero h1 { font-size: clamp(56px, min(6.6vw, 10.5vh), 108px); }
  .hero-left { padding-top: 92px !important; padding-bottom: 100px !important; }
  .hero-figure { align-items: flex-start; padding: 92px 40px 100px 0; }
  .hero-figure svg { max-height: calc(100vh - 192px); }
}

/* ---------- Chi siamo ---------- */
.story p { font-size: 18px; color: #2d2c29; max-width: 34em; margin: 0 0 18px; }

/* Due nomi alle estremità di una linea di quota: dalla fondazione a oggi */
.span {
  margin: 34px 0 34px; display: grid; grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--ink); background: var(--paper-2);
}
.span-end { padding: 14px 14px 12px; min-width: 0; }
.span-end + .span-end { border-left: 1.5px solid var(--ink); text-align: right; }
.span-end b {
  display: block; font-style: italic; font-weight: 800; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(24px, 7vw, 34px); line-height: .95; margin-top: 6px;
}
.span-end small { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.span-dim {
  grid-column: 1 / -1; position: relative; display: flex; align-items: center;
  height: 44px; padding: 0 14px; border-top: 1px dashed var(--line);
}
.span-dim::before { content: ''; position: absolute; left: 14px; right: 14px; top: 50%; height: 1.5px; background: var(--red); }
.span-dim i { position: relative; width: 0; height: 0; border: 6px solid transparent; }
.span-dim i:first-child { border-right: 10px solid var(--red); border-left: 0; }
.span-dim i:last-child { border-left: 10px solid var(--red); border-right: 0; margin-left: auto; }
.span-dim span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--paper-2); padding: 2px 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--red); white-space: nowrap;
}

/* Elenco forniture: righe numerate come una distinta */
.supply { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1.5px solid var(--ink); }
.supply li { counter-increment: s; border-bottom: 1px solid var(--line); }
.supply a, .supply span {
  display: flex; align-items: baseline; gap: 16px; padding: 16px 0; text-decoration: none;
  font-style: italic; font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: clamp(28px, 8vw, 40px); line-height: 1;
}
.supply a::before, .supply span::before {
  content: counter(s, decimal-leading-zero); font-family: var(--mono); font-style: normal; font-weight: 400;
  font-size: 12px; color: var(--red); letter-spacing: .05em; font-stretch: 100%;
}
.supply a::after { content: '→'; margin-left: auto; font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 16px; color: var(--red); }
.supply a:hover { color: var(--red); }

/* Clienti */
.clients { margin: 26px 0 0; border-top: 1px solid var(--line-dark); }
.clients div { padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
.clients dt {
  font-style: italic; font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: clamp(26px, 7.5vw, 36px); line-height: 1;
}
.clients dd { margin: 6px 0 0; font-family: var(--mono); font-size: 13px; color: #b5b4ae; }
@media (min-width: 760px) {
  .clients div { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: baseline; }
  .clients dd { margin: 0; }
}
/* Portatili bassi (1366x768: ~650 px utili): cartellino più compatto, sopra la barra */
@media (min-width: 1000px) and (max-height: 760px) {
  .hero h1 { font-size: clamp(52px, 9.6vh, 100px); }
  .hero-sub { font-size: 16px; margin-top: 12px; }
  .tag-wrap { padding-top: 18px; }
  .tag-title { font-size: clamp(34px, 6.2vh, 60px); }
  .tag-kicker { display: none; }
}

/* Scaffale che scorre da solo: da bordo a bordo, senza aggancio mentre si muove.
   Appena lo tocchi torna l'aggancio alle schede. */
.rack { padding-inline: 0 !important; scroll-padding-inline: var(--gut) !important; }
.rack.auto { scroll-snap-type: none; }
.rack.auto .eng { scroll-snap-align: none; }

/* Apertura: tre prodotti grandi, sotto la riga rossa "nuovi e revisionati" */
.hero h1 .q { display: block; font-size: .42em; line-height: 1; margin-top: .3em; letter-spacing: .01em; }

/* Preventivo: scelte brevi in fila (tipo di cambio, marce, nuovo/revisionato) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.seg label { position: relative; flex: 1 1 0; min-width: 64px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px;
  border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper-2);
  font-family: var(--mono); font-size: 14px; letter-spacing: .03em; cursor: pointer; text-align: center;
}
.seg input:checked + span { background: var(--ink); color: #fff; box-shadow: inset 0 -4px 0 var(--red); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
@media (min-width: 1000px) and (max-height: 760px) {
  .hero h1 { font-size: clamp(48px, 8.4vh, 100px); }
  .hero h1 .q { margin-top: .2em; }
  .hero-left { padding-top: 84px !important; }
}

/* Telefono e tablet: logo al centro e più grande */
@media (max-width: 999px) {
  .top { justify-content: center; padding-top: 18px; }
  .top .logo img { height: 62px; }
  .hero { padding-top: 100px; }
  .page-top { padding-top: 108px; }
}

/* Privacy e cookie: testo da leggere, titoli più piccoli degli articoli */
.legal .article-main { font-size: 17px; line-height: 1.6; color: #2d2c29; }
.legal .article-main p, .legal .article-main ul { max-width: 40em; }
.legal h2 { font-size: clamp(30px, 8vw, 44px); margin: 48px 0 14px; }
.legal h3 { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--red); margin: 22px 0 6px; }
.legal ul { padding-left: 1.1em; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--red); }
.legal .article-main a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
.legal-date { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.consent a { color: inherit; text-decoration-color: var(--red); }

/* ---------- Timbro VENDUTO (scaffale e scheda) ----------
   Un timbro a inchiostro rosso, storto, un po' consumato. */
.stamp {
  position: absolute; left: 50%; top: 42%; z-index: 2; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-14deg);
  padding: 6px 14px 4px; border: 4px solid var(--red); border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), inset 0 0 0 4px var(--red);
  color: var(--red); background: rgba(255,255,255,.78);
  font-family: var(--f); font-style: italic; font-weight: 800; font-stretch: 62%;
  font-size: 40px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.5 1.75'/%3E%3C/filter%3E%3Crect width='160' height='80' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.5 1.75'/%3E%3C/filter%3E%3Crect width='160' height='80' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp.big { font-size: clamp(48px, 14vw, 84px); border-width: 6px; padding: 8px 22px 6px; display: none; }
.eng.sold img { filter: grayscale(.85) contrast(.95); }
.eng .zoom { cursor: pointer; }

/* ---------- Scheda del motore ---------- */
.esheet {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  background: var(--ink); color: #fff; overscroll-behavior: contain;
}
.esheet::backdrop { background: rgba(10,10,10,.85); }
.esheet[open] { animation: es-in .28s ease-out; }
@keyframes es-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.es-in { min-height: 100%; display: flex; flex-direction: column; }
.es-close {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.8);
  background: rgba(18,18,18,.6); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.es-photo { margin: 0; position: relative; background: #fff; display: flex; justify-content: center; }
.es-photo img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.esheet.is-sold .stamp.big { display: block; }
.esheet.is-sold .es-photo img { filter: grayscale(.85); }
.es-zoom {
  position: absolute; right: 12px; bottom: 12px; border: 0; border-radius: 3px; cursor: zoom-in;
  background: rgba(18,18,18,.75); color: #fff; font: 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px;
}

/* il cartellino: carta, foro col rinforzo, righe come una scheda d'officina */
.es-tag {
  position: relative; flex: 1; background: var(--paper); color: var(--ink);
  padding: 30px var(--gut) calc(26px + env(safe-area-inset-bottom, 0px));
}
.es-hole {
  position: absolute; top: 14px; right: 22px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 5px #d8d6cf;
}
.es-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.es-ref { font-style: italic; font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: 54px; line-height: .95; margin: 6px 0 14px; }
.es-data { margin: 0 0 20px; border-top: 1.5px solid var(--ink); }
.es-data div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed #b9b7af; }
.es-data dt { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.es-data dd { margin: 0; font-weight: 600; text-align: right; }
.esheet.is-sold .es-data div:last-child dd { color: var(--red); }
.es-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.es-wa, .es-share {
  display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 18px; border-radius: 3px;
  font: 600 14px var(--mono); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.es-wa { background: #1f9d55; color: #fff; }
.esheet.is-sold .es-wa { background: var(--red); }
.es-share { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.es-note { font-family: var(--mono); font-size: 12px; color: var(--muted); min-height: 1.4em; margin: 10px 0 0; word-break: break-all; }
.es-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #cfcdc6; }
.es-nav button { border: 0; background: none; font: 600 14px var(--mono); color: var(--ink); padding: 10px 0; cursor: pointer; }
.es-pos { font-family: var(--mono); font-size: 12px; color: var(--muted); }

@media (min-width: 900px) {
  .esheet { width: min(980px, calc(100% - 80px)); height: auto; max-height: calc(100% - 80px); margin: auto; }
  .es-in { flex-direction: row; min-height: 0; }
  .es-photo { flex: 0 0 52%; align-items: center; }
  .es-photo img { max-height: calc(100vh - 80px); }
  .es-tag { padding: 44px 40px 30px; display: flex; flex-direction: column; }
  .es-nav { margin-top: auto; }
  .es-close { position: absolute; }
  .es-ref { font-size: 72px; }
  .es-hole { right: auto; left: 40px; top: 16px; }
  .es-kicker { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .esheet[open] { animation: none; } }

/* Scaffale trascinabile col mouse */
@media (hover: hover) and (pointer: fine) {
  .rack { cursor: grab; }
  .rack .eng .zoom { cursor: grab; }
  .rack.dragging, .rack.dragging .zoom { cursor: grabbing; }
}
.rack.dragging { scroll-snap-type: none; user-select: none; }
.rack.dragging .eng { scroll-snap-align: none; }

/* ---------- Pagina del singolo motore (/motore/...) ---------- */
.mp-top { padding-bottom: 28px; }
.mp-top h1 { font-size: clamp(40px, 11vw, 88px); }
.mp { background: var(--paper); }
.mp-grid { display: grid; }
.mp-photo img { max-height: 78vh; }
.mp.is-sold .stamp.big { display: block; }
.mp.is-sold .es-photo img { filter: grayscale(.85); }
.mp.is-sold .es-wa { background: var(--red); }
.mp.is-sold .es-data div:last-child dd { color: var(--red); }
.mp-tag { padding-bottom: 30px; }
.mp-more-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #cfcdc6; }
.mp-more-actions a { font: 600 13px var(--mono); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.mp-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mp-list a { display: block; position: relative; text-decoration: none; color: #fff; background: #fff; }
.mp-list img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.mp-list .ref {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 10px 10px;
  background: linear-gradient(to top, rgba(18,18,18,.92), rgba(18,18,18,0));
  font: 600 12px var(--mono); letter-spacing: .05em;
}
.mp-list .ref small { display: block; font-weight: 400; color: #c9c8c3; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-all { font: 600 14px var(--mono); color: #fff; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
@media (min-width: 900px) {
  .mp-grid { grid-template-columns: 1.15fr .85fr; max-width: 1240px; margin: 0 auto; padding: 40px var(--gut); gap: 0; align-items: start; }
  .mp-photo { position: sticky; top: 64px; }
  .mp-tag { padding: 44px 40px 34px; }
  .mp-tag .es-hole { right: auto; left: 40px; top: 16px; }
  .mp-tag .es-kicker { margin-top: 10px; }
  .mp-tag .es-ref { font-size: 72px; }
  .mp-list { grid-template-columns: repeat(4, 1fr); }
}
.es-page { display: inline-block; margin-top: 6px; font: 600 13px var(--mono); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.story-link a { font: 600 14px var(--mono); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }

/* ---------- Menu a scomparsa (telefono e tablet) ---------- */
.burger { display: none; }
@media (max-width: 999px) {
  .top { justify-content: space-between; align-items: center; padding-top: 16px; }
  .top .logo img { height: 62px; }
  .burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 50px; height: 50px; padding: 0 12px; border: 1.5px solid rgba(255,255,255,.55); border-radius: 3px;
    background: transparent; cursor: pointer;
  }
  .burger span { display: block; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .top.open .burger { border-color: var(--red); }
  .top.open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .top.open .burger span:nth-child(2) { opacity: 0; }
  .top.open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .top nav {
    display: none; position: absolute; top: calc(100% - 4px); left: var(--gut); right: var(--gut); z-index: 40;
    flex-direction: column; background: var(--ink); border: 1.5px solid #3a3a37; border-top: 3px solid var(--red);
    padding: 6px 18px 10px; counter-reset: voce; box-shadow: 0 18px 40px rgba(0,0,0,.45);
  }
  .top.open nav { display: flex; animation: menu-in .18s ease-out; }
  .top nav a {
    counter-increment: voce; display: flex; align-items: baseline; gap: 12px; padding: 13px 0;
    border-bottom: 1px solid #2e2e2b; color: #fff; text-decoration: none;
    font-style: italic; font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: 30px; line-height: 1;
  }
  .top nav a:last-child { border-bottom: 0; }
  .top nav a::before { content: counter(voce, decimal-leading-zero); font: 400 11px var(--mono); font-style: normal; color: var(--red); letter-spacing: .06em; }
  .top nav a[aria-current] { color: var(--red); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .top.open nav { animation: none; } }
.ops.parts-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; padding-bottom: 8px; }
.ops.parts-grid li { padding: 11px 0; }
.ops.parts-grid strong { font-size: 17px; }
@media (min-width: 760px) { .ops.parts-grid { grid-template-columns: repeat(3, 1fr); column-gap: 30px; } }
.seg.num { gap: 5px; }
.seg.num label { min-width: 0; }
.seg.num span { padding: 0; min-height: 46px; font-size: 15px; }

/* ---------- Galleria foto (scheda e pagina del motore) ---------- */
.gal { position: relative; width: 100%; background: #fff; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track img { flex: 0 0 100%; width: 100%; scroll-snap-align: center; object-fit: contain; max-height: 62vh; display: block; background: #fff; }
.mp .gal-track img { max-height: 78vh; }
.gal-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gal-dots button { pointer-events: auto; width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink); background: rgba(255,255,255,.9); cursor: pointer; }
.gal-dots button[aria-current="true"] { background: var(--red); border-color: var(--red); }
.gal-prev, .gal-next {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(18,18,18,.72); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: none;
}
.gal-prev { left: 10px; } .gal-next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .gal:not(.single) .gal-prev, .gal:not(.single) .gal-next { display: block; } }
.es-photo { flex-direction: column; }
.es-zoom { z-index: 2; bottom: 30px; }
.eng .nfoto { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(18,18,18,.78); color: #fff; font: 11px var(--mono); padding: 3px 7px; border-radius: 3px; pointer-events: none; }
.dept summary .display { min-width: 0; }
.dept .display.long { font-size: clamp(30px, 9.6vw, 72px); }

/* ---------- Scheda motore su telefono: una carta come su computer ----------
   Non più a tutto schermo: il fondo scuro resta visibile attorno, la X è dentro la carta
   e la barra per passare al motore accanto resta sempre in basso. */
@media (max-width: 899px) {
  .esheet {
    width: calc(100% - 20px); max-width: 520px; height: auto;
    max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: auto; background: transparent; overflow: visible;
  }
  .esheet[open] { animation: es-card-in .32s cubic-bezier(.2,.8,.2,1); }
  .es-in {
    min-height: 0; max-height: inherit; overflow-y: auto; overscroll-behavior: contain;
    background: var(--paper); border-top: 3px solid var(--red);
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
  }
  .es-close { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; font-size: 24px; }
  .esheet .gal-track img { max-height: 40vh; }
  .es-tag { padding: 22px 18px 0; flex: none; }
  .es-hole { top: 12px; right: 18px; width: 14px; height: 14px; box-shadow: 0 0 0 4px #d8d6cf; }
  .es-ref { font-size: 46px; margin: 4px 0 10px; }
  .es-data { margin-bottom: 16px; }
  .es-data div { padding: 9px 0; }
  .es-wa, .es-share { min-height: 50px; }
  .es-nav {
    position: sticky; bottom: 0; z-index: 2; margin: 12px -18px 0; padding: 6px 18px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--paper); border-top: 1px solid #cfcdc6;
  }
  .es-nav button { padding: 12px 4px; }
}
@keyframes es-card-in { from { opacity: 0; transform: translateY(28px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Pagina "Sullo scaffale" ---------- */
.shelf-top { padding-bottom: 30px; }
.shelf { padding-top: 26px; }
/* la barra di ricerca si attacca subito sotto il calibro: i becchi del calibro ci passano sopra, sotto non si vede niente */
.shelf-tools { display: grid; gap: 12px; margin-bottom: 20px; position: sticky; top: calc(30px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--paper); padding: 18px 0 10px; }
.shelf-search { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper-2); padding: 0 12px; }
.shelf-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; }
.shelf-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 17px var(--f); padding: 13px 0; outline: none; }
.shelf-search:focus-within { border-color: var(--red); }
.shelf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.shelf-chips button {
  font: 13px var(--mono); letter-spacing: .03em; padding: 9px 14px; border: 1.5px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.shelf-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--red); }
/* Telefono: i quattro filtri (Tutti, Nuovi, Revisionati, Usati) stanno su una riga */
@media (max-width: 400px) { .shelf-chips button { padding: 9px 10px; } }
.shelf-count { font: 12px var(--mono); color: var(--muted); letter-spacing: .04em; }
.shelf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shelf-grid .eng { flex: none; max-width: none; scroll-snap-align: none; }
.shelf-grid .eng[hidden] { display: none; }
.shelf-grid .eng img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.shelf-grid .eng figcaption { padding: 36px 10px 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
.shelf-grid .eng .ref small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.shelf-grid .eng .zoom { inset: 0 0 52px; cursor: pointer; }
.shelf-grid .eng .stamp { font-size: 30px; }
.shelf-empty { padding: 30px 0; }
.shelf-empty p { font-size: 17px; max-width: 34em; }
.btn-wa { display: inline-flex; align-items: center; min-height: 50px; padding: 0 20px; border-radius: 3px; background: #1f9d55; color: #fff; text-decoration: none; font: 600 14px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.on-ink .actions { border-top-color: #3a3a37; }
.on-ink .actions a { color: #fff; border-bottom-color: #2e2e2b; }
.on-ink .actions a small { color: #b5b4ae; }
.rack-more { margin: 22px var(--gut) 0; }
.rack-more a { font: 600 14px var(--mono); color: #fff; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
@media (min-width: 640px) {
  .shelf-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .shelf-tools { grid-template-columns: 1fr auto; align-items: center; }
  .shelf-count { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .shelf-grid { grid-template-columns: repeat(4, 1fr); }
  .shelf-grid .eng figcaption { flex-direction: row; align-items: end; }

}

@media (min-width: 760px) { .shelf-tools { top: calc(32px + env(safe-area-inset-top, 0px)); } }

/* firma di chi ha realizzato il sito, piccola e centrata in fondo */
.credit { margin: 0 var(--gut) 18px; text-align: center; font: 11px var(--mono); letter-spacing: .04em; color: var(--muted); }
.credit a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.credit a:hover { color: var(--ink); }
@media (min-width: 760px) { .credit { max-width: 1240px; margin-inline: auto; padding-inline: var(--gut); } }
