/* ==========================================================================
   Pubblipro - stile della pagina Lavora con noi
   Qui compaiono ombre morbide, foto di sfondo velate e pattern (quadretti,
   righe diagonali, punti, grana). Si usa insieme a home.css e agenzia.css.
   ========================================================================== */
:root {
  /* ombre a più strati, con tinta calda (mai nero puro) */
  --sh-s: 0 1px 2px rgba(70, 45, 25, 0.1), 0 10px 24px -10px rgba(70, 45, 25, 0.22);
  --sh-m: 0 2px 4px rgba(70, 45, 25, 0.1), 0 18px 40px -14px rgba(70, 45, 25, 0.32);
  --sh-l: 0 4px 8px rgba(70, 45, 25, 0.1), 0 30px 70px -22px rgba(70, 45, 25, 0.45);
  --sh-dark: 0 2px 4px rgba(0, 0, 0, 0.35), 0 28px 60px -22px rgba(0, 0, 0, 0.7);
  /* grana: rumore finissimo, a bassa opacità */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.job-hero, .profile, .duties, .offer, .apply { position: relative; overflow: hidden; }
.job-hero__inner, .profile__inner, .duties__inner, .offer__inner, .apply__inner { position: relative; z-index: 1; }

/* ---------- Intestazione: foto velata, righe diagonali e grana ---------- */
.job-hero { background: var(--ink); color: var(--paper-text); isolation: isolate; }
.job-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 20, 26, 0) 34%, rgba(20, 20, 26, 0.5) 62%, rgba(20, 20, 26, 0.88) 84%, #14141A 100%),
    repeating-linear-gradient(135deg, rgba(242, 237, 227, 0.06) 0 1px, transparent 1px 22px),
    var(--grain),
    linear-gradient(95deg, rgba(20, 20, 26, 0.97) 0%, rgba(20, 20, 26, 0.86) 42%, rgba(193, 32, 38, 0.58) 100%),
    url("../img/foto/lavora-commerciale.webp") center / cover no-repeat;
  background-size: auto, auto, 180px 180px, auto, cover;
  background-repeat: no-repeat, repeat, repeat, no-repeat, no-repeat;
}
.job-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 56px clamp(40px, 6vw, 96px);
  padding-top: 72px;
  padding-bottom: 128px;
}
.job-hero__text { display: flex; flex-direction: column; gap: 28px; }
.job-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.job-hero__lead { margin: 0; max-width: 50ch; font-size: 23px; line-height: 1.55; color: rgba(242, 237, 227, 0.88); }

.jobcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius);
  border: 1px solid rgba(242, 237, 227, 0.28);
  background: rgba(242, 237, 227, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--sh-dark), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .jobcard { background: rgba(32, 32, 40, 0.92); }
}
.jobcard__tag { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 600; }
.jobcard__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(240, 176, 48, 0.6); } 100% { box-shadow: 0 0 0 12px rgba(240, 176, 48, 0); } }
.jobcard__title { margin: 0; font-weight: 600; font-size: clamp(38px, 4vw, 56px); letter-spacing: -0.035em; line-height: 1; }
.jobcard__list { margin: 0; display: flex; flex-direction: column; }
.jobcard__list > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(242, 237, 227, 0.22); }
.jobcard__list dt { color: rgba(242, 237, 227, 0.78); font-size: 17px; }
.jobcard__list dd { margin: 0; font-size: 18px; font-weight: 500; text-align: right; }
.jobcard .btn { align-self: flex-start; }

/* ---------- Chi cerchiamo: quaderno a quadretti e riquadri di misure diverse ---------- */
.profile {
  padding: 176px 0 136px;
  background:
    linear-gradient(rgba(20, 20, 26, 0.055) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(20, 20, 26, 0.055) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--paper);
}
.profile__inner { display: flex; flex-direction: column; gap: 64px; }
.profile__bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.pc-a, .pc-d { grid-column: span 4; }
.pc-b, .pc-c { grid-column: span 2; }
.pc-a { min-height: 380px; }
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-height: 300px;
  padding: clamp(28px, 3vw, 44px);
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--sh-m);
}
.pcard h3 { margin: 0; font-weight: 600; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.025em; line-height: 1.15; }
.pcard p { margin: 0; max-width: 46ch; font-size: 19px; line-height: 1.6; }
.pcard--paper { background: #F8F4EB; border: 1px solid rgba(20, 20, 26, 0.08); }
.pcard--paper p { color: var(--muted); }
.pcard--red {
  color: var(--paper-text);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 20px), var(--red);
}
.pcard--ink {
  color: var(--paper-text);
  background: radial-gradient(circle, rgba(242, 237, 227, 0.12) 1.6px, transparent 2.2px) 0 0 / 24px 24px, var(--ink);
}
.pcard--ink p { color: var(--muted-on-ink); }
.pcard.rv { transition: opacity 800ms var(--ease), transform 420ms var(--ease), box-shadow 420ms var(--ease); }

