/* =========================================================
   JESAP Consulting — Join Us (page-specific styles)
   Nav, footer, reset, :root, .wrap, .fade-up, buttons and
   section primitives live in base.css and are NOT redeclared.
   ========================================================= */

section[id] { scroll-margin-top: 110px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; color: var(--viola);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--viola); }

/* ========= HERO (full-bleed, single column) =========
   Solo padding-top/bottom: ".join-hero" ha anche ".wrap" (che dà già il
   padding orizzontale standard, 40px/22px su mobile). Il precedente
   "padding: 64px clamp(32px,6vw,96px) 72px" imponeva un padding
   orizzontale suo (fino a 96px) che vinceva su quello di ".wrap",
   rendendo il contenuto di questa pagina più stretto di tutte le altre. */
.join-hero {
  padding-top: 64px;
  padding-bottom: 72px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 52px;
  background: #EFEFEF;
  border-bottom: 1px solid rgba(152,60,142,0.08);
}
.why-wrap { display: flex; flex-direction: column; gap: 28px; }
.why-heading {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 12px; font-weight: 600; color: var(--viola);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0;
}
.why-heading::before {
  content: ""; width: 22px; height: 1px; background: var(--viola); flex-shrink: 0;
}
.hero-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  width: 100%;
  margin-top: 18px;
}
.join-hero-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; }

.recruit-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: white;
  border: 1px solid rgba(152,60,142,0.2);
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--viola);
  box-shadow: 0 8px 20px -14px rgba(152,60,142,0.4);
}
.recruit-badge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--viola);
  position: relative;
}
.recruit-badge .dot::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--viola);
  animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.join-h1 {
  font-family: var(--display);
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.08; letter-spacing: -0.04em; font-weight: 600;
  color: var(--nero);
  margin: 0; display: inline; white-space: nowrap;
}
.join-h1 .italic {
  font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--viola);
  letter-spacing: -0.01em;
}
.join-h1 .hl { position: relative; display: inline-block; z-index: 0; }
.join-h1 .hl::before {
  content: ""; position: absolute;
  left: -8px; right: -8px; top: 0.08em; bottom: 0.06em;
  background: linear-gradient(90deg, #983C8E 0%, #7A5EA8 100%);
  opacity: .5; border-radius: 4px;
  transform: skewX(-6deg) scaleX(0);
  transform-origin: left center; z-index: -1;
  animation: hlDraw 1s cubic-bezier(.4,0,.2,1) .5s forwards;
}
@keyframes hlDraw { to { transform: skewX(-6deg) scaleX(1); } }

.join-rot {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--viola);
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.08; letter-spacing: -0.04em;
  display: inline; margin-top: 0; padding-bottom: 0;
  white-space: nowrap;
  animation: wordSlide .55s cubic-bezier(.2,.7,.2,1);
}
@keyframes wordSlide { from { transform: translateY(14px); } to { transform: none; } }
.join-title-row {
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: baseline; gap: 0 0.22em;
  margin-top: 18px;
  max-width: 100%;
}
@media (max-width: 700px) {
  .join-title-row { flex-direction: column; align-items: flex-start; gap: 2px; }
}
.join-lead {
  font-size: 17px; line-height: 1.6; color: var(--muted);
  max-width: 460px; margin: 0;
}
.join-lead strong { color: var(--nero); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; flex-shrink: 0; }

