/* ══ HOME — layout da mockup "Tavola_disegno_1" ══
   (font, gradiente e header sono ora globali: variables.css / header.css) */

/* ── Layout: hero a tutta larghezza, sezioni su contenitore largo ── */
#hero .container { max-width: none; padding: 0 clamp(1.5rem, 6vw, 7rem); }
.container { max-width: 1560px; }

/* ══ HERO ══ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  padding: 150px 0 7rem;
  overflow: hidden;
  background-color: var(--clr-bg);
  background-image: url('../img/hero/hero-home.jpg');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
}

/* velo scuro: più denso in basso/sinistra per leggere i testi */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(8,15,30,0.72) 0%, rgba(8,15,30,0.25) 45%, rgba(8,15,30,0.1) 100%),
    linear-gradient(to right, rgba(8,15,30,0.45) 0%, rgba(8,15,30,0) 60%);
  z-index: 0;
}

#hero .container {
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero-content { max-width: 1200px; }

.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.12;
  font-size: clamp(2rem, 4.4vw, 4.6rem);
  margin-bottom: 1.5rem;
  color: #ffffff;
}
.hero-content h1 strong { font-weight: 800; }

.hero-sub {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.3vw, 2.1rem);
  color: #ffffff;
  margin-bottom: 2.25rem;
}
.hero-sub strong { font-weight: 800; }

.hero-btns { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.hero-lead {
  align-self: flex-end;
  max-width: 640px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.5;
  color: rgba(255,255,255,0.95);
}

.hero-scroll {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  z-index: 1;
}

.hero-scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, #ffffff, transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ══ CHI SIAMO — sfondo chiaro ══ */
#chi-siamo {
  background: #f4f6f9;
  padding: 110px 0;
}
#chi-siamo .home-title { color: #14509a; }
#chi-siamo .home-title strong {
  background: linear-gradient(90deg, #1c3f91, #006a9c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.chi-siamo-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.chi-siamo-img {
  border-radius: clamp(40px, 6.5vw, 90px) clamp(30px, 4.5vw, 64px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(13,22,40,0.18);
}
.chi-siamo-img img { width: 100%; height: auto; display: block; }

.chi-siamo-text p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.55;
  color: #4a5058;
  text-align: justify;
  margin-bottom: 1.75rem;
}
.chi-siamo-text strong { font-weight: 800; color: #3d434b; }
.chi-siamo-text .btn-grad { margin-top: 0.5rem; }

/* ══ PERCHÉ SCEGLIERCI — gradiente blu ══ */
#perche { background: var(--grad-brand); padding: 110px 0; }
#perche .home-title { color: #ffffff; }

.perche-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.perche-card {
  background: #ffffff;
  border-radius: 40px;
  padding: 2.25rem 2rem 2.25rem;
  min-height: 230px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.perche-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(8,15,30,0.25);
}

.perche-card-icon {
  width: 58px; height: 58px;
  border-radius: 12px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: #ffffff;
}
.perche-card-icon svg {
  width: 34px; height: 34px;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.perche-card h3 {
  font-family: var(--font-main);
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em;
  margin-bottom: 0.6rem; color: #0d1628;
}
.perche-card p { font-size: 0.92rem; line-height: 1.65; color: #4a5568; }

/* ══ SERVIZI PREVIEW — sfondo chiaro ══ */
#servizi-preview { background: #f4f6f9; padding: 110px 0; }
#servizi-preview .home-title { margin-bottom: 4rem; }
#servizi-preview .home-title strong { color: #5f6368; }

.servizi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.servizio-card {
  background: #ffffff;
  border: 1px solid #d0d7e3;
  border-radius: 44px;
  padding: 3rem 2.75rem 2.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.servizio-card:hover {
  border-color: var(--clr-blue);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(30,80,180,0.12);
}

.servizio-card-icon {
  width: 58px; height: 58px;
  border-radius: 12px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.75rem;
  color: #ffffff;
}
.servizio-card-icon svg {
  width: 34px; height: 34px;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.servizio-card h3 {
  font-family: var(--font-main);
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 1rem; color: #0d1628;
}
.servizio-card p { font-size: 1rem; margin-bottom: 1.75rem; color: #4a5568; line-height: 1.75; }

.servizio-card-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }

.tag {
  font-size: 0.85rem; font-weight: 500;
  color: #1c3f91;
  background: #eef2fb;
  border: 1px solid #d3dcf2;
  border-radius: 100px;
  padding: 6px 16px;
}

.servizio-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 1rem; font-weight: 600;
  color: #1c3f91;
  transition: gap var(--transition);
}
.servizio-link:hover { gap: 0.9rem; }
.servizio-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ══ SETTORI — sfondo scuro ══ */
#settori { background: var(--clr-bg); padding: 100px 0; }

.settori-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.settore-item {
  display: flex; align-items: flex-end;
  min-height: 280px;
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative; overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.settore-item:hover { border-color: rgba(110,168,254,0.5); transform: translateY(-4px); }

.settore-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.6s ease;
}
.settore-item:hover .settore-bg { transform: scale(1.06); }

/* gradiente per leggere il titolo sopra la foto */
.settore-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,15,30,0.92) 0%, rgba(8,15,30,0.45) 45%, rgba(8,15,30,0.05) 100%);
  z-index: 1;
}

.settore-item h4 {
  font-size: 1.15rem; font-weight: 700;
  color: #ffffff;
  position: relative; z-index: 2;
}

/* ══ PROCESSO — sfondo bianco ══ */
#processo { background: #f4f6f9; padding: 100px 0; }
#processo .section-badge { border-color: rgba(30,80,180,0.3); color: var(--clr-blue); }
#processo h2 { color: #0d1628; }
#processo .section-header p { color: #4a5568; }
#processo .divider { background: var(--clr-blue); }

.processo-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  gap: 0;
  row-gap: 3rem;
}