/* ---------- Cosa farai: nero pieno e schede di vetro ---------- */
.duties { padding: 136px 0; background: var(--ink); color: var(--paper-text); isolation: isolate; }
.duties__inner { display: flex; flex-direction: column; gap: 64px; }
.duties__head { max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.duties__head p { margin: 0; max-width: 40ch; font-size: 22px; color: rgba(242, 237, 227, 0.86); }
.duties__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 237, 227, 0.18);
  background: rgba(242, 237, 227, 0.07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--sh-dark);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dcard { background: rgba(30, 30, 38, 0.92); }
}
.dcard__bar { display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--red); transition: width 420ms var(--ease); }
.dcard h3 { margin: 0; font-weight: 600; font-size: 28px; letter-spacing: -0.025em; line-height: 1.15; }
.dcard p { margin: 0; font-size: 18px; line-height: 1.6; color: rgba(242, 237, 227, 0.86); }
.dcard.rv { transition: opacity 800ms var(--ease), transform 420ms var(--ease), border-color 220ms var(--ease); }

/* ---------- Cosa offriamo: righe diagonali e schede chiare con ombra ---------- */
.offer {
  padding: 136px 0;
  color: var(--paper-text);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 2px, transparent 2px 24px), var(--red);
}
.offer::before, .offer::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.offer::before {
  left: -120px;
  top: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(240, 176, 48, 0.5), transparent 68%);
  animation: float-a 19s ease-in-out infinite;
}
.offer::after {
  right: 6%;
  bottom: -220px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(20, 20, 26, 0.5), transparent 68%);
  animation: float-b 22s ease-in-out infinite;
}
.offer__inner { display: flex; flex-direction: column; gap: 56px; }
.offer .sec-head p { color: var(--paper-text); }
.offer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ocard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius);
  color: var(--ink);
  background: #F8F4EB;
  box-shadow: 0 2px 4px rgba(60, 5, 5, 0.25), 0 30px 60px -20px rgba(50, 5, 5, 0.6);
}
.ocard::before { content: ''; width: 14px; height: 14px; border-radius: 3px; background: var(--red); transition: transform 260ms var(--ease); }
.ocard h3 { margin: 0; font-weight: 600; font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.025em; line-height: 1.15; }
.ocard p { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.6; }
.ocard.rv { transition: opacity 800ms var(--ease), transform 420ms var(--ease), box-shadow 420ms var(--ease); }
.offer__terms {
  align-self: flex-start;
  margin: 0;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 237, 227, 0.3);
  background: rgba(20, 20, 26, 0.3);
  box-shadow: 0 12px 30px -12px rgba(50, 5, 5, 0.5);
  font-size: 19px;
}

/* ---------- Come candidarti: punti, bagliori e scheda con ombra ---------- */
.apply {
  padding: 136px 0;
  background:
    linear-gradient(rgba(20, 20, 26, 0.055) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(20, 20, 26, 0.055) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--paper);
}
.apply::before, .apply::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.apply::before {
  left: -160px;
  top: -80px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(240, 176, 48, 0.32), transparent 68%);
  animation: float-a 20s ease-in-out infinite;
}
.apply::after {
  right: -140px;
  bottom: -160px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(193, 32, 38, 0.22), transparent 68%);
  animation: float-b 24s ease-in-out infinite;
}
.apply__inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; gap: 56px clamp(40px, 6vw, 96px); }
.apply__text { display: flex; flex-direction: column; gap: 24px; }
.apply__text > p { margin: 0; max-width: 34ch; font-size: 22px; color: var(--muted); }
.apply__card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(28px, 3.4vw, 52px);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 20, 26, 0.08);
  background: #FBF8F1;
  box-shadow: var(--sh-l);
}
.apply__card h3 { margin: 0; font-weight: 600; font-size: 34px; letter-spacing: -0.025em; }

