/* ==========================================================
   DALY TRASPORTI SRL — style.css
   Per cambiare i colori modifica le variabili qui sotto.
   ========================================================== */
:root {
  --navy: #0b1b2e;        /* blu molto scuro */
  --anth: #1f2b38;        /* antracite */
  --ink: #16202c;         /* testo */
  --muted: #56636f;       /* testo secondario */
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --accent: #2e6bff;      /* blu acceso (accento) */
  --accent-dark: #1f56dc;
  --accent-soft: #5b8cff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 27, 46, .05), 0 8px 24px rgba(11, 27, 46, .06);
  --head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --hh: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hh); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--body); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 3rem); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 1rem; top: -4rem; background: #fff; color: var(--navy); padding: .6rem 1rem; border-radius: 8px; z-index: 100; transition: top .2s; }
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; height: var(--hh); z-index: 50; transition: background .3s, box-shadow .3s; color: #fff; }
.site-header.scrolled { background: rgba(11, 27, 46, .94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font: 700 1.5rem/1 var(--head); color: var(--accent); }
.brand span { color: #fff; }
.nav { display: flex; align-items: center; gap: .4rem; }
.nav a { text-decoration: none; padding: .55rem .9rem; border-radius: 999px; font-weight: 500; font-size: .98rem; color: rgba(255, 255, 255, .85); transition: color .2s, background .2s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav a.active { color: #fff; }
.nav .nav-cta { background: var(--accent); color: #fff; margin-left: .4rem; }
.nav .nav-cta:hover { background: var(--accent-dark); }

.burger { display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; position: relative; border-radius: 12px; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .2s, top .3s; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 30px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .8rem 1.6rem; border-radius: 12px; font: 600 .95rem/1 var(--body); letter-spacing: .06em; text-decoration: none; border: 2px solid transparent; transition: transform .2s, background .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(46, 107, 255, .3); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; background: var(--navy); color: #fff; overflow: hidden; padding: calc(var(--hh) + 3rem) 0 7rem; }
.hero-photo { position: absolute; inset: 0; background: linear-gradient(120deg, #0b1b2e 30%, #14304f 100%) center / cover no-repeat; }
/* Per usare una tua foto di sfondo: decommenta la riga sotto e salva assets/images/hero.jpg
.hero-photo { background-image: linear-gradient(90deg, rgba(11,27,46,.92) 35%, rgba(11,27,46,.45)), url("assets/images/hero.jpg"); } */
.hero-in { position: relative; z-index: 2; }
.hero-name { font: 600 1.05rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(3rem, 8.5vw, 6.6rem); max-width: 13ch; text-wrap: balance; }
.hero-sub { max-width: 34rem; margin: 1.6rem 0 0; font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255, 255, 255, .78); }

/* Strada: l'unico elemento in movimento continuo */
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: var(--anth); z-index: 1; border-top: 3px solid rgba(255, 255, 255, .14); }
.road i { position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, var(--accent-soft) 0 44px, transparent 44px 92px); background-size: 92px 4px; animation: drive 1.6s linear infinite; }
@keyframes drive { to { background-position: -92px 0; } }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); color: var(--navy); margin-bottom: 1.2rem; }
.head { max-width: 40rem; margin-bottom: 3rem; }
.head p { color: var(--muted); font-size: 1.15rem; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split p { max-width: 34rem; color: var(--muted); }

.values { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.values li { padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--navy); background: #fff; }

.visual { background: var(--navy); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.visual svg { width: 100%; height: 100%; }
.dash-path { animation: flow 2.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -36; } }

/* ---------- Servizi ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.5rem 2rem; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-6px); border-color: var(--accent-soft); box-shadow: 0 2px 4px rgba(11, 27, 46, .05), 0 18px 36px rgba(11, 27, 46, .1); }
.icon { width: 54px; height: 54px; border-radius: 14px; background: var(--navy); display: grid; place-items: center; margin-bottom: 1.4rem; transition: background .25s; }
.card:hover .icon { background: var(--accent); }
.icon svg, .row svg, .shot .ph svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon svg { width: 26px; height: 26px; color: #fff; }
.card h3 { font-size: 1.6rem; color: var(--navy); margin-bottom: .6rem; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Flotta ---------- */
.fleet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.shot { margin: 0; position: relative; aspect-ratio: 3 / 2; border-radius: 18px; overflow: hidden; background: var(--bg-alt); box-shadow: var(--shadow); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.shot:hover img { transform: scale(1.05); }
.shot.no-photo img { display: none; }
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; color: #6b7886; border: 2px dashed #c6cfd9; border-radius: 18px; background: repeating-linear-gradient(45deg, #f4f6f9 0 14px, #eef1f5 14px 28px); }
.ph svg { width: 44px; height: 44px; }
.ph span { font-weight: 500; }
.shot figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(11, 27, 46, .85); color: #fff; font-size: .9rem; font-weight: 500; }

/* ---------- Contatti ---------- */
.contacts { background: var(--bg-alt); }
.contact-grid { align-items: stretch; }
.contact-card, .map-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.contact-card { padding: clamp(1.6rem, 4vw, 2.6rem); }
.contact-card h3 { font-size: 2rem; color: var(--navy); margin-bottom: 1.2rem; }
address { font-style: normal; display: grid; gap: 1rem; }
.row { display: flex; gap: .9rem; align-items: flex-start; }
.row svg { width: 22px; height: 22px; flex: none; margin-top: .2rem; color: var(--accent); }
.row a { text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; overflow-wrap: anywhere; }
.row a:hover { color: var(--accent); border-color: var(--accent); }
.map-card { display: flex; flex-direction: column; min-height: 380px; }
.map-ph { position: relative; flex: 1; min-height: 220px; background: var(--navy); }
.map-ph > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; left: 50%; top: 46%; width: 48px; height: 48px; transform: translate(-50%, -100%); fill: var(--accent); }
.map-card iframe { flex: 1; }
.map-info { padding: 1.4rem 1.6rem 1.6rem; display: grid; gap: .2rem; justify-items: start; }
.map-info strong { font: 700 1.5rem/1.1 var(--head); color: var(--navy); }
.map-info span { color: var(--muted); }
.map-info .btn { margin-top: 1rem; letter-spacing: .03em; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, .75); padding: 3.5rem 0 1.6rem; font-size: .98rem; }
.footer strong { font: 700 1.6rem/1 var(--head); color: #fff; }
.footer p { margin: .5rem 0 0; }
.footer a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.footer a:hover { color: #fff; border-color: #fff; }
.foot-in { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.copy { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; color: rgba(255, 255, 255, .55); }

/* ---------- Animazioni allo scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2), .js .fleet .reveal:nth-child(2) { transition-delay: .08s; }
.js .cards .reveal:nth-child(3), .js .fleet .reveal:nth-child(3) { transition-delay: .16s; }
.js .cards .reveal:nth-child(4), .js .fleet .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --hh: 64px; }
  .burger { display: block; }
  .nav { position: fixed; top: var(--hh); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .2rem; padding: 1rem 1.5rem 1.6rem; background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .1); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .95rem 1rem; font-size: 1.15rem; }
  .nav .nav-cta { margin: .6rem 0 0; text-align: center; }
  .site-header.menu-open { background: var(--navy); }
  .split { grid-template-columns: 1fr; }
  .visual { order: -1; }
}
@media (max-width: 640px) {
  .wrap { width: min(1160px, 100% - 2.4rem); }
  .cards, .fleet { grid-template-columns: 1fr; }
  .hero { padding-bottom: 6.5rem; }
  .btns .btn { flex: 1 1 100%; }
  .contact-card .btn { width: 100%; }
  .map-info .btn { width: 100%; }
  .foot-in { flex-direction: column; gap: 1.4rem; }
}

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