/* =========================================================
   JESAP Consulting — Home (index.html)
   Stili specifici della home. Il design system condiviso
   (nav, footer, bottoni, sezioni) è in base.css.
   ========================================================= */

/* ========= HERO ========= */
.hero { padding-top: 56px; padding-bottom: 24px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
.hero-left { padding-top: 80px; }
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } .hero-left { padding-top: 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: var(--nero);
  background: white; border: 1px solid rgba(43, 46, 51, 0.08);
  padding: 7px 14px 7px 8px; border-radius: 999px;
}
.eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--viola);
  box-shadow: 0 0 0 0 rgba(152, 60, 142, 0.6);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(152, 60, 142, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(152, 60, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(152, 60, 142, 0); }
}

.h1 {
  font-family: var(--display);
  font-size: clamp(44px, 6.2vw, 96px);
  line-height: 0.93; letter-spacing: -0.035em; font-weight: 600;
  color: var(--nero); margin: 22px 0 0;
}
.h1 .italic {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--viola); letter-spacing: -0.01em; padding-right: 8px;
}
.h1-line1 { white-space: nowrap; }
.h1 .underline { position: relative; display: inline-block; }
.h1 .underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em;
  height: 0.14em; background: linear-gradient(90deg, #983C8E 0%, #7A5EA8 100%);
  opacity: .55; border-radius: 6px;
  transform: scaleX(0); transform-origin: left center;
  animation: underlineDraw 1.65s cubic-bezier(.4, 0, .2, 1) 2.4s forwards;
}
@keyframes underlineDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lead { margin-top: 28px; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 520px; }
.lead strong { color: var(--nero); }

.hero-cta { display: flex; gap: 20px; margin-top: 32px; flex-wrap: wrap; }
.hero-cta .btn { min-width: 143px; }

/* hero staggered entrance */
.hero-anim, .hero-anim-right {
  opacity: 0; transform: translateY(16px); display: inline-block;
  animation: heroReveal 1s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: var(--d, 0s);
}
.eyebrow.hero-anim { display: inline-flex; }
.lead.hero-anim, .hero-cta.hero-anim, .hero-anim-right { display: block; }
.hero-anim-right { animation-delay: 2.55s; }
@keyframes heroReveal { to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .hero-anim-right { display: none; } }

/* ========= HERO — Schede a ventaglio (variante E) ========= */
.fan { position: relative; height: 580px; }
.fan-card {
  position: absolute; left: 12%; right: 0; bottom: 0; height: 420px;
  border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid rgba(43, 46, 51, 0.08);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.3);
  transition: transform .55s cubic-bezier(.4, 0, .2, 1), box-shadow .4s ease;
  pointer-events: none;
  --i: 0;
}
.fan-card.is-top { pointer-events: auto; }
.fan-card[data-card="0"] { background: var(--viola-scuro); color: white; border-color: transparent; }
.fan-card[data-card="1"] { background: var(--viola); color: white; border-color: transparent; }
.fan-card[data-card="2"] { background: var(--nero); color: white; border-color: transparent; }
.fan-card[data-card="3"] { background: #FFFFFF; color: var(--nero); }
.fan-card[data-rank="0"] { --i: 1; }
.fan-card[data-rank="1"] { --i: 2; }
.fan-card[data-rank="2"] { --i: 3; }
.fan-card {
  transform: translateY(calc(var(--i) * -48px)) rotate(calc(var(--i) * -1.4deg));
  transform-origin: 50% 100%;
  z-index: calc(30 - var(--i));
}
.fan-card.is-top { box-shadow: 0 24px 50px -16px rgba(122, 94, 168, 0.4), 0 4px 12px rgba(0, 0, 0, 0.1); }
.fan-card:not(.is-top):has(.fan-strip:hover) {
  transform: translateY(calc(var(--i) * -48px - 4px)) rotate(0deg);
  box-shadow: 0 22px 40px -16px rgba(122, 94, 168, 0.4);
}
.fan-card:not(.is-top):has(.fan-strip:hover) .fan-strip { background: rgba(255, 255, 255, 0.10); }
.fan-card[data-card="3"]:not(.is-top):has(.fan-strip:hover) .fan-strip { background: rgba(152, 60, 142, 0.08); }

.fan-strip {
  height: 46px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 0 22px;
  border-bottom: 1px solid rgba(43, 46, 51, 0.06);
  pointer-events: auto; cursor: pointer;
}
.fan-card[data-card="0"] .fan-strip,
.fan-card[data-card="1"] .fan-strip,
.fan-card[data-card="2"] .fan-strip { border-bottom-color: rgba(255, 255, 255, 0.15); }
.fan-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; letter-spacing: 0.12em; opacity: 0.65; font-weight: 600; flex-shrink: 0;
}
.fan-label {
  font-family: var(--display); font-size: 15px; letter-spacing: -0.01em; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fan-body {
  padding: 28px; flex: 1; display: flex; flex-direction: column;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease, transform .4s ease; pointer-events: none;
}
.fan-card.is-top .fan-body { opacity: 1; transform: none; pointer-events: auto; }
.fan-icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  display: grid; place-items: center; color: white; flex-shrink: 0;
}
.fan-card[data-card="3"] .fan-icon { background: rgba(43, 46, 51, 0.08); color: var(--viola); }
.fan-icon svg { width: 17px; height: 17px; }
.fan-desc { font-size: 15px; line-height: 1.55; margin: 0 0 18px; opacity: 0.88; }
.fan-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.fan-points li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.4; opacity: 0.92; }
.fan-points li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 1.5px; background: currentColor; border-radius: 2px; opacity: 0.6;
}
@media (max-width: 480px) {
  .fan { height: 520px; }
  .fan-card { left: 0; }
}

