/* ContainerTruck TMS – sito del prodotto */

@font-face { font-family: "Lato"; src: url("../fonts/lato-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-semibold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --blue: #0369a1;        /* container, colore del logo e del TMS */
  --blue-deep: #075985;   /* ombra delle ondulature */
  --blue-light: #e0f2fe;
  --ink: #0f172a;         /* testo e barra laterale del TMS */
  --steel: #475569;       /* testo secondario */
  --line: #dbe3ec;
  --paper: #f8fafc;
  --focus: #0ea5e9;       /* contorno di focus da tastiera */
  --green: #10b981;       /* tappa completata, come nel TMS */
  --error: #b91c1c;

  --font: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);

  --wrap: 72rem;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --section: clamp(3.5rem, 8vw, 6rem);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; font-family: var(--font); font-size: var(--step-0); line-height: 1.6; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.75rem; text-wrap: balance; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

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

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1.1rem; border-radius: 8px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: var(--step--1); line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn--demo { background: var(--blue); color: #fff; }  /* blu del TMS: l'utente è tornato a questo colore il 02/12/2026 */
.btn--demo:hover { background: var(--blue-deep); color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--blue); background: transparent; }
.btn--ghost:hover { background: var(--blue-light); color: var(--blue-deep); }
.btn--large { padding: 0.85rem 1.5rem; font-size: var(--step-0); }
.btn--block { width: 100%; }

/* Intestazione */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand img { width: 200px; height: auto; }
.menu { display: flex; align-items: center; gap: 1.5rem; }
.menu a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
.menu a:not(.btn):hover { color: var(--blue); }
.menu-toggle { display: none; font: inherit; font-weight: 700; font-size: var(--step--1); padding: 0.5rem 0.9rem; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .menu { display: none; position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gap) 1rem; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08); }
  .menu.is-open { display: flex; }
  .menu a:not(.btn) { padding: 0.75rem 0; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
  .menu .btn { margin-top: 1rem; }
  .brand img { width: 170px; }
}

/* Apertura: foto di un porto con i container (Timelab su Unsplash, licenza Unsplash), sotto uno strato scuro per leggere il testo */
.hero {
  --foto: url("../img/porto.webp");
  --velo: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.72) 50%, rgba(15, 23, 42, 0.35) 100%);
  position: relative;
  display: flow-root; /* evita che il margine negativo della schermata si annulli con quello della sezione */
  color: #fff;
  background: var(--velo), var(--foto) center 78% / cover no-repeat, var(--ink);
  padding-top: clamp(3rem, 8vw, 5.5rem);
  margin-bottom: clamp(7rem, 22vw, 16rem);
}
@media (max-width: 760px) {
  .hero {
    --foto: url("../img/porto-piccola.webp");
    --velo: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.78) 100%);
  }
}
.hero__text { max-width: 44rem; }
.hero h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 1.25rem; }
.hero__lead { font-size: var(--step-1); line-height: 1.5; max-width: 38rem; color: #e0f2fe; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1rem; }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.hero__note { font-size: var(--step--1); color: #bae6fd; margin: 0; }
.hero__shot { position: relative; z-index: 1; margin-top: clamp(2rem, 5vw, 3rem); margin-bottom: calc(-1 * clamp(7rem, 22vw, 16rem)); }

/* Schermate */
.screen { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35), 0 8px 18px -8px rgba(15, 23, 42, 0.2); }
.hero .screen { border: 6px solid var(--ink); }
.screen--wide { margin-top: clamp(2rem, 5vw, 3rem); }
.phone { margin: 0 auto; width: min(300px, 80%); border: 10px solid var(--ink); border-radius: 36px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35); }

/* Sezioni */
.section { padding-block: var(--section); }
.section--tint { background: var(--paper); border-block: 1px solid var(--line); }
.section > .wrap > h2 { max-width: 40rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

/* Cosa risolve */
.problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: clamp(1.5rem, 4vw, 2.5rem); }
.problem { border-top: 4px solid var(--blue); padding-top: 1rem; }
.problem h3 { font-size: var(--step-1); }
.problem p { color: var(--steel); margin: 0; }

/* Funzioni */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 6vw, 4rem); margin: 0; }
.feature { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.feature dt { font-weight: 700; font-size: var(--step-1); margin-bottom: 0.25rem; }
.feature dd { margin: 0; color: var(--steel); max-width: 34rem; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

/* Ordini letti dall'AI */
.ai__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.ai__inner p { max-width: 36rem; }
.ai__note { color: var(--steel); font-size: var(--step--1); border-left: 3px solid var(--blue); padding-left: 0.75rem; }
.ai__flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; counter-reset: none; }
.ai__flow li { position: relative; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 600; }
.ai__flow li + li::before { content: ""; position: absolute; left: 1.6rem; top: calc(-0.75rem - 1px); height: 0.75rem; border-left: 2px dashed var(--blue); }
.ai__flow li:last-child { border-color: var(--blue); background: var(--blue-light); color: var(--blue-deep); }
.ai__doc { display: inline-flex; align-items: center; gap: 0.6rem; }
.ai__doc::before { content: "PDF"; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: var(--error); border-radius: 4px; padding: 0.15rem 0.35rem; }
@media (max-width: 820px) { .ai__inner { grid-template-columns: 1fr; } }

/* Testo + immagine */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }

