/* ============================================================
   Pino Di Marco Soc. Coop. — Design System
   ============================================================ */

:root {
  /* Brand palette — derived from company logo (navy + petrol teal) */
  --navy-950: #060f22;
  --navy-900: #0a1830;
  --navy-800: #0d2149;
  --navy-700: #123163;
  --petrol-600: #1f5c66;
  --petrol-500: #2c7a82;
  --azure-500: #2f7ea3;
  --azure-400: #3f97c2;
  --azure-300: #6fb8d9;
  --azure-200: #a9d8ea;

  --white: #ffffff;
  --gray-50: #f6f8fa;
  --gray-100: #eef1f5;
  --gray-200: #dde3ea;
  --gray-400: #97a1b0;
  --gray-600: #5b6577;
  --gray-800: #2a3140;

  --text: #16202e;
  --text-soft: #4b566a;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 10px rgba(10, 24, 48, 0.06);
  --shadow-md: 0 12px 32px rgba(10, 24, 48, 0.10);
  --shadow-lg: 0 24px 60px rgba(10, 24, 48, 0.18);

  --header-h: 84px;

  --font-head: 'Poppins', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; color: var(--navy-900); }
p { margin: 0; line-height: 1.7; color: var(--text-soft); }
button { font-family: inherit; cursor: pointer; }
section { scroll-margin-top: var(--header-h); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-900); color: var(--white); padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--azure-400), var(--petrol-600));
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
/* backdrop-filter lives on a pseudo-element, not on .site-header itself:
   a filter/backdrop-filter on the header would make it a containing block
   for its position:fixed descendants (the mobile nav panel), breaking it. */
.site-header::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  transition: background .3s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  height: 72px;
  border-bottom-color: var(--gray-200);
}
.site-header.is-scrolled::before {
  background: rgba(255,255,255,0.92);
}

.nav-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; grid-column: 2; justify-self: center; }
.brand-logo { height: 46px; width: auto; transition: height .3s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 40px; }

/* Off-canvas nav drawer — same panel at every breakpoint; the toggle
   button is the only persistent nav control in the header. */
.main-nav {
  position: fixed;
  top: var(--header-h); right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  z-index: 95;
  overflow-y: auto;
}
.main-nav.is-open { transform: translateX(0); }

.main-nav ul { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: block;
  padding: 14px 18px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--navy-800);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-link:hover { background: var(--gray-100); }
.nav-link.is-active { background: var(--navy-900); color: var(--white); }

.nav-panel-contact {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nav-panel-contact a {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .25s var(--ease);
  min-width: 0;
}
.nav-panel-contact a:hover { color: var(--azure-500); }
.nav-panel-contact a span { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.nav-panel-contact svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--azure-500); }

.nav-toggle {
  display: flex;
  grid-column: 3; justify-self: end;
  width: 42px; height: 42px;
  border: none; background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--navy-900); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6,15,34,0.45);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.nav-overlay.is-visible { opacity: 1; visibility: visible; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 0;
  background: radial-gradient(120% 100% at 15% 0%, #123566 0%, var(--navy-900) 45%, var(--navy-950) 100%);
  overflow: hidden;
  color: var(--white);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark vignette over the video: darker at the edges and bottom (where the
   stats bar sits) so every button and line of text stays legible. */
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(6, 15, 34, 0.35) 0%, rgba(6, 15, 34, 0.72) 100%),
    linear-gradient(180deg, rgba(6, 15, 34, 0.78) 0%, rgba(6, 15, 34, 0.4) 28%, rgba(6, 15, 34, 0.55) 65%, rgba(6, 15, 34, 0.88) 100%);
}

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 880px; margin: 0 auto; }

.eyebrow, .section-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azure-300);
  margin-bottom: 18px;
}
.section-eyebrow { color: var(--azure-500); }
.section-eyebrow--light { color: var(--azure-300); }

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: rgba(255,255,255,0.78);
  max-width: 640px;
  margin: 0 auto 38px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 72px; }

