/* ============ Officina Del Lucido — Stylesheet ============ */

:root {
  --bg-black: #05070d;
  --bg-navy: #060c1c;
  --bg-navy-2: #0a1530;
  --blue: #1e78e0;
  --blue-light: #4ea3ff;
  --blue-deep: #0d3f8f;
  --silver: #e8edf5;
  --silver-dim: #b9c4d6;
  --white: #ffffff;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe58;

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Poppins", sans-serif;

  --radius: 14px;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.35);
  --transition: all 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-black);
  color: var(--silver);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

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

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #052e12;
}
.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp i { font-size: 1.2rem; }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline:hover {
  border-color: var(--blue-light);
  background: rgba(78, 163, 255, 0.08);
  transform: translateY(-2px);
}

/* ============ Header ============ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(5, 7, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: 42px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--silver-dim);
  position: relative;
  transition: var(--transition);
}
.main-nav a:hover { color: var(--white); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--blue-light);
  transition: var(--transition);
}
.main-nav a:hover::after { width: 100%; }

.header-cta { margin-left: 12px; padding: 10px 20px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(5, 7, 13, 0.95) 0%, rgba(5, 7, 13, 0.86) 38%, rgba(5, 7, 13, 0.62) 70%, rgba(5, 7, 13, 0.4) 100%),
              linear-gradient(0deg, rgba(5, 7, 13, 0.7) 0%, transparent 30%, transparent 75%, rgba(5, 7, 13, 0.6) 100%);
  z-index: 1;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, black, transparent 75%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.glow-1 {
  width: 620px;
  height: 620px;
  top: -14%;
  right: -8%;
  background: radial-gradient(circle, rgba(30, 120, 224, 0.45), transparent 70%);
}
.glow-2 {
  width: 520px;
  height: 520px;
  bottom: -18%;
  left: -8%;
  background: radial-gradient(circle, rgba(13, 63, 143, 0.5), transparent 70%);
}

.hero-content { position: relative; z-index: 2; max-width: 720px; }

/* ============ Hero photo slideshow ============ */

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease;
}
.hero-slideshow .slide.is-active {
  opacity: 1;
}

/* ============ Hero car ============ */

.hero-car {
  position: absolute;
  right: 0;
  bottom: 6%;
  width: clamp(340px, 38vw, 640px);
  z-index: 1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 68% at 52% 56%, black 45%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 68% at 52% 56%, black 45%, transparent 78%);
}
.hero-car img {
  width: 100%;
  display: block;
  mix-blend-mode: screen;
  filter: brightness(1.08) contrast(1.05);
}
.hero-car::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 130% 0;
  mix-blend-mode: overlay;
}

.speed-line {
  position: absolute;
  right: -6px;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--blue-light));
  opacity: 0;
}
.sl1 { top: 32%; width: 120px; }
.sl2 { top: 48%; width: 85px; }
.sl3 { top: 62%; width: 140px; }

@media (max-width: 1024px) {
  .hero-car { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-car {
    animation: carDriveIn 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.75s both;
  }
  .hero-car::after {
    animation: shineSweep 2.4s ease-in-out 2.4s infinite;
  }
  .speed-line {
    animation: speedTrail 0.9s ease-out both;
  }
  .sl1 { animation-delay: 0.78s; }
  .sl2 { animation-delay: 0.86s; }
  .sl3 { animation-delay: 0.94s; }
}

@keyframes carDriveIn {
  0% { transform: translateX(60%) scale(0.92); opacity: 0; }
  45% { opacity: 1; }
  70% { transform: translateX(-1.5%) scale(1.01); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes speedTrail {
  0% { opacity: 0; transform: scaleX(0.3) translateX(30px); }
  35% { opacity: 0.9; }
  100% { opacity: 0; transform: scaleX(1) translateX(-70px); }
}

@keyframes shineSweep {
  0%, 15%, 100% { background-position: 130% 0; }
  55% { background-position: -30% 0; }
}


.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-light);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: 0.5px;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-title .accent {
  background: linear-gradient(100deg, var(--blue-light) 0%, var(--white) 25%, var(--blue) 50%, var(--blue-light) 75%);
  background-size: 250% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--silver-dim);
  max-width: 560px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--silver-dim);
}
.hero-trust i { color: var(--blue-light); }

/* ============ Hero animation ============ */

@media (prefers-reduced-motion: no-preference) {
  .glow-1 { animation: drift1 17s ease-in-out infinite alternate; }
  .glow-2 { animation: drift2 21s ease-in-out infinite alternate; }

  .hero-title .accent { animation: shine 6s linear infinite; }

  .hero-eyebrow,
  .hero-title,
  .hero-sub,
  .hero-actions,
  .hero-trust {
    opacity: 0;
    animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .hero-eyebrow { animation-delay: 0.05s; }
  .hero-title { animation-delay: 0.15s; }
  .hero-sub { animation-delay: 0.35s; }
  .hero-actions { animation-delay: 0.5s; }
  .hero-trust { animation-delay: 0.65s; }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shine {
  to { background-position: -250% center; }
}

@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-50px, 40px) scale(1.12); }
}

@keyframes drift2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -30px) scale(1.15); }
}