/* Linea e freccia connettore: posizionate da JS (drawProcessArrows in main.js),
   qui solo lo stile visivo */
.processo-line {
  position: absolute;
  height: 2px;
  background: #d0d7e3;
  z-index: 0;
  pointer-events: none;
  top: 0; /* sovrascritto inline da JS */
}

.processo-arrow {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
  transform: translate(-100%, -50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #1e50b4;
}

.step {
  text-align: center;
  padding: 0 1.5rem;
  cursor: default;
  position: relative;
  z-index: 1;
}

.step-dot {
  font-family: var(--font-heading);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #d0d7e3;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 0.85rem; font-weight: 700;
  color: #a0aab8;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 4px #f4f6f9;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.step:hover .step-dot {
  background: var(--clr-blue);
  border-color: var(--clr-blue);
  color: #ffffff;
  box-shadow: 0 0 0 4px #f4f6f9, 0 0 0 6px rgba(30,80,180,0.2);
  transform: scale(1.1);
}

.step h4 {
  font-size: 0.95rem; margin-bottom: 0.5rem;
  color: #0d1628;
  transition: color var(--transition);
}
.step p {
  font-size: 0.825rem; color: #4a5568;
  transition: color var(--transition);
}

.step:hover h4 { color: var(--clr-blue); }


/* ══ CTA CONTATTI — gradiente blu ══ */
#cta-contatti {
  background: var(--grad-brand);
  padding: 120px 0;
  color: #ffffff;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 4rem;
  align-items: center;
}

.cta-title h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 5.6vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.cta-title h2 strong { font-weight: 800; }

.cta-oggi {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  color: #ffffff;
  margin-top: 0.5rem;
}
.cta-oggi strong { font-weight: 700; }

.cta-side p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 2.25rem;
}

.cta-btns { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .perche-grid    { grid-template-columns: repeat(2, 1fr); }
  .settori-grid   { grid-template-columns: repeat(2, 1fr); }
  .chi-siamo-grid { gap: 2.5rem; }

  /* Sotto i 1025px: griglia 2 colonne, ordine naturale 1-2 / 3-4 / 5-6, niente frecce */
  .processo-steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
}

@media (max-width: 768px) {
  #hero { padding: 120px 0 7rem; }
  .hero-lead { align-self: flex-start; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .chi-siamo-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .chi-siamo-text p { text-align: left; }
  .perche-grid    { grid-template-columns: 1fr; }
  .servizi-grid   { grid-template-columns: 1fr; }
  .servizio-card  { padding: 2.25rem 1.75rem; border-radius: 32px; }
  .settori-grid   { grid-template-columns: 1fr; }
  .cta-grid       { grid-template-columns: 1fr; gap: 2rem; }
  #chi-siamo, #perche, #servizi-preview { padding: 70px 0; }
  .home-title { margin-bottom: 2.5rem; }
}
