/* RERA SRLS. Light pages with navy header, footer and hero; one blue accent taken from the logo. Always light, whatever the system setting. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-var.woff2") format("woff2");
}

:root {
  /* Light pages; navy header, footer and hero band (see .site-header / .site-footer below). */
  --navy: rgb(19 34 60);
  --navy-alt: rgb(27 45 77);
  --surface-base: rgb(255 255 255);
  --surface-alt: rgb(240 242 246);
  --surface-raised: rgb(228 232 238);
  --photo-empty: rgb(226 230 236);
  /* Warehouse colours, sampled from photos of the building in Vermezzo con Zelo:
     the light blue of its steel panels (decoration only: too light for white text)
     and a pale wash of it for backgrounds; borders take the grey of its steel window frames. */
  --warehouse-blue: rgb(107 166 214);
  --warehouse-tint: rgb(234 242 250);
  --border: rgb(214 219 224);
  --text: rgb(22 28 38);
  --text-muted: rgb(92 99 110);
  /* The blue of the logo's first letter. */
  --accent: rgb(16 116 199);
  --accent-hover: rgb(11 92 160);
  --accent-soft: rgb(16 116 199 / 0.12);
  --on-accent: rgb(255 255 255);
  --ok: rgb(21 122 69);
  --ok-soft: rgb(21 122 69 / 0.1);
  --shadow: 0 12px 28px -14px rgb(19 34 60 / 0.28);
  /* Soft depth for cards: a tight contact shadow plus a wide, faint one; "lift" is the hover state. */
  --shadow-card: 0 1px 2px rgb(19 34 60 / 0.06), 0 8px 24px -12px rgb(19 34 60 / 0.18);
  --shadow-lift: 0 2px 4px rgb(19 34 60 / 0.06), 0 18px 36px -14px rgb(19 34 60 / 0.3);
  --radius: 10px;
  --radius-sm: 6px;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --container: 1120px;
  --gutter: 32px;
  --header-h: 72px;
  color-scheme: light;
}

/* Navy bands: header and footer redefine the colour tokens, so everything inside them turns light-on-navy. */
.site-header, .site-footer {
  --surface-base: var(--navy);
  --surface-alt: var(--navy-alt);
  --border: rgb(255 255 255 / 0.12);
  --text: rgb(255 255 255);
  --text-muted: rgb(196 204 216);
  color: var(--text);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  /* What shows when the page is pulled past its top or bottom (pull to refresh, rubber-band
     scrolling): navy like the header and footer instead of white. Html and body are both navy,
     because some phone browsers paint that area with the body colour; only <main> is white. */
  background: var(--navy);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}

::selection { background: var(--accent); color: var(--on-accent); }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 10px 14px; background: var(--text); color: var(--surface-base);
  font-size: 14px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Photo slots: real image when available, otherwise a plain grey block. */
.photo-empty { background: var(--photo-empty); }
/* Fixed 4:3 photo boxes. Without min-height/overflow a portrait photo stretches its box past 4:3,
   which made cards in the same row different heights and left big empty gaps. */
.card__media, .machine__media, .gallery__main { min-height: 0; overflow: hidden; }

/* ---------- Type ---------- */

.display {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
/* Short accent bar under the heading */
.section-title--ruled::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--warehouse-blue);
}
.lead {
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 160ms var(--ease-out);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font: 600 15px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn--small { gap: 8px; padding: 10px 14px; font-size: 14px; }
.btn--small svg { width: 16px; height: 16px; }
.btn--block { width: 100%; padding-block: 16px; line-height: 1.25; text-align: center; white-space: normal; }
.btn--outline { background: var(--surface-base); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }

@media (hover: hover) {
  .btn:hover { background: var(--accent-hover); }
  .btn--outline:hover { background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--accent); }
  .text-link:hover { color: var(--accent-hover); }
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface-base);
}
/* Same centred column as the page content, so the logo lines up with the text below
   and the call button with the right edge of the content. */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* Home header: three columns (logo | links | button) with equal outer columns, so "Categorie" and
   "Contatti" sit at the true centre of the page instead of halfway between a small logo and a wide button.
   Phones hide the links, so this only applies from tablet width up. */
@media (min-width: 810px) {
  .site-header__inner:has(> .nav-links) { display: grid; grid-template-columns: 1fr auto 1fr; }
  .site-header__inner:has(> .nav-links) > :first-child { justify-self: start; }
  .site-header__inner:has(> .nav-links) > :last-child { justify-self: end; }
}
.logo { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
/* Drawn logo (logo-rera-color.svg): the original colour logo without its white background, straight on the navy header. */
.logo--mark { display: inline-flex; flex: none; }
.logo--mark img { height: 56px; width: auto; }
/* Header: a little smaller and nudged down, so the flat top of the drawing gets breathing room
   (the bottom already looks airy thanks to the empty corner under the building). */
.site-header .logo--mark { padding-top: 5px; }
.site-header .logo--mark img { height: 52px; }
.logo--footer { align-self: flex-start; }
.logo--footer img { height: 88px; }
.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 160ms var(--ease-out);
}
.header-actions { display: flex; align-items: center; gap: 24px; }
@media (hover: hover) { .nav-link:hover { color: var(--text); } }

/* ---------- Hero (photo band: a Poreba lathe in the RERA warehouse; a navy shade on the left, or bottom on phones, keeps the white text readable on the bright photo) ---------- */

.hero {
  position: relative;
  display: flex;
  /* Tall band: almost a full screen on a laptop, up to 900px on large screens. */
  min-height: min(900px, calc(100dvh - 30px));
  color: rgb(250 251 252);
  background: var(--navy);
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Slideshow photos and their timing are generated by build.mjs (HERO_SLIDES), as a <style> inside the hero. */
/* Shade only behind the text (left), fading out so the right side of the photo stays bright. */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgb(19 34 60 / 0.82) 0%, rgb(19 34 60 / 0.6) 38%, rgb(19 34 60 / 0.15) 70%, rgb(19 34 60 / 0) 85%);
  pointer-events: none;
}
/* The navy brand strip under the hero reads as part of it, so the copy is centred on photo + strip:
   extra top padding equal to the strip's height (about 187px) moves the centre down by half of it.
   z-index 2 keeps the copy above the strip's fade, which reaches up into the photo. */
.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-block: calc(56px + 187px) 56px;
}
/* Hero type scale and spacing follow aduranti.it: 90px tight headline, 18px/36px text,
   27px between headline and text, 40px before the button, small bold uppercase button label. */
.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__title {
  font-size: 90px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}
.hero__text {
  max-width: 718px;
  margin-top: 27px;
  font-size: 18px;
  font-weight: 500;
  line-height: 2;
  color: rgb(250 251 252 / 0.82);
  text-wrap: pretty;
}
.hero .btn {
  margin-top: 40px;
  padding: 16px 48px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero .btn svg { width: 16px; height: 16px; }

/* One authored moment: the hero copy settles in on first paint. */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy { animation: rise 700ms var(--ease-out) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: 88px; }
.section--bordered { border-top: 1px solid var(--border); }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 40px;
}
.section-head__note { max-width: 60ch; font-size: 17px; color: var(--text-muted); }

/* ---------- Category cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  background: var(--surface-base);
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.card__media { aspect-ratio: 4 / 3; border-bottom: 1px solid var(--border); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 20px 20px 24px;
}
.card__title { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.card__text { font-size: 15px; line-height: 1.55; color: var(--text-muted); }
.card__count { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.card__cta { font-size: 14px; font-weight: 600; color: var(--accent); }
.card__cta span { display: inline-block; transition: transform 200ms var(--ease-out); }

@media (hover: hover) {
  .card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
  .card:hover .card__cta span { transform: translateX(3px); }
}

/* ---------- Enquiry ---------- */

.enquiry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: start;
}
.enquiry__intro { display: flex; flex-direction: column; gap: 18px; }
.enquiry__intro .lead { max-width: 440px; }