/* ========= ABOUT US ========= */
.about-us { padding-top: 80px; padding-bottom: 60px; }
.about-us .section-head { margin-bottom: 64px; }
.about-section-head { text-align: left; display: block !important; }
.about-section-head > div { max-width: 720px; margin: 0; }
.about-section-head .section-label { color: var(--viola); margin-bottom: 18px; }
.about-section-head .section-title .italic { font-weight: 600; }

.about-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; margin-bottom: 56px; }
/* Foto a destra, testi a sinistra (l'ordine nel DOM resta foto→testo) */
.about-text { order: 1; }
.about-photos-col { order: 2; }
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; gap: 36px; } .about-text, .about-photos-col { order: 0; } }
.about-photos-col { position: relative; }
.ph-a { position: relative; height: 440px; }
.ph-a-card {
  position: absolute; width: 72%; height: 56%;
  border-radius: 12px; border: 8px solid white;
  box-shadow: 0 18px 42px -10px rgba(43, 46, 51, 0.28);
  background-size: cover; background-position: center;
}
.ph-a-top { top: 0; right: 0; transform: rotate(3deg); background-image: url("../assets/fototeam2.jpg"); }
.ph-a-bot { bottom: 0; left: 0; transform: rotate(-4deg); background-image: url("../assets/fototeam1.jpg"); }

.about-text { display: flex; flex-direction: column; gap: 22px; }
.abt-lead { font-size: 16px; line-height: 1.65; color: var(--nero); margin: 0; }
.abt-lead strong { font-weight: 600; }
.abt-lead em, .abt-lead i { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--viola); }

.mv-title {
  display: block; font-family: var(--display);
  font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; letter-spacing: -0.01em;
  color: var(--nero); margin: 6px 0 4px;
}
.mv-title span { position: relative; display: inline; z-index: 0; }
.mv-title span::before {
  content: ""; position: absolute; left: -4px; right: -4px; top: 0.05em; bottom: 0.05em;
  background: linear-gradient(90deg, #983C8E 0%, #7A5EA8 100%);
  opacity: 0.55; border-radius: 4px; transform: skewX(-6deg); z-index: -1;
  animation: hlDraw 1s cubic-bezier(.4, 0, .2, 1) .4s both;
}
.mv-card {
  position: relative;
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  color: white; border-radius: 22px 22px 22px 6px; padding: 12px 18px;
  box-shadow: 0 14px 28px -10px rgba(152, 60, 142, 0.35);
}
.mv-vision { border-radius: 22px 22px 6px 22px; }
.mv-card p { margin: 0; font-size: 15px; line-height: 1.6; color: white; }
.mv-card em {
  font-family: var(--serif); font-style: italic; font-weight: 400; color: white;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.5); text-underline-offset: 3px;
}

/* ----- Valori (riga orizzontale sotto foto + testo) ----- */
.values-row-wrap { margin-top: 4px; }
.values-title { margin: 4px 0 26px; }
.values-row {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px;
}
.value-item {
  flex: 0 0 auto; width: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.value-ic {
  display: grid; place-items: center; width: 66px; height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(152, 60, 142, 0.55);
  transition: transform .25s ease, box-shadow .25s ease;
}
.value-ic svg { width: 30px; height: 30px; }
.value-item:hover .value-ic {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -10px rgba(152, 60, 142, 0.6);
}
.value-name {
  font-family: var(--display); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--nero);
}
@media (max-width: 560px) {
  /* Mobile: 4 valori agli angoli, "Responsabilità" al centro (a quinconce) */
  .values-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 30px 8px; justify-items: center;
  }
  .value-item { width: auto; }
  .value-item:nth-child(1) { grid-column: 1; grid-row: 1; } /* Passione */
  .value-item:nth-child(2) { grid-column: 2; grid-row: 1; } /* Sviluppo */
  .value-item:nth-child(5) { grid-column: 1 / -1; grid-row: 2; } /* Responsabilità (centro) */
  .value-item:nth-child(3) { grid-column: 1; grid-row: 3; } /* Collaborazione */
  .value-item:nth-child(4) { grid-column: 2; grid-row: 3; } /* Crescita */
}

/* ========= NUMERI + RICONOSCIMENTI ========= */
.about-block { margin-bottom: 80px; }
.about-block:last-child { margin-bottom: 0; }
.about-block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.about-block-head h3 {
  font-family: var(--display); font-size: clamp(23px, 2.5vw, 35px);
  font-weight: 600; letter-spacing: -0.025em; color: var(--nero); margin: 0;
}
.about-block-head h3 .italic { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--viola); }