.split__text h2 { margin-bottom: 1.5rem; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.checks li { position: relative; padding-left: 2rem; }
.checks--cols { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); column-gap: 2.5rem; max-width: 60rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }

/* Integrazioni e moduli */
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.two-cols h2 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.plain { margin: 0; }
.plain dt { font-weight: 700; padding-top: 1rem; border-top: 1px solid var(--line); }
.plain dd { margin: 0.25rem 0 1rem; color: var(--steel); }
@media (max-width: 820px) { .two-cols { grid-template-columns: 1fr; } }

/* Sicurezza */
.security { background: var(--ink); color: #fff; }
.security h2 { color: #fff; }
.security__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem 2rem; }
@media (max-width: 1000px) { .security__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .security__list { grid-template-columns: 1fr; } }
.security__list li { padding: 0.9rem 0 0.9rem 1rem; border-left: 3px solid var(--blue); color: #cbd5e1; }

/* Come si parte: le tappe, come nel TMS */
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: stop; }
.route__stop { position: relative; padding-top: 3.5rem; counter-increment: stop; }
.route__stop::before { content: counter(stop); position: absolute; top: 0; left: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; z-index: 1; }
.route__stop:last-child::before { content: ""; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 60% no-repeat; border-color: var(--green); }
.route__stop:not(:last-child)::after { content: ""; position: absolute; top: 1.2rem; left: 2.5rem; right: -1.5rem; border-top: 3px solid var(--line); }
.route__stop h3 { margin-bottom: 0.4rem; }
.route__stop p { color: var(--steel); margin: 0; }
@media (max-width: 820px) {
  .route { grid-template-columns: 1fr; gap: 0; }
  .route__stop { padding: 0 0 1.75rem 3.75rem; min-height: 4rem; }
  .route__stop:not(:last-child)::after { top: 2.5rem; bottom: 0; left: 1.2rem; right: auto; border-top: 0; border-left: 3px solid var(--line); }
}

/* Domande frequenti */
.faq { max-width: none; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; font-size: var(--step-1); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.8rem; font-size: 1.5rem; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--steel); padding-bottom: 0.5rem; }

/* Richiesta demo */
.demo { background: linear-gradient(180deg, #fff 0%, var(--blue-light) 100%); }
.demo__inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.demo__intro p { font-size: var(--step-1); color: var(--steel); max-width: 28rem; }
.demo__alt { margin-top: 2.5rem; }
.demo__alt h3 { font-size: var(--step-0); margin: 0 0 0.85rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; max-width: 26rem; }
.contact-list a { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color 0.15s; }
.contact-list a:hover { border-color: var(--blue); }
.contact-list svg { width: 40px; height: 40px; flex: none; padding: 9px; border-radius: 50%; background: var(--blue-light); fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.contact-list span { display: grid; font-size: var(--step-0); overflow-wrap: anywhere; }
.contact-list strong { font-size: var(--step--1); color: var(--steel); font-weight: 600; }
@media (max-width: 820px) { .demo__inner { grid-template-columns: 1fr; } }

.form-card { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--blue); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.3); }
.form-card--done h3 { color: var(--blue-deep); }
.form-card__error { background: #fef2f2; border: 1px solid #fecaca; color: var(--error); border-radius: 8px; padding: 0.75rem 1rem; font-weight: 600; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.3rem; }
.req { font-weight: 400; color: var(--steel); }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; font: inherit; font-size: var(--step-0); color: var(--ink); padding: 0.65rem 0.8rem; border: 1px solid #b6c3d1; border-radius: 8px; background: #fff; }
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); font-size: var(--step--1); margin: 0.3rem 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; }
.field--check input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; accent-color: var(--blue); }
.field--check label { font-weight: 400; font-size: var(--step-0); margin: 0; }
.field--check .field__error { grid-column: 1 / -1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Piè di pagina */
/* Footer in due fasce: logo e link sopra, dati legali sotto (scelta dell'utente del 02/12/2026) */
.footer { background: var(--ink); color: #94a3b8; font-size: var(--step--1); }
.footer p { margin: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer a { color: #e2e8f0; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
.footer__brand img { width: 220px; margin-bottom: 1rem; }
.footer__brand p { max-width: 24rem; line-height: 1.6; }
.footer__title { font-size: var(--step--1); font-weight: 700; color: #fff; margin: 0.35rem 0 1rem; }
.footer__contact { display: inline-flex; align-items: center; gap: 0.55rem; }
.footer__contact svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #38bdf8; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.footer__legal { border-top: 1px solid #1e293b; }
.footer__legal-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.25rem; font-size: 0.8125rem; color: #94a3b8; }
.footer__legal a { color: #cbd5e1; }
@media (max-width: 860px) { .footer__main { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__main { grid-template-columns: 1fr; } }

/* Pagine di testo (informativa) */
.prose { max-width: 46rem; padding-block: var(--section); }
.prose h1 { font-size: var(--step-3); }
.prose h2 { font-size: var(--step-1); margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose .updated { color: var(--steel); font-size: var(--step--1); }