/* ===== Hero ⊕ Perché merged layout ===== */
.hero-bento { display: flex; flex-direction: column; width: 100%; margin-top: 0; }
@media (max-width: 940px) { .hero-bento { margin-top: 8px; } }
.hb-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 800px) { .hb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .hb-grid { grid-template-columns: 1fr; } }
.hb-card {
  background: white;
  border: 1px solid rgba(43,46,51,0.06);
  border-radius: 22px;
  padding: 24px 22px 22px;
  display: flex; flex-direction: column; gap: 13px;
  position: relative; overflow: hidden;
  box-shadow: 0 20px 44px -28px rgba(43,46,51,0.28);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease,
    border-color .4s ease, background .6s ease, color .6s ease;
}
.hb-card::after {
  content: ""; position: absolute; top: -45%; left: 50%; transform: translateX(-50%);
  width: 170%; height: 80%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 0, rgba(152,60,142,0.16), transparent 70%);
  opacity: 0; transition: opacity .4s ease;
}
.hb-card > * { position: relative; z-index: 1; }
.hb-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 56px -28px rgba(43,46,51,0.3);
  border-color: rgba(152,60,142,0.22);
}
.hb-card:hover::after { opacity: 1; }
.hb-ic {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  color: white; display: grid; place-items: center;
  box-shadow: 0 12px 24px -10px rgba(152,60,142,0.55);
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .45s ease, background .6s ease;
}
.hb-card:hover .hb-ic { transform: scale(1.12) rotate(-6deg); box-shadow: 0 14px 30px -8px rgba(152,60,142,0.6), 0 0 0 8px rgba(152,60,142,0.12); }
.hb-ic svg { width: 23px; height: 23px; }
.hb-name { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--nero); margin: 0; line-height: 1.12; transition: color .6s ease; }
.hb-desc { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; transition: color .6s ease; }

/* Feature card (gradient, the anchor of the bento) */
.hb-card.is-feature {
  background: linear-gradient(150deg, var(--viola), var(--viola-scuro));
  border-color: transparent; color: white;
  box-shadow: 0 26px 50px -24px rgba(122,94,168,0.6);
}
.hb-card.is-feature::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1.4px);
  background-size: 16px 16px; opacity: .7;
}
.hb-card.is-feature::after { display: none; }
.hb-card.is-feature:hover { transform: translateY(-7px); }
.hb-card.is-feature .hb-ic { background: rgba(255,255,255,0.18); box-shadow: none; }
.hb-card.is-feature .hb-name { color: white; }
.hb-card.is-feature .hb-desc { color: rgba(255,255,255,0.9); }