/* ============ Section headings ============ */

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
  text-align: center;
}
.section-eyebrow-light { color: var(--blue-light); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  letter-spacing: 0.5px;
  color: var(--bg-black);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 56px;
  line-height: 1.2;
}
.section-title-light { color: var(--white); text-align: left; margin: 0 0 20px; }

/* ============ Servizi ============ */

.servizi {
  background: var(--silver);
  padding: 100px 0;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .servizi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .servizi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .servizi-grid { grid-template-columns: 1fr; }
}

.servizio-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 30, 70, 0.08);
  transition: var(--transition);
  border: 1px solid rgba(10, 30, 70, 0.06);
}
.servizio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(10, 30, 70, 0.14);
}

.servizio-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.servizio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.servizio-card:hover .servizio-media img {
  transform: scale(1.07);
}
.servizio-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.35) 100%);
}

.servizio-body {
  padding: 22px 20px 24px;
}

.servizio-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-black);
  margin-bottom: 8px;
}
.servizio-card p {
  font-size: 0.86rem;
  color: #4a5568;
}

.servizio-featured {
  background: linear-gradient(160deg, var(--bg-navy-2), var(--bg-black));
  border: none;
}
.servizio-card.servizio-featured h3 { color: var(--white); }
.servizio-card.servizio-featured p { color: var(--silver-dim); }

/* ============ Perché Noi ============ */

.perche-noi {
  background: linear-gradient(160deg, var(--bg-navy) 0%, var(--bg-black) 100%);
  padding: 100px 0;
}

.perche-grid { display: flex; justify-content: center; }
.perche-text { max-width: 680px; }

.perche-desc {
  color: var(--silver-dim);
  font-size: 1.02rem;
  margin-bottom: 40px;
}

.perche-items {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 40px;
}

.perche-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.perche-item i {
  font-size: 1.4rem;
  color: var(--blue-light);
  background: rgba(30, 120, 224, 0.12);
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.perche-item h4 { color: var(--white); font-size: 1.02rem; margin-bottom: 4px; }
.perche-item p { color: var(--silver-dim); font-size: 0.92rem; }

/* ============ Galleria ============ */

.galleria {
  background: var(--silver);
  padding: 90px 0 100px;
}

.galleria-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.galleria-grid img {
  position: relative;
  height: 260px;
  width: auto;
  flex-grow: 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(10, 30, 70, 0.1);
  transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
}
.galleria-grid img:hover {
  transform: scale(1.025);
  filter: brightness(1.06);
  box-shadow: 0 16px 32px rgba(10, 30, 70, 0.2);
  z-index: 2;
}

@media (max-width: 860px) {
  .galleria-grid img { height: 190px; }
}
@media (max-width: 560px) {
  .galleria-grid { gap: 8px; }
  .galleria-grid img { height: 130px; border-radius: 8px; }
}

/* ============ Contatti ============ */

.contatti {
  background: var(--bg-black);
  padding: 100px 0;
}
.contatti .section-title { color: var(--white); }

.contatti-sub {
  text-align: center;
  color: var(--silver-dim);
  max-width: 560px;
  margin: -36px auto 50px;
}

.contatti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.contatto-card {
  background: var(--bg-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  transition: var(--transition);
}
.contatto-card i {
  font-size: 1.8rem;
  color: var(--blue-light);
  margin-bottom: 14px;
  display: inline-block;
}
.contatto-card h3 { color: var(--white); font-size: 1rem; margin-bottom: 8px; }
.contatto-card p { color: var(--silver-dim); font-size: 0.92rem; }
.contatto-card a { color: var(--blue-light); }
a.contatto-card:hover { transform: translateY(-6px); border-color: rgba(78, 163, 255, 0.35); }
.contatto-note {
  display: block;
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(233, 165, 60, 0.85);
  font-style: italic;
}

.contatto-whatsapp {
  background: linear-gradient(160deg, rgba(37, 211, 102, 0.14), var(--bg-navy-2));
  border-color: rgba(37, 211, 102, 0.3);
}
.contatto-whatsapp:hover { transform: translateY(-6px); }
.contatto-whatsapp i { color: var(--whatsapp); }

/* ============ Footer ============ */

.site-footer {
  background: var(--bg-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 56px 0 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
}

.footer-logo img {
  height: 52px;
  width: auto;
  display: block;
}
.footer-logo p {
  color: var(--silver-dim);
  font-size: 0.85rem;
  margin-top: 10px;
  font-family: var(--font-body);
}

.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--silver-dim); font-size: 0.92rem; transition: var(--transition); }
.footer-nav a:hover { color: var(--blue-light); }

.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver-dim);
  font-size: 1.05rem;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { color: var(--silver-dim); font-size: 0.82rem; }

/* ============ WhatsApp Floating Button ============ */

.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  z-index: 90;
  transition: var(--transition);
  animation: pulse 2.4s infinite;
}
.whatsapp-float:hover { transform: scale(1.08); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============ Reveal animation ============ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Responsive ============ */

@media (max-width: 860px) {
  .main-nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: rgba(5, 7, 13, 0.98);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-header.nav-open .header-cta {
    display: inline-flex;
    position: absolute;
    top: 300px;
    left: 24px;
  }

  .hero { padding-top: 120px; }
  .contatti-sub { margin-top: -20px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .whatsapp-float { width: 54px; height: 54px; font-size: 1.6rem; bottom: 18px; right: 18px; }
}
