/* Pagina Servizi: struttura propria, fuori da Elementor. */

.svc {
  --svc-bg: #f5f5f5;
  --svc-card: #ffffff;
  --svc-text: #262626;
  --svc-muted: #6b6b6b;
  --svc-line: rgba(38, 38, 38, 0.1);
  --svc-accent: #8c0c0c;
  --svc-accent-soft: rgba(128, 8, 8, 0.08);
  --svc-dark: #1c1c1c;
  --svc-dark-text: #f2f2f2;
  --svc-shadow: 0 30px 60px -30px rgba(20, 20, 20, 0.25);
  --svc-radius: 24px;
  --svc-shell: min(1320px, calc(100vw - 32px));

  color: var(--svc-text);
  font-family: Inter, sans-serif;
  padding-bottom: clamp(64px, 10vw, 140px);
}

body[data-theme="dark"] .svc {
  --svc-bg: #232323;
  --svc-card: #2b2b2b;
  --svc-text: #f2f2f2;
  --svc-muted: #a3a3a3;
  --svc-line: rgba(255, 255, 255, 0.1);
  --svc-accent: #e05252;
  --svc-accent-soft: rgba(224, 82, 82, 0.12);
  --svc-dark: #111111;
  --svc-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.svc__shell {
  width: var(--svc-shell);
  margin: 0 auto;
}

.svc__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--svc-muted);
}

.svc__eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--svc-accent);
}

.svc h1,
.svc h2,
.svc h3 {
  font-family: Poppins, sans-serif;
  font-weight: 700;
  color: var(--svc-text);
  margin: 0;
}

/* ------------------------------------------------------------ apertura */

.svc-hero {
  padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 6vw, 80px);
}

.svc-hero__title {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.svc-hero__title span {
  color: var(--svc-accent);
}

.svc-hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-top: clamp(28px, 4vw, 48px);
}

.svc-hero__lead {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--svc-muted);
  max-width: 46ch;
}

.svc-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-hero__chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--svc-line);
  border-radius: 999px;
  background: var(--svc-card);
  color: var(--svc-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.svc-hero__chips a span {
  font-size: 12px;
  color: var(--svc-muted);
}

.svc-hero__chips a:hover {
  border-color: var(--svc-accent);
  color: var(--svc-accent);
  transform: translateY(-2px);
}

/* ------------------------------------------------------------ griglia */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  perspective: 1400px;
}

.svc-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 32px;
  border: 1px solid var(--svc-line);
  border-radius: var(--svc-radius);
  background: var(--svc-card);
  overflow: hidden;
  scroll-margin-top: 120px;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}

/* alone che segue il cursore */
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--svc-accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.svc-card:hover {
  border-color: transparent;
  box-shadow: var(--svc-shadow);
}

.svc-card:hover::before {
  opacity: 1;
}

.svc-card.is-tilting {
  transition: transform 0.12s linear, box-shadow 0.4s ease, border-color 0.4s ease;
}

.svc-card > * {
  position: relative;
}

.svc-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.svc-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--svc-accent-soft);
  color: var(--svc-accent);
  transition: background 0.3s ease, color 0.3s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svc-card__icon svg {
  width: 26px;
  height: 26px;
}

.svc-card:hover .svc-card__icon {
  background: var(--svc-accent);
  color: #fff;
  transform: translateZ(30px) rotate(-6deg);
}

.svc-card__num {
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--svc-muted);
}

.svc-card__title {
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 10px !important;
  transform: translateZ(20px);
}

.svc-card__lead {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--svc-accent);
}

.svc-card__text {
  margin: 0 0 24px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--svc-muted);
}

.svc-card__list {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.svc-card__list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.svc-card__list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--svc-accent);
  transform: translateY(-2px);
}

.svc-card__foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--svc-line);
  font-size: 14px;
  color: var(--svc-muted);
}

.svc-card__foot a {
  color: var(--svc-text);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.svc-card__foot a:hover {
  color: var(--svc-accent);
  background-size: 100% 1px;
}

/* ------------------------------------------------------------ metodo */

.svc-method {
  padding-top: clamp(80px, 11vw, 150px);
}

.svc-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.svc-section-head h2 {
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.svc-section-head p {
  margin: 0;
  max-width: 38ch;
  color: var(--svc-muted);
  font-size: 17px;
  line-height: 1.55;
}

.svc-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.svc-step {
  position: relative;
  padding-top: 28px;
  border-top: 2px solid var(--svc-line);
}

.svc-step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--svc-accent);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svc-step.is-in::before {
  width: 100%;
}

.svc-step__num {
  display: block;
  margin-bottom: 18px;
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--svc-accent);
}

.svc-step h3 {
  font-size: 24px;
  margin-bottom: 10px !important;
}

.svc-step p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--svc-muted);
}

/* ------------------------------------------------------------ valori */

.svc-values {
  margin-top: clamp(80px, 11vw, 150px);
}

.svc-values__box {
  padding: clamp(36px, 6vw, 80px);
  border-radius: calc(var(--svc-radius) + 8px);
  background: var(--svc-dark);
  color: var(--svc-dark-text);
}

.svc-values__box .svc__eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.svc-values__box h2 {
  color: var(--svc-dark-text);
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.svc-values__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(36px, 5vw, 64px) 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.svc-value {
  padding: 28px 24px;
  background: var(--svc-dark);
  transition: background 0.3s ease;
}

.svc-value:hover {
  background: #262626;
}

.svc-value h3 {
  color: var(--svc-dark-text);
  font-size: 20px;
  margin-bottom: 8px !important;
}

.svc-value p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
}

.svc-values__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.svc-values__cta p {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  color: rgba(255, 255, 255, 0.75);
}

.svc-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  background: #fff;
  color: #1c1c1c;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, color 0.2s ease;
}

.svc-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.svc-btn:hover {
  background: #8c0c0c;
  color: #fff;
  transform: translateY(-2px);
}

.svc-btn:hover svg {
  transform: translateX(4px);
}

/* ------------------------------------------------------------ comparsa */

.svc-reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svc-reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

/* le card hanno sia la comparsa sia l'inclinazione: servono entrambe le transizioni */
.svc-card.svc-reveal {
  transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.svc-card.svc-reveal.is-tilting {
  transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.12s linear, box-shadow 0.4s ease, border-color 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .svc-reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }
  .svc-card,
  .svc-card__icon,
  .svc-step::before {
    transition: none;
  }
  .svc-step::before {
    width: 100%;
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .svc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .svc-steps,
  .svc-values__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .svc-hero__row {
    grid-template-columns: 1fr;
  }
  .svc-hero__chips {
    justify-content: flex-start;
  }
  .svc-section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .svc-grid,
  .svc-steps,
  .svc-values__grid {
    grid-template-columns: 1fr;
  }
  .svc-card {
    min-height: 0;
    padding: 26px;
  }
  .svc-card__top {
    margin-bottom: 32px;
  }
  .svc-btn {
    width: 100%;
    justify-content: center;
  }
}