.hero-stats { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,0.12); background: rgba(6,15,34,0.35); }
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 28px;
}
.stat { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.stat-num, .stat-text {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--white), var(--azure-200));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-text { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.stat-label { font-size: 0.86rem; color: rgba(255,255,255,0.65); font-weight: 500; }

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section { padding: 110px 0; }
.section--tint { background: var(--gray-50); }
.section--dark {
  background: radial-gradient(110% 100% at 85% 10%, #0f2c52 0%, var(--navy-900) 50%, var(--navy-950) 100%);
  color: var(--white);
}

.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  max-width: 780px;
  margin-bottom: 18px;
}
.section-title--light { color: var(--white); }
.section-lead { font-size: 1.08rem; max-width: 680px; margin-bottom: 56px; }
.section-lead--light { color: rgba(255,255,255,0.72); }

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ============================================================
   CHI SIAMO
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: start;
}
.about-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 22px;
}
.about-copy p { margin-bottom: 18px; }
.about-copy .btn { margin-top: 12px; }

.fleet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.fleet-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.fleet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--azure-300); }
.fleet-card svg { width: 34px; height: 34px; color: var(--azure-500); }
.fleet-num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--navy-900); }
.fleet-label { font-size: 0.9rem; color: var(--text-soft); font-weight: 500; }
.fleet-card--wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 20px; background: linear-gradient(120deg, var(--navy-900), var(--navy-800)); border-color: transparent; }
.fleet-card--wide svg { color: var(--azure-300); flex-shrink: 0; }
.fleet-card--wide .fleet-num { color: var(--white); }
.fleet-card--wide .fleet-label { color: rgba(255,255,255,0.7); }
.fleet-card--wide:hover { border-color: transparent; }

/* ============================================================
   SERVIZI
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  position: relative;
  z-index: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--azure-300); }

/* Soft glow that sits BEHIND the card (negative z-index) and peeks out
   just past its edges, following the pointer — opacity toggled by JS. */
.service-card::before {
  content: '';
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  filter: blur(18px);
  transition: opacity .4s var(--ease);
  background: radial-gradient(130px circle at calc(var(--cx, 50%) + 14px) calc(var(--cy, 50%) + 14px), rgba(63, 151, 194, 0.32), transparent 72%);
}
.service-card.is-glowing::before { opacity: 1; }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-800), var(--petrol-600));
  margin-bottom: 22px;
}
.service-icon svg { width: 28px; height: 28px; color: var(--white); }
.service-card h3 { font-size: 1.18rem; margin-bottom: 12px; }
.service-card p { font-size: 0.96rem; }

/* ============================================================
   COPERTURA NAZIONALE
   ============================================================ */
.coverage-copy--full { max-width: 720px; }
.coverage-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 18px; }
.coverage-copy > p { margin-bottom: 30px; }

.region-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-800);
}

.sicily-block {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--white);
}
.sicily-block h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 8px; }
.sicily-block p { color: rgba(255,255,255,0.65); margin-bottom: 18px; font-size: 0.92rem; }
.province-list { display: flex; flex-wrap: wrap; gap: 10px; }
.province-list li {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ============================================================
   CONTATTI
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.contact-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}
.contact-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.08); border-color: var(--azure-300); }
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(111,184,217,0.14);
  margin-bottom: 18px;
}
.contact-icon svg { width: 22px; height: 22px; color: var(--azure-300); }
.contact-card h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 12px; }
.contact-card p { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin-bottom: 6px; }
.contact-card a {
  display: block;
  color: var(--azure-300);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  transition: color .25s var(--ease);
  word-break: break-word;
}
.contact-card a:hover { color: var(--white); }
.contact-card .contact-email { font-size: 0.94rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.65); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr 0.85fr 1fr;
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 48px;
}
.footer-logo { height: 42px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.92rem; max-width: 280px; }
.footer-col h4 { color: var(--white); font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.92rem; transition: color .25s var(--ease); }
.footer-col a:hover { color: var(--white); }
.footer-col p { font-size: 0.92rem; margin-bottom: 14px; color: rgba(255,255,255,0.55); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom-inner { padding-top: 24px; padding-bottom: 24px; }
.footer-bottom p { font-size: 0.84rem; color: rgba(255,255,255,0.45); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s var(--ease), background .3s var(--ease);
  z-index: 80;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--azure-500); }
.back-to-top svg { width: 20px; height: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .fleet-card--wide { grid-column: span 2; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .hero-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .fleet-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 40px; }
  /* keep the copyright line from running under the fixed back-to-top button */
  .footer-bottom-inner { padding-right: 76px; }
  .section { padding: 76px 0; }
  .hero { padding-top: calc(var(--header-h) + 40px); }
  .hero-actions { margin-bottom: 56px; }
  .btn { padding: 14px 24px; font-size: 0.92rem; }
}
