/* La Container — styles
   One family (Archivo, variable width + weight). Brand colours from the logo
   (jade) and the truck livery (red). */

/* Archivo by Omnibus-Type (github.com/Omnibus-Type/Archivo), SIL Open Font
   License 1.1 (see ../fonts/OFL.txt). Self-hosted variable font, Latin subset:
   no requests to third-party font services. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/Archivo-variable.woff2") format("woff2");
}

:root {
  --ink: #17241f;
  --ink-soft: #46544f;
  --paper: #f2f4f2;
  --white: #ffffff;
  --jade: #1d7457;
  --jade-dark: #12503c;
  --jade-tint: #d8ede4;
  --red: #c8231b;
  --red-dark: #a11b14;
  --rule: #c9d1cd;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* modular scale ~1.25 */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(2.25rem, 1.2rem + 4.6vw, 5rem);

  --gutter: clamp(1.5rem, 6vw, 2.5rem);
  --max: 76rem;
  --radius: 4px;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 800;
  font-stretch: 112%;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); font-stretch: 100%; font-weight: 700; line-height: 1.25; }

p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--jade); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--jade-dark); text-decoration-thickness: 2px; }

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

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; color: var(--white); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--call { background: var(--red); color: var(--white); }
.btn--call:hover { background: var(--red-dark); color: var(--white); }

.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--white); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand { flex: none; display: block; }
.brand img { width: auto; height: 3.9rem; }

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--jade); }
.nav a[aria-current="page"] { border-bottom-color: var(--jade); color: var(--jade-dark); }

.header-call { flex: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

@media (max-width: 60rem) {
  .header-call .btn-label { display: none; }
  .header-call { padding-inline: 0.85rem; }
}

@media (max-width: 48rem) {
  .site-header .wrap { flex-wrap: wrap; gap: 0.75rem; min-height: 4rem; }
  .brand img { height: 2.75rem; }
  .js .nav-toggle { display: inline-flex; }
  .header-call { order: 2; }
  .nav-toggle { order: 3; margin-left: 0; }
  .js .header-call { margin-left: auto; }
  .nav { order: 4; flex-basis: 100%; margin-left: 0; }
  .nav ul { flex-direction: column; gap: 0; padding-bottom: 0.75rem; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); border-left: 0; }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); box-shadow: inset 4px 0 0 var(--jade); padding-left: 0.9rem; }
  .js .nav:not(.is-open) { display: none; }
  .no-js .nav ul { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Hero / page intro ---------- */

.intro { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }

.intro h1 {
  font-size: var(--fs-hero);
  font-stretch: 125%;
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.intro--page h1 { font-size: var(--fs-xl); max-width: 22ch; }

.intro .lede {
  margin-top: 1.25rem;
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 48ch;
}

.intro .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- Slider (scroll-snap; JS adds controls + autoplay) ---------- */

.slider { position: relative; }

.slider__track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--radius);
  background: var(--ink);
}
.slider__track::-webkit-scrollbar { display: none; }

.slider__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.slider__slide img {
  width: 100%;
  aspect-ratio: 16 / 5; /* native ratio of the photos (800x250): never crop */
  object-fit: cover;
}


.slider__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.slider__controls[hidden] { display: none; }

.slider__dots {
  display: flex;
  gap: 0.25rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.slider__dots button {
  width: 2rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.slider__dots button::before {
  content: "";
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
}
.slider__dots button[aria-current="true"]::before { background: var(--jade); }

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

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--white { background: var(--white); }
.section--jade { background: var(--jade-dark); color: var(--white); }
.section--jade a { color: var(--white); }

.section-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); max-width: 40rem; }
.section-head p { margin-top: 1rem; color: var(--ink-soft); font-size: var(--fs-md); }
.section--jade .section-head p { color: var(--jade-tint); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

.prose p { font-size: var(--fs-base); }
.prose h2 { margin-bottom: 1.5rem; }

.photo { margin: 0; }
.photo img { width: 100%; border-radius: var(--radius); }
.photo--tall img { aspect-ratio: 4 / 5; max-height: 34rem; object-fit: cover; object-position: center 30%; }
.photo figcaption { margin-top: 0.6rem; font-size: var(--fs-sm); color: var(--ink-soft); }

/* Key facts */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  border-top: 2px solid var(--ink);
}
.facts div {
  padding: 1.25rem 1.25rem 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  font-size: var(--fs-lg);
  font-weight: 800;
  font-stretch: 115%;
  line-height: 1.1;
}
.facts dd { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: var(--fs-sm); }

/* Service list (home) */
.service-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.service-index li { border-bottom: 1px solid var(--rule); }
.service-index a {
  display: block;
  padding: 1rem 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.service-index a:hover { color: var(--jade); }

/* Services page */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: 0 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.service {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 6rem;
}
.service img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.service h3 { margin-bottom: 0.4rem; }
.service p { color: var(--ink-soft); }
@media (max-width: 26rem) {
  .service { grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; }
}

/* Timeline */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--jade);
}
.timeline li { position: relative; padding: 0 0 2rem 1.75rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--jade);
}
.timeline time {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 800;
  font-stretch: 115%;
  line-height: 1.2;
  color: var(--jade-dark);
}
.timeline p { margin-top: 0.35rem; }

/* Documents */
.doc-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 2.5rem 3rem;
}
.doc-groups h3 { margin-bottom: 0.75rem; }
.docs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.docs li { border-bottom: 1px solid var(--rule); }
.docs a {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.9rem 0;
  color: var(--ink);
  text-decoration: none;
}
.docs a:hover .doc-name { color: var(--jade); text-decoration: underline; }
.doc-name { flex: 1; font-weight: 600; }
.doc-meta { flex: none; font-size: var(--fs-sm); color: var(--ink-soft); white-space: nowrap; }
.docs svg { flex: none; width: 1.1rem; height: 1.1rem; align-self: center; color: var(--red); }

/* Certifications */
.certs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.certs img { width: 12.5rem; height: auto; background: var(--white); border-radius: var(--radius); }

/* Fleet list */
.fleet { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.fleet li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
}

/* Gallery (mezzi) */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2rem 3rem;
}
.contact-grid h3 {
  margin-bottom: 0.5rem;
  font-size: var(--fs-base);
  color: var(--ink-soft);
  font-weight: 600;
}
.section--jade .contact-grid h3 { color: var(--jade-tint); }
.contact-grid address,
.contact-grid p { font-style: normal; font-size: var(--fs-md); line-height: 1.45; }
.contact-grid .big {
  font-size: var(--fs-lg);
  font-weight: 800;
  font-stretch: 110%;
  text-decoration: none;
}
.contact-grid .big:hover { text-decoration: underline; }

.contact-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }
.section--jade .btn--ghost { border-color: var(--white); color: var(--white); }
.section--jade .btn--ghost:hover { background: var(--white); color: var(--jade-dark); }

.map-link-card {
  display: block;
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.site-footer {
  padding-block: 3rem 2rem;
  background: var(--ink);
  color: #c4ccc8;
  font-size: var(--fs-sm);
}
.site-footer a { color: var(--white); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #34433d;
}
.footer-name {
  margin-bottom: 0.4rem;
  color: var(--white);
  font-size: var(--fs-md);
  font-weight: 800;
  font-stretch: 115%;
}
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a { text-decoration: none; display: inline-block; padding-block: 0.4rem; }
.footer-nav a:hover { text-decoration: underline; }
.footer-legal { padding-top: 1.5rem; }
.footer-legal p { max-width: none; }

@media print {
  .site-header, .slider, .site-footer .footer-nav, .skip-link { display: none !important; }
  body { background: #fff; }
}