/* ========= PROCESSO DI SELEZIONE (timeline) ========= */
.processo {
  background: var(--nero);
  color: white;
  border-radius: var(--radius-lg);
  max-width: 1160px;
  margin: 60px auto;
  padding: 70px clamp(28px, 5vw, 64px) 64px;
  position: relative; overflow: hidden;
}
@media (max-width: 1240px) { .processo { margin: 60px 40px; } }
@media (max-width: 720px) { .processo { margin: 50px 22px; padding: 48px 22px 50px; } }
.processo::before {
  content: ""; position: absolute; top: -150px; right: -100px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(152,60,142,0.45), transparent 70%);
  pointer-events: none;
}
.processo::after {
  content: ""; position: absolute; bottom: -180px; left: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122,94,168,0.35), transparent 70%);
  pointer-events: none;
}
.processo > * { position: relative; z-index: 1; }
.processo .eyebrow { color: #d6b3e3; }
.processo .eyebrow::before { background: #d6b3e3; }
.processo-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.processo-head .eyebrow { justify-content: center; }
.processo-title {
  font-family: var(--display);
  font-size: clamp(27px, 3.6vw, 48px);
  line-height: 1.0; letter-spacing: -0.03em; font-weight: 600;
  color: white; margin: 12px 0 0;
}
.processo-title .italic { font-family: var(--serif); font-style: italic; font-weight: 400; color: #d6b3e3; }

/* Timeline track */
.tline { position: relative; margin-bottom: 34px; }
.tline-line {
  /* Inset matches the horizontal center of the first/last dot in the
     4-column node grid (half a column = 100% / (2 * 4 columns) = 12.5%),
     so the track and its fill start/end exactly under the outer nodes
     instead of overshooting past them. */
  position: absolute; left: 12.5%; right: 12.5%; top: 26px; height: 3px;
  background: rgba(255,255,255,0.14); border-radius: 3px;
}
.tline-line-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--viola), #d6b3e3);
  border-radius: 3px; width: 0;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.tline-nodes {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
/* Mobile: una sola riga (come il processo commerciale in servizi), che
   scorre orizzontalmente se i 4 step non entrano tutti in larghezza. */
@media (max-width: 720px) {
  .tline-line { display: none; }
  .tline-nodes {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    gap: 10px; padding: 4px 2px 12px; margin: 0 -2px;
  }
  .tnode { flex: 1 0 0; min-width: 76px; scroll-snap-align: start; padding: 0 2px; }
  .tnode-dot { width: 48px; height: 48px; }
  .tnode-label { font-size: 12px; }
}
.tnode {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 0 4px;
}
.tnode-dot {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.18);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.7);
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.tnode-dot svg { width: 23px; height: 23px; }
.tnode-label {
  font-family: var(--display);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2;
  color: rgba(255,255,255,0.62); transition: color .3s ease;
}
.tnode-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  color: rgba(214,179,227,0.6);
}
.tnode.is-done .tnode-dot { background: var(--viola); border-color: var(--viola); color: white; }
.tnode.is-done .tnode-label { color: rgba(255,255,255,0.85); }
.tnode.is-active .tnode-dot {
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  border-color: transparent; color: white;
  transform: scale(1.12);
  box-shadow: 0 14px 30px -8px rgba(152,60,142,0.7), 0 0 0 6px rgba(152,60,142,0.18);
}
.tnode.is-active .tnode-label { color: white; }
.tnode.is-active .tnode-date { color: #d6b3e3; }

/* Step detail card */
.tdetail-wrap { position: relative; min-height: 188px; }
.tdetail {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 30px 34px;
  display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
@media (max-width: 720px) {
  /* Below the desktop breakpoint .tdetail switches out of absolute
     positioning, but all 4 cards stayed in normal flow at once — only
     the active one is visible (opacity:0 on the rest), yet the hidden
     ones still reserved their full height, stacking ~1000px of blank
     space above/below the visible card. Hiding inactive cards with
     display:none removes them from layout entirely so the wrap hugs
     the single visible card. */
  .tdetail { grid-template-columns: 1fr; gap: 14px; padding: 24px; position: relative; display: none; }
  .tdetail.is-active { display: grid; }
  .tdetail-wrap { min-height: auto; }
}
.tdetail.is-active { opacity: 1; transform: none; pointer-events: auto; }
.tdetail-step {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #d6b3e3; margin-bottom: 10px;
}
.tdetail-name {
  font-family: var(--display);
  font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05;
  color: white; margin: 0;
}
.tdetail-name em { font-family: var(--serif); font-style: italic; font-weight: 400; color: #d6b3e3; }
.tdetail-datepill {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  background: rgba(152,60,142,0.3);
  border: 1px solid rgba(214,179,227,0.3);
  color: #f0d9f5;
  border-radius: 999px; padding: 6px 13px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.tdetail-datepill svg { width: 13px; height: 13px; }
.tdetail-body { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.78); }
.tdetail-body strong { color: white; font-weight: 600; }

/* ========= FAQ ========= */
.faq { padding-top: 64px; padding-bottom: 40px; }
.faq-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }
.faq-aside { position: sticky; top: 100px; }
@media (max-width: 900px) { .faq-aside { position: static; } }
.faq-title {
  font-family: var(--display);
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 0.95; letter-spacing: -0.035em; font-weight: 700;
  color: var(--viola); margin: 14px 0 0;
}
.faq-help { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 22px 0 18px; max-width: 320px; }
.faq-mails { display: flex; flex-direction: column; gap: 10px; }
.faq-mail {
  display: inline-flex; align-items: center; gap: 10px;
  background: white; border: 1px solid rgba(43,46,51,0.08);
  border-radius: 14px; padding: 12px 16px;
  font-weight: 600; font-size: 14px; color: var(--nero);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.faq-mail:hover { border-color: var(--viola); color: var(--viola); transform: translateX(3px); box-shadow: 0 10px 22px -16px rgba(152,60,142,0.4); }
.faq-mail svg { width: 16px; height: 16px; color: var(--viola); }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: white;
  border: 1px solid rgba(43,46,51,0.07);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.faq-item.is-open { border-color: rgba(152,60,142,0.25); box-shadow: 0 18px 40px -26px rgba(43,46,51,0.22); }
.faq-q {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px;
  font-family: var(--display);
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--nero);
}
.faq-q-ic {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--viola-soft); color: var(--viola);
  display: grid; place-items: center;
  transition: background .3s ease, color .3s ease, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.faq-q-ic svg { width: 15px; height: 15px; transition: transform .35s ease; }
.faq-item.is-open .faq-q-ic { background: linear-gradient(135deg, var(--viola), var(--viola-scuro)); color: white; }
.faq-item.is-open .faq-q-ic svg { transform: rotate(135deg); }
.faq-q-text { flex: 1; }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .5s cubic-bezier(.4,0,.2,1);
}
.faq-a-inner {
  padding: 0 22px 22px 68px;
  font-size: 14.5px; line-height: 1.65; color: var(--muted);
}
@media (max-width: 560px) { .faq-a-inner { padding-left: 22px; } }
.faq-a-inner strong { color: var(--nero); font-weight: 600; }
.faq-a-inner p { margin: 0 0 12px; }
.faq-a-inner p:last-child { margin-bottom: 0; }
.faq-a-inner ul { margin: 4px 0 12px; padding-left: 18px; }
.faq-a-inner li { margin-bottom: 6px; }
.faq-a-inner .note {
  display: block; margin-top: 8px;
  font-size: 13px; color: var(--viola); font-weight: 600;
}
.faq-a-inner a { color: var(--viola-scuro); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ========= FINAL CTA ========= */
.join-cta { padding-top: 30px; padding-bottom: 60px; }
.cta-card {
  background:
    radial-gradient(circle at 18% 25%, rgba(255,255,255,0.08) 0, transparent 35%),
    radial-gradient(circle at 82% 75%, rgba(255,255,255,0.06) 0, transparent 40%),
    linear-gradient(135deg, var(--viola) 0%, var(--viola-scuro) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: clamp(44px, 5vw, 68px) clamp(28px, 6vw, 64px);
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(122,94,168,0.55);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.085) 1px, transparent 1.4px);
  background-size: 18px 18px; opacity: 0.9; pointer-events: none; border-radius: inherit;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-eye {
  color: rgba(255,255,255,0.75);
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
}
.cta-eye::before { content: ""; width: 22px; height: 1px; background: rgba(255,255,255,0.5); }
.cta-title {
  font-family: var(--display);
  font-size: clamp(27px, 3.6vw, 48px);
  line-height: 1; letter-spacing: -0.035em; font-weight: 600;
  margin: 14px 0 14px; color: white;
}
.cta-title .italic { font-family: var(--serif); font-style: italic; font-weight: 600; color: white; }
.cta-sub { font-size: 16px; line-height: 1.5; max-width: 640px; margin: 0 auto 26px; color: rgba(255,255,255,0.85); }
.cta-row { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cta-btn.primary {
  background: white; color: var(--viola);
  box-shadow: 0 10px 24px -6px rgba(0,0,0,0.28);
  position: relative; overflow: hidden; isolation: isolate;
}
.cta-btn.primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(152,60,142,0.18) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s cubic-bezier(.4,0,.2,1); z-index: -1;
}
.cta-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgba(0,0,0,0.35); }
.cta-btn.primary:hover::before { transform: translateX(120%); }
.cta-btn.primary svg { transition: transform .25s ease; width: 14px; height: 14px; }
.cta-btn.primary:hover svg { transform: translateX(3px); }

/* ========= MODALE "candidature non ancora aperte" ========= */
.notice-modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(43,46,51,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.notice-modal-backdrop.is-open { opacity: 1; visibility: visible; }
.notice-modal {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 40px 80px -20px rgba(43,46,51,0.4);
  transform: scale(.92) translateY(12px);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.notice-modal-backdrop.is-open .notice-modal { transform: none; }
.notice-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.notice-modal-close:hover { background: var(--crema); color: var(--nero); }
.notice-modal-close svg { width: 18px; height: 18px; }
.notice-modal-ic {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 14px 28px -10px rgba(152,60,142,0.5);
}
.notice-modal-ic svg { width: 30px; height: 30px; }
.notice-modal h3 {
  font-family: var(--display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--nero); margin: 0 0 10px;
}
.notice-modal p {
  font-size: 15px; line-height: 1.55; color: var(--muted);
  margin: 0 0 24px;
}
.notice-modal p strong { color: var(--viola); font-weight: 700; }
.notice-modal .btn { width: 100%; }