.panel-wrap { display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin-bottom: 32px; }
.panel-wrap:last-child { margin-bottom: 0; }
.panel-label { margin-bottom: 20px; padding-left: 2px; }
.panel-rule { height: 1px; width: 64px; margin-top: 14px; }
.numeri-side-headline, .ric-c-headline {
  font-family: var(--display); font-size: clamp(23px, 2.5vw, 35px); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.05; margin: 0; color: var(--nero);
}
.numeri-side-headline em, .ric-c-headline em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--viola); }

.numeri-side { position: relative; width: 100%; overflow: hidden; }
.numeri-carousel { position: relative; overflow: hidden; width: 100%; padding: 12px 0; }
.numeri-track { display: flex; will-change: transform; }
.numeri-slide {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 36px 12px;
  cursor: pointer; user-select: none;
}
.ns-num {
  font-family: var(--display); font-size: clamp(38px, 3.8vw, 56px);
  font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  color: var(--nero); transition: color 0.4s ease;
}
.numeri-slide.is-center .ns-num { color: var(--viola); }
.ns-label {
  font-size: 0.7rem; font-weight: 500; color: var(--muted); text-align: center;
  margin-top: 10px; text-transform: uppercase; letter-spacing: 0.07em;
  transition: color 0.4s ease, font-weight 0.2s;
  /* niente nowrap: su schermi stretti ogni slide ha poca larghezza e
     un'etichetta lunga (es. "Soddisfazione clienti") sbordava nelle
     slide vicine invece di andare a capo dentro la propria colonna */
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.25;
}
@media (max-width: 480px) {
  .numeri-slide { padding: 30px 4px; }
  .ns-label { font-size: 0.62rem; }
}
.numeri-slide.is-center .ns-label { color: var(--nero); font-weight: 700; }

.ric-c { position: relative; color: var(--nero); overflow: visible; width: 100%; }
.ric-c-cards { position: relative; z-index: 1; display: flex; flex-direction: row; gap: 16px; flex: 1; align-items: stretch; }
@media (max-width: 760px) { .ric-c-cards { flex-direction: column; } }
.ric-c-card {
  position: relative; flex: 1; min-width: 0;
  border-radius: 16px; padding: 24px; overflow: hidden;
  border: 1.5px solid rgba(152, 60, 142, 0.25); background: white;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; cursor: default;
}
.ric-c-card:hover { background: var(--viola-soft); border-color: var(--viola); box-shadow: 0 12px 32px -10px rgba(152, 60, 142, 0.18); }
.ric-c-card-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(152, 60, 142, 0.18) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.ric-c-card:hover .ric-c-card-glow { opacity: 1; }
.ric-c-ribbon {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px;
  background: rgba(152, 60, 142, 0.08); border: 1px solid rgba(152, 60, 142, 0.25);
  border-radius: 999px; margin-bottom: 16px;
}
.ric-c-ribbon svg { width: 14px; height: 14px; color: var(--viola); }
.ric-c-ribbon span {
  font-family: var(--display); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.04em; color: var(--viola); white-space: nowrap;
}
.ric-c-text { font-size: 15px; line-height: 1.6; color: var(--nero); margin: 0; position: relative; z-index: 1; }
.ric-c-text strong { color: var(--nero); font-weight: 600; }
.ric-c-text em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--viola); }

/* ========= PARTNERS ========= */
.partners-wrap { position: relative; display: flex; align-items: center; gap: 12px; }
.partners-rail {
  position: relative; overflow: hidden; padding: 28px 0; flex: 1; min-width: 0;
  border-top: 1px solid rgba(43, 46, 51, 0.08); border-bottom: 1px solid rgba(43, 46, 51, 0.08);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  cursor: grab;
}
.partners-rail.is-dragging { cursor: grabbing; }
.partners-track { display: flex; align-items: center; gap: 20px; width: max-content; will-change: transform; }
.partner {
  height: 80px; width: 156px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 20px;
  background: white;
  border: 1px solid rgba(43, 46, 51, 0.08);
  border-radius: 16px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  -webkit-user-drag: none;
  overflow: hidden;
}
.partner:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -8px rgba(43, 46, 51, 0.15); border-color: rgba(152, 60, 142, 0.25); }
.partner.on-dark { background: var(--nero); border-color: transparent; }
.partner img {
  max-height: 100%; max-width: 100%;
  object-fit: contain; display: block;
  pointer-events: none; -webkit-user-drag: none;
}
.partners-nav {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: white; color: var(--nero);
  border: 1px solid rgba(43, 46, 51, 0.12);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
}
.partners-nav svg { width: 18px; height: 18px; }
.partners-nav:hover { color: var(--viola); border-color: rgba(152, 60, 142, 0.35); box-shadow: 0 8px 20px -8px rgba(43, 46, 51, 0.2); transform: translateY(-2px); }
@media (max-width: 640px) { .partners-nav { display: none; } }

/* ========= CTA ========= */
.about-cta-wrap { margin-top: 56px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