/* ---------- Il modulo ---------- */
.jform { display: flex; flex-direction: column; gap: 24px; }
.jform__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.jform__field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.jform label, .jform legend, .jform__label { font-weight: 600; font-size: 16px; }
.jform__opt { color: var(--muted); font-weight: 400; }
.jinput {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(20, 20, 26, 0.3);
  background: #FFFDF8;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
textarea.jinput { min-height: 140px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.jinput::placeholder { color: #6B6B73; }
.jinput:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(193, 32, 38, 0.16); }
.jinput[aria-invalid="true"], .jfile:has(input[aria-invalid="true"]) { border-color: #B3141B; }
.jform__err { color: #B3141B; font-size: 16px; font-weight: 500; }
.jform__set { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.jform__set legend { padding: 0; margin-bottom: 12px; }
.jform__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.jform__set[aria-invalid="true"] .chip span { border-color: #B3141B; }
.jform .chip span { border-color: rgba(20, 20, 26, 0.32); background: #FFFDF8; color: var(--ink); }
.jform .chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper-text); }
.jform .chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.jfile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  border: 2px dashed rgba(20, 20, 26, 0.36);
  border-radius: 12px;
  background: rgba(193, 32, 38, 0.04);
  cursor: pointer;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.jfile input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.jfile:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.jfile.is-drag { border-color: var(--red); background: rgba(193, 32, 38, 0.1); }
.jfile.has-file { border-style: solid; border-color: var(--red); }
.jfile__title { font-weight: 600; font-size: 18px; }
.jfile__hint { color: var(--muted); font-size: 16px; }
.jfile__name { color: var(--red-dark); font-weight: 600; font-size: 17px; word-break: break-all; }
.jform__consent { display: flex; align-items: flex-start; gap: 14px; }
.jform__consent input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--red); }
.jform__consent label { font-weight: 400; font-size: 16px; line-height: 1.5; color: var(--muted); }
.jform__consent a { color: var(--ink); text-decoration: underline; }
.jform__status { margin: 0; padding: 16px 18px; border-radius: 12px; border: 1.5px solid var(--amber); background: #FFF6DF; font-size: 17px; }
.jform__status--ok { border-color: #1E7A46; background: #E3F1E8; color: #14532E; }
.jform__status--err { border-color: #B3141B; background: #FBE9E9; color: #6B0F14; }

/* ---------- Effetti solo con il mouse ---------- */
@media (hover: hover) and (pointer: fine) {
  .pcard:hover { transform: translateY(-8px); box-shadow: var(--sh-l); }
  .dcard:hover { transform: translateY(-8px); border-color: rgba(242, 237, 227, 0.4); }
  .dcard:hover .dcard__bar { width: 100%; }
  .ocard:hover { transform: translateY(-8px); box-shadow: 0 2px 4px rgba(60, 5, 5, 0.3), 0 44px 80px -24px rgba(40, 0, 0, 0.75); }
  .ocard:hover::before { transform: scale(1.6) rotate(45deg); }
  .jfile:hover { border-color: var(--red); background: rgba(193, 32, 38, 0.08); }
  .jform .chip:hover span { border-color: var(--ink); }
}

/* ---------- Schermi medi e piccoli ---------- */
@media (max-width: 1100px) {
  .duties__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .job-hero__inner { grid-template-columns: minmax(0, 1fr); }
  .jobcard { max-width: 520px; }
  .apply__inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .offer__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .profile__bento { grid-template-columns: minmax(0, 1fr); }
  .pc-a, .pc-b, .pc-c, .pc-d { grid-column: auto; }
  .pcard, .pc-a { min-height: 240px; }
}
@media (max-width: 640px) {
  .job-hero__inner { padding-bottom: 88px; }
  .job-hero__lead { font-size: 20px; }
  .profile { padding: 152px 0 96px; }
  .duties, .offer, .apply { padding: 96px 0; }
  .duties__grid { grid-template-columns: minmax(0, 1fr); }
  .jform__row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  .jobcard__dot, .offer::before, .offer::after, .apply::before, .apply::after { animation: none; }
  .pcard.rv, .dcard.rv, .ocard.rv, .dcard__bar, .ocard::before, .jinput, .jfile { transition: none; }
}