.contact-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

/* ---------- Category and machine pages: white cards on a light grey page ---------- */

main { display: block; background: var(--surface-base); }
main:has(.cat-head), main:has(.machine-page) { background: var(--surface-alt); }

/* Category header: a white band with breadcrumb, title and the optional one-line description. */
.cat-head { padding-bottom: 40px; border-bottom: 1px solid var(--border); background: var(--surface-base); }
.cat-head__title { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.cat-head__count { font-size: 15px; color: var(--text-muted); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px 64px;
  border-top: 1px solid var(--border);
}
.pager a { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; transition: color 160ms var(--ease-out); }
.pager__next { margin-left: auto; }
@media (hover: hover) { .pager a:hover { color: var(--accent); } }

/* ---------- Machine list ---------- */

.machines { padding-block: 40px 64px; }
.machines-empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--surface-base);
  box-shadow: var(--shadow-card);
}
.machines-empty__title { font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.machines-empty p { max-width: 56ch; color: var(--text-muted); }
.machines-more { margin-top: 32px; color: var(--text-muted); }
.machine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0; padding: 0; list-style: none;
}
.machine {
  display: flex; flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-base);
  box-shadow: var(--shadow-card);
  transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.machine__photo { position: relative; }
.machine__photo .badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 1px 3px rgb(19 34 60 / 0.18); }
.machine__media { aspect-ratio: 4 / 3; }
.machine__media img { width: 100%; height: 100%; object-fit: cover; }
.machine__body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 20px 20px 18px; }
.machine__name { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.machine__year { font-size: 14px; color: var(--text-muted); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0 0; }
.specs dt { font-size: 12px; color: var(--text-muted); }
.specs dd { margin: 1px 0 0; font-size: 14px; font-weight: 500; }
/* Price and link sit at the bottom of every card, so cards in a row line up. */
.machine__body > :nth-last-child(2) { margin-bottom: 16px; }
.machine__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.machine__price { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.machine .card__cta { margin-left: auto; white-space: nowrap; }
@media (hover: hover) {
  .machine:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
  .machine:hover .card__cta span { transform: translateX(3px); }
}
/* Sold: still listed, but quieter. */
.machine--sold .machine__media img { filter: grayscale(0.85); opacity: 0.75; }
.machine--sold .machine__name, .machine--sold .machine__price, .machine--sold .specs dd { color: var(--text-muted); }

.badge { flex: none; padding: 4px 10px; font-size: 12px; font-weight: 600; line-height: 1.4; border-radius: 999px; white-space: nowrap; }
.badge--disponibile { background: rgb(232 245 237); color: var(--ok); }
.badge--in-arrivo { background: rgb(230 240 250); color: var(--accent); }
.badge--venduta { background: var(--surface-raised); color: var(--text-muted); }

/* ---------- Machine page ---------- */

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { transition: color 160ms var(--ease-out); }
.breadcrumb [aria-current] { color: var(--text); }
@media (hover: hover) { .breadcrumb a:hover { color: var(--accent); } }
.machine-page {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-block: 24px 64px;
}
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery__main { aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
/* Photo strip: every photo side by side, one per screen, moved by swipe, trackpad or arrow keys. */
.gallery__stage { position: relative; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.gallery__track {
  display: flex;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--photo-empty);
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery__slide a, .gallery__slide img { width: 100%; height: 100%; }
.gallery__slide a { display: block; }
.gallery__slide img { object-fit: cover; }
.gallery__slide img.is-portrait { object-fit: contain; }
/* Gallery arrows: small, see-through dark glass with a thin white arrow, so they sit quietly on the photo;
   on computers they get stronger when the pointer is over the photo. */
.gallery__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 50%;
  background: rgb(13 25 46 / 0.35);
  color: rgb(255 255 255);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0.8;
  transition: background-color 200ms var(--ease-out), opacity 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.gallery__nav[hidden] { display: none; }
.gallery__nav svg { width: 16px; height: 16px; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--prev svg { transform: rotate(180deg); }
.gallery__nav--next { right: 12px; }
.gallery__nav:active { transform: scale(0.94); }
@media (hover: hover) {
  .gallery__nav { opacity: 0.75; }
  .gallery__stage:hover .gallery__nav { opacity: 0.95; }
  .gallery__nav:hover { background: rgb(13 25 46 / 0.6); opacity: 1; }
}
.gallery__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 2px;
  background: rgb(12 15 19 / 0.72);
  color: rgb(250 251 252);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.gallery__thumbs a { display: block; overflow: hidden; border-radius: var(--radius-sm); opacity: 0.6; transition: opacity 160ms var(--ease-out); }
.gallery__thumbs a[aria-current] { opacity: 1; box-shadow: 0 0 0 2px var(--surface-base), 0 0 0 4px var(--accent); }
@media (hover: hover) { .gallery__thumbs a:hover { opacity: 1; } }
.gallery__thumbs img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.gallery__note { font-size: 14px; color: var(--text-muted); }
a.gallery__main { display: block; }
.gallery__slide a, a.gallery__main { cursor: zoom-in; }

/* Full-screen photo viewer (built by gallery.js): the photo whole on a dark navy ground. */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  /* Slightly see-through navy with a soft blur: the page stays faintly visible behind the photo. */
  background: rgb(10 18 33 / 0.82); color: rgb(255 255 255);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.viewer::backdrop { background: transparent; }
.viewer[open] { display: grid; place-items: center; }
html.viewer-open { overflow: hidden; }
.viewer__img {
  max-width: calc(100vw - 160px); max-height: calc(100dvh - 120px);
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius-sm); box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
  user-select: none;
}
.viewer__btn {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid rgb(255 255 255 / 0.18); border-radius: 50%;
  background: rgb(255 255 255 / 0.08); color: rgb(255 255 255);
  cursor: pointer; transition: background-color 160ms var(--ease-out);
}
.viewer__btn[hidden] { display: none; }
.viewer__btn svg { width: 20px; height: 20px; }
.viewer__btn:focus-visible { outline: 2px solid rgb(255 255 255); outline-offset: 2px; }
@media (hover: hover) { .viewer__btn:hover { background: rgb(255 255 255 / 0.18); } }
.viewer__close { top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
.viewer__nav { top: 50%; transform: translateY(-50%); }
.viewer__nav--prev { left: calc(24px + env(safe-area-inset-left, 0px)); }
.viewer__nav--prev svg { transform: rotate(180deg); }
.viewer__nav--next { right: calc(24px + env(safe-area-inset-right, 0px)); }
.viewer__count {
  position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; color: rgb(255 255 255 / 0.75);
}
@media (max-width: 809.98px) {
  /* Phones: photo edge to edge, arrows small at the sides (swiping also works). */
  .viewer__img { max-width: 100vw; max-height: calc(100dvh - 140px); border-radius: 0; box-shadow: none; }
  .viewer__btn { width: 40px; height: 40px; background: rgb(10 18 33 / 0.55); }
  .viewer__nav--prev { left: calc(8px + env(safe-area-inset-left, 0px)); }
  .viewer__nav--next { right: calc(8px + env(safe-area-inset-right, 0px)); }
}
.machine-page__info { display: flex; flex-direction: column; gap: 20px; }
/* The card that sells: status, name, price and the contact buttons, all in one place. */
.buy-card, .spec-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface-base);
  box-shadow: var(--shadow-card);
}
.buy-card { display: flex; flex-direction: column; gap: 14px; }
.buy-card .contact-panel { margin-top: 6px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.machine-page__meta { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); }
.machine-page__title { font-size: 34px; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; }
.machine-page__desc { line-height: 1.6; color: var(--text-muted); }
.machine-page__price { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.machine-page__hint { margin-top: -10px; font-size: 14px; color: var(--text-muted); }
.machine-page__sold { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--text-muted); }
.spec-card__title { margin-bottom: 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.spec-table { margin: 0; }
.spec-table div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.spec-table div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec-table dt { color: var(--text-muted); }
.spec-table dd { margin: 0; font-weight: 600; text-align: right; }

.quick-contact { display: none; }

/* ---------- Simple pages (404) ---------- */

.notice { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 120px; max-width: 640px; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 64px 32px;
  border-top: 1px solid var(--border);
  background: var(--navy);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 { font-size: 14px; font-weight: 600; line-height: 1.3; }
.footer-col p, .footer-col a { font-size: 15px; color: var(--text-muted); }
.footer-col .logo { color: var(--text); }
.footer-col a { transition: color 160ms var(--ease-out); }
.placeholder { font-style: italic; }

/* ---------- Long text (privacy policy) ---------- */

.prose { display: flex; flex-direction: column; gap: 32px; max-width: 720px; padding-block: 72px 96px; }
.prose section { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.prose section p, .prose li { line-height: 1.65; color: var(--text-muted); }
.prose ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 20px; }
.prose__updated { padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
@media (hover: hover) { .footer-col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; } }

/* ---------- Tablet (810-1199px) ---------- */

@media (max-width: 1199.98px) {
  .display { font-size: 48px; }
  .hero__title { font-size: 68px; }
  .section-title { font-size: 36px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enquiry { grid-template-columns: minmax(0, 1fr); }
  .enquiry .contact-panel { max-width: 560px; }
  .machine-page { gap: 32px; }
  .machine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phone (<810px) ---------- */

@media (max-width: 809.98px) {
  :root { --gutter: 20px; }
  .display { font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; }
  .section-title { font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; }
  .lead { font-size: 17px; }
  .site-header__inner { padding-inline: var(--gutter); }
  .nav-links, .back-link { display: none; }
  /* Shorter band on phones: top bar + header + hero + brand strip fit in one screen
     (29px = top bar, 160px = brand strip). Copy sits left with the chuck of the lathe behind it. */
  .hero { min-height: clamp(400px, calc(100svh - var(--header-h) - 29px - 160px), 560px); }
  .hero__media { object-position: 20% top; }
  .hero::before { background: linear-gradient(180deg, rgb(19 34 60 / 0.35) 0%, rgb(19 34 60 / 0.7) 45%, rgb(19 34 60 / 0.82) 100%); }
  /* Phones: as close to the photo + strip centre as the short hero allows without growing it. */
  .hero__inner { padding-block: 130px 8px; }
  .hero__title { font-size: 39px; }
  .hero__text { margin-top: 14px; font-size: 14px; line-height: 28px; }
  .hero .btn { margin-top: 28px; }
  .section { padding-block: 56px 64px; }
  .section-head { margin-bottom: 28px; }
  /* Two compact cards per row, so the categories fit in a few screens instead of one per screen. */
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card__body { gap: 4px; padding: 12px 12px 14px; }
  .card__title { font-size: 16px; line-height: 1.25; }
  .card__text { display: none; }
  .card__count { padding-top: 4px; font-size: 13px; }
  .card__cta { display: none; }
  .contact-panel { padding: 20px; }
  /* Call / WhatsApp bar pinned to the bottom of machine pages. */
  .quick-contact {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    /* Navy like the header and footer, so it matches every section it slides over (white pages and the navy
       footer alike); the outline button turns light-on-navy through the same tokens the header uses. */
    --surface-base: var(--navy);
    --surface-alt: var(--navy-alt);
    --border: rgb(255 255 255 / 0.22);
    --text: rgb(255 255 255);
    border-top: 1px solid rgb(255 255 255 / 0.08);
    background: rgb(19 34 60 / 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -8px 24px -12px rgb(19 34 60 / 0.35);
  }
  .quick-contact .btn { padding-inline: 12px; }
  body:has(.quick-contact) { padding-bottom: 72px; }
  .cat-head { padding-bottom: 28px; }
  .cat-head__title { margin-top: 20px; }
  .buy-card, .spec-card { padding: 20px; }
  .machine-page__title { font-size: 28px; }
  .machines-empty { padding: 24px 20px; }
  .machine-grid { grid-template-columns: minmax(0, 1fr); }
  .machines { padding-block: 28px 56px; }
  .machine__body { padding: 20px; }
  .machine-page { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 20px 56px; }
  .breadcrumb { padding-top: 20px; }
  .pager a { font-size: 17px; }
  .prose { gap: 28px; padding-block: 40px 56px; }
  .site-footer { padding-block: 48px 28px; }
  .footer-bottom { flex-direction: column; }
}

/* Light theme: the category grid sits on a pale wash of the warehouse blue so the white cards stand out. */
#categorie { background: var(--warehouse-tint); }

/* ---------- Sede (home): photo of the warehouse next to the address ---------- */

.sede {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.sede__media { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.sede__media img { width: 100%; height: 100%; object-fit: cover; }
.sede__tag {
  position: absolute; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgb(19 34 60 / 0.82);
  color: rgb(255 255 255);
  font-size: 13px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.sede__tag svg { width: 14px; height: 14px; }
/* Kept simple: title, one line, address and hours as two plain lines, one button and a small review link. */
.sede__body { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.sede__lead { max-width: 42ch; font-size: 17px; line-height: 1.6; color: var(--text-muted); }
.sede__info { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 16px; font-weight: 500; }
.sede__info li { display: flex; align-items: flex-start; gap: 10px; }
.sede__info svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }
.sede__review {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; color: var(--text-muted);
  transition: color 160ms var(--ease-out);
}
.sede__review svg { width: 16px; height: 16px; }
@media (hover: hover) { .sede__review:hover { color: var(--accent); } }
.sede__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 8px; }
@media (max-width: 809.98px) {
  .sede { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sede__actions { width: 100%; justify-content: center; }
  .sede__actions .btn { flex: 1 1 100%; }
}

/* ---------- Top bar: thin strip in a deeper navy, part of the header band (address left, email and hours right) ---------- */

.topbar {
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  background: rgb(13 25 46);
  color: rgb(196 204 216 / 0.82);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: var(--container);
  min-height: 30px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.topbar__right { display: flex; align-items: center; gap: 28px; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar__item svg { width: 13px; height: 13px; flex: none; color: rgb(110 168 222); }
a.topbar__item { transition: color 160ms var(--ease-out); }
@media (hover: hover) { a.topbar__item:hover { color: rgb(255 255 255); } }
@media (max-width: 809.98px) {
  .topbar__addr { display: none; }
  .topbar__inner { justify-content: center; min-height: 28px; }
  .topbar__right { gap: 18px; font-size: 11px; }
}

/* ---------- Brand strip (home, under the hero): logos scrolling slowly in one line ---------- */

/* Navy band: the bottom of the hero photo fades into it, so dark photo -> white page is not a hard cut. */
.brands {
  position: relative; z-index: 1;
  padding-block: 26px 30px;
  background: var(--navy);
}
.brands::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); /* 2px overlap: no hairline seam */
  height: 170px; pointer-events: none;
  background: linear-gradient(0deg, var(--navy) 0%, rgb(19 34 60 / 0.6) 40%, rgb(19 34 60 / 0) 100%);
}
.brands__title {
  margin: 0 0 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.55); text-align: center;
}
.brands__viewport {
  overflow: hidden;
  /* logos fade in and out at the edges instead of being cut */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.brands__track {
  display: flex; width: max-content;
  animation: brands-scroll var(--dur, 80s) linear infinite;
}
.brands__viewport:hover .brands__track,
.brands__viewport:focus-within .brands__track { animation-play-state: paused; }
@keyframes brands-scroll { to { transform: translateX(-50%); } }
.brands__row { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.brands__row li { display: flex; align-items: center; height: 64px; padding-inline: 34px; }
.brand {
  display: block; width: var(--w); height: var(--h);
  /* the logo file is only a shape; its colour comes from here */
  background: rgb(255 255 255 / 0.72);
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
  transition: background-color 200ms var(--ease-out);
}
.brand:hover, .brand:focus-visible { background: rgb(255 255 255); }
.brands__note {
  margin-top: 12px; margin-bottom: 0;
  font-size: 0.6875rem; color: rgb(255 255 255 / 0.4); text-align: center;
}
@media (max-width: 640px) {
  .brands { padding-block: 22px 24px; }
  .brands::before { height: 70px; }
  .brands__title { margin-bottom: 14px; }
  .brands__row li { height: 52px; padding-inline: 22px; }
  .brand { width: calc(var(--w) * 0.74); height: calc(var(--h) * 0.74); }
  .brands__viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }
}

/* ---------- Ultimi arrivi (home): a sliding row of tall photo cards, text over the photo ---------- */

.arrivals { padding-block: 64px 56px; overflow: hidden; }
.arrivals__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.arrivals__nav { display: flex; gap: 8px; }
.arrivals__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface-base); color: var(--text);
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.arrivals__btn svg { width: 18px; height: 18px; }
.arrivals__btn--prev svg { transform: rotate(180deg); }
.arrivals__btn:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) { .arrivals__btn:not(:disabled):hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); } }
.arrivals__track {
  display: flex; gap: 20px;
  margin: 0; padding: 4px 0 18px; list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.arrivals__track::-webkit-scrollbar { display: none; }
/* Phones: dots under the row show where you are (one per machine). */
.arrivals__dots { display: none; justify-content: center; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.arrivals__dots li { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out); }
.arrivals__dots li.is-on { background: var(--accent); transform: scale(1.25); }
/* Whole cards only: the row is exactly N cards wide (4 on computers, 3 on tablets, 1 on phones) and every
   stop lines a card up with the left edge, so at rest no card is cut off. */
.arrival { flex: 0 0 calc((100% - 3 * 20px) / 4); scroll-snap-align: start; }
.arrival a {
  position: relative; display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--photo-empty);
  box-shadow: var(--shadow-card);
}
.arrival__media { position: absolute; inset: 0; }
.arrival__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.arrival .badge { position: absolute; top: 12px; left: 12px; z-index: 1; }
.arrival__body {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  display: flex; flex-direction: column; gap: 2px;
  padding: 56px 18px 18px;
  background: linear-gradient(180deg, rgb(13 25 46 / 0) 0%, rgb(13 25 46 / 0.78) 45%, rgb(13 25 46 / 0.92) 100%);
  color: rgb(255 255 255);
}
.arrival__cat { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(150 196 238); }
.arrival__name { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.arrival__year { font-size: 13px; color: rgb(255 255 255 / 0.75); }
.arrival__cta { margin-top: 8px; font-size: 13px; font-weight: 600; }
.arrival__cta span { display: inline-block; transition: transform 200ms var(--ease-out); }
@media (hover: hover) {
  .arrival a:hover .arrival__media img { transform: scale(1.04); }
  .arrival a:hover .arrival__cta span { transform: translateX(3px); }
}
@media (max-width: 1199.98px) {
  .arrival { flex-basis: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 809.98px) {
  .arrivals { padding-block: 44px 36px; }
  .arrivals__head { margin-bottom: 18px; }
  .arrivals__nav { display: none; }
  .arrivals__track { gap: 12px; }
  .arrival { flex-basis: 100%; }
  .arrivals__dots { display: flex; }
  .arrival__name { font-size: 17px; }
}


/* ---------- Sede band: white (between the light-blue categories and the blue contact band),
   ---------- */

.sede-band { background: var(--surface-base); }

/* ---------- Contact band (home): bold blue call to action before the footer ---------- */

.cta {
  position: relative;
  overflow: hidden;
  padding-block: 72px;
  background: linear-gradient(135deg, rgb(16 116 199) 0%, rgb(11 79 143) 100%);
  color: rgb(255 255 255);
}
/* Two soft light circles for depth. */
.cta::before, .cta::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgb(255 255 255 / 0.07); pointer-events: none;
}
.cta::before { width: 420px; height: 420px; right: -120px; top: -180px; }
.cta::after { width: 260px; height: 260px; left: -90px; bottom: -150px; }
.cta__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 32px 56px; align-items: center;
}
.cta__eyebrow { margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(255 255 255 / 0.75); }
.cta .section-title { color: rgb(255 255 255); }
.cta__lead { max-width: 44ch; margin-top: 14px; font-size: 17px; line-height: 1.6; color: rgb(255 255 255 / 0.85); }
.cta__actions { display: grid; gap: 12px; }
.cta__btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.1);
  color: rgb(255 255 255);
  font-weight: 600;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.cta__btn svg { flex: none; width: 22px; height: 22px; }
.cta__btn span { display: flex; flex-direction: column; line-height: 1.25; }
.cta__btn small { font-size: 12px; font-weight: 500; opacity: 0.8; }
.cta__btn--main { border-color: transparent; background: rgb(255 255 255); color: var(--accent); box-shadow: 0 10px 24px -12px rgb(6 30 60 / 0.6); }
@media (hover: hover) {
  .cta__btn:hover { background: rgb(255 255 255 / 0.18); transform: translateY(-2px); }
  .cta__btn--main:hover { background: rgb(255 255 255); }
}
@media (max-width: 809.98px) {
  .cta { padding-block: 52px; }
  .cta__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- "Hai una macchina da vendere?" (home): a navy card set into the page, photo on the right ---------- */

.sell { padding-block: 72px 24px; }
.sell__card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 16px;
  background: var(--navy);
  color: rgb(255 255 255);
  box-shadow: 0 24px 48px -24px rgb(19 34 60 / 0.45);
}
.sell__body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 48px; }
.sell__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warehouse-blue); }
.sell .section-title { color: rgb(255 255 255); }
.sell__lead { max-width: 46ch; font-size: 17px; line-height: 1.6; color: rgb(255 255 255 / 0.8); }
.sell__steps { display: grid; gap: 16px; margin: 8px 0 4px; padding: 0; list-style: none; }
.sell__steps li { display: flex; align-items: flex-start; gap: 14px; }
.sell__num {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(107 166 214 / 0.6);
  color: var(--warehouse-blue);
  font-size: 14px; font-weight: 700;
}
.sell__steps strong { display: block; font-size: 16px; font-weight: 600; }
.sell__steps p { margin-top: 2px; font-size: 14px; line-height: 1.5; color: rgb(255 255 255 / 0.7); }
.sell__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.sell__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255);
  color: var(--navy);
  font-size: 15px; font-weight: 700;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.5);
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.sell__btn svg { width: 20px; height: 20px; color: rgb(37 160 92); }
.sell__link { font-size: 14px; color: rgb(255 255 255 / 0.75); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) {
  .sell__btn:hover { transform: translateY(-2px); background: rgb(240 244 248); }
  .sell__link:hover { color: rgb(255 255 255); }
}
.sell__media { position: relative; display: block; min-height: 100%; }
.sell__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
/* Soft fade from the navy card into the photo. */
.sell__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--navy) 0%, rgb(19 34 60 / 0) 35%);
}
@media (max-width: 1199.98px) {
  .sell__body { padding: 40px 32px; }
}
@media (max-width: 809.98px) {
  .sell { padding-block: 48px 8px; }
  .sell__card { grid-template-columns: minmax(0, 1fr); border-radius: var(--radius); }
  /* Phones: a taller frame aimed lower, so the forklift itself shows instead of the roof. */
  .sell__media { order: -1; aspect-ratio: 1 / 1; min-height: 0; }
  .sell__media img { object-position: 45% 72%; }
  .sell__media::before { background: linear-gradient(0deg, var(--navy) 0%, rgb(19 34 60 / 0) 28%); }
  .sell__body { padding: 24px 20px 28px; }
  .sell__actions { width: 100%; }
  .sell__btn { width: 100%; justify-content: center; }
}
