/* ===== Work With Us / Lavora con noi — page-specific styles =================
   Built ON the ApexQuant design system (colors_and_type + components + shell).
   APEX blue page. Only the hero copy, the two feature bands, the benefits grid,
   the open-positions accordion and the apply modal live here. */

/* ---- Hero ---- */
.jobs-hero .t-hero { max-width: 22ch; }
.jobs-hero .t-hero .t-key { color: var(--accent-hi, var(--apex-blue-hi)); }
.hero-sub { margin-top: 24px; max-width: 640px; font-family: var(--font); font-size: 18px; line-height: 1.55; color: var(--soft-grey); text-wrap: pretty; }
.hero-cta-row { margin-top: 30px; display: flex; justify-content: center; }
/* tighten the gap below the hero CTA */
.jobs-hero { padding-bottom: 44px; }
@media (max-width: 900px){ .jobs-hero { padding-bottom: 32px; } }
.aq-btn .cta-chevron { width: 16px; height: 16px; flex: none; transition: transform .26s var(--ease); }
.aq-btn:hover .cta-chevron { transform: translateY(3px); }

/* ===== Feature bands (text + visual) ====================================== */
.feature { padding: var(--apx-section-y, 96px) 0; position: relative; z-index: 2; }
.feature-grid { width: min(1240px, calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-impact .feature-grid { grid-template-columns: 1.02fr 0.98fr; }
/* alternate the layout: panel on the LEFT, text on the RIGHT (zig-zag balance) */
.feature-impact .impact-panel { order: 1; }
.feature-impact .feature-text { order: 2; }
.feature-text .eyebrow { display: inline-block; margin-bottom: 16px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--accent, var(--apex-blue)); }
.feature-text h2 { margin: 0 0 16px; color: var(--bone); font-family: var(--font); font-size: clamp(28px, 4vw, 48px); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.feature-text p { margin: 0; max-width: 52ch; color: var(--soft-grey); font-size: 17px; line-height: 1.62; text-wrap: pretty; }

/* remote globe visual */
.feature-visual { display: flex; align-items: center; justify-content: center; }
.remote-visual { aspect-ratio: 1/1; width: min(440px, 100%); margin: 0 auto; }
.remote-visual canvas { width: 100%; height: 100%; display: block; }
.remote-visual .globe-fade-overlay { display: none; }

/* impact: trade panel (win-ratio bar ledger) */
.impact-panel { position: relative; }
.impact-panel::before { content: ""; position: absolute; inset: -26% -16% -18% -16%; background: radial-gradient(54% 50% at 42% 30%, rgba(30,91,255,.22), transparent 70%); filter: blur(40px); pointer-events: none; z-index: 0; }
.trade-panel { position: relative; z-index: 1; border: 1px solid var(--hair); border-radius: var(--r-box, 28px); background: linear-gradient(180deg, rgba(19,29,63,0.55), rgba(12,20,40,0.6)); padding: 30px 32px 26px; box-shadow: 0 30px 60px -36px rgba(2,4,12,0.8); }
.trade-panel__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.trade-tag { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.trade-big { font-family: var(--font); font-size: 40px; font-weight: 600; letter-spacing: -.035em; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.trade-big em { font-style: normal; font-weight: 500; color: var(--accent-hi, var(--apex-blue-hi)); font-size: 24px; margin-left: 1px; }
.trade-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 9px; height: 132px; align-items: end; }
.trade-bar { display: block; min-height: 5%; border-radius: 4px 4px 2px 2px; background: var(--accent, var(--apex-blue)); box-shadow: 0 0 14px rgba(30,91,255,.35); transition: height .7s var(--ease); will-change: height; }
.trade-bar.loss { background: var(--no-red, #EF4A3C); box-shadow: 0 0 14px rgba(239,74,60,.32); }
.trade-axis { display: grid; grid-template-columns: repeat(10, 1fr); gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.trade-axis span { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.trade-foot { display: flex; align-items: center; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.trade-leg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft-grey); }
.trade-leg i { width: 9px; height: 9px; border-radius: 999px; background: var(--accent, var(--apex-blue)); }
.trade-leg i.loss { background: var(--no-red, #EF4A3C); }
.trade-rate { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--soft-grey); }
.trade-rate b { color: var(--bone); font-weight: 600; }
.rating-stars { display: inline-flex; gap: 3px; }
.rating-stars svg { width: 15px; height: 15px; fill: var(--star-gold, #FBBF24); }
@media (prefers-reduced-motion: reduce) {
  .trade-bar { transition: none; }
}
/* mobile: more compact, single-line tag, balanced footer */
@media (max-width: 560px) {
  .trade-panel { padding: 22px 20px 18px; }
  .trade-panel__top { margin-bottom: 16px; }
  .trade-tag { font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
  .trade-big { font-size: 30px; }
  .trade-big em { font-size: 17px; }
  .trade-bars { height: 72px; gap: 6px; }
  .trade-axis { gap: 6px; margin-top: 10px; padding-top: 10px; }
  .trade-axis span { font-size: 9px; }
  .trade-foot { gap: 9px 16px; margin-top: 18px; }
  .trade-rate { margin-left: 0; flex-basis: 100%; }
}

/* ===== Benefits ========================================================== */
.benefits { padding: var(--apx-section-y, 96px) 0; position: relative; z-index: 2; }
.benefits-inner { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.benefits-title { margin: 0 0 36px; text-align: center; color: var(--bone); font-family: var(--font); font-size: clamp(28px, 4vw, 48px); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.benefit { position: relative; overflow: hidden; background: linear-gradient(168deg, #16213C 0%, #121B33 60%, #0F1830 100%); border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; padding: 30px 28px 30px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 24px 50px -28px rgba(2,4,12,0.6); transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); }
.benefit::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent, var(--apex-blue)), rgba(30,91,255,0.08)); transform: scaleX(0.32); transform-origin: left; transition: transform .45s var(--ease); }
.benefit:hover { transform: translateY(-5px); border-color: var(--accent-ring, rgba(30,91,255,0.28)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 40px 70px -30px rgba(2,4,12,0.7); }
.benefit:hover::before { transform: scaleX(1); }
.benefit-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 15px; color: var(--accent-hi, var(--apex-blue-hi)); background: linear-gradient(160deg, rgba(30,91,255,0.20), rgba(30,91,255,0.06)); box-shadow: inset 0 0 0 1px rgba(30,91,255,0.28); }
.benefit-icon svg { width: 24px; height: 24px; }
.benefit h3 { margin: 0 0 10px; color: var(--bone); font-family: var(--font); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.benefit p { margin: 0; color: var(--soft-grey); font-size: 14.5px; line-height: 1.6; }

/* ===== Open positions (accordion) ======================================== */
.jobs-sec { padding: var(--apx-section-y, 96px) 0 calc(var(--apx-section-y, 96px) + 8px); position: relative; z-index: 2; overflow: hidden; }
/* dotted world map behind the cards (remote-first theme) */
.worldmap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80%; max-width: 1180px; height: auto; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .5s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 72%, transparent 100%); }
.worldmap.ready { opacity: 1; }
.jobs-content { position: relative; z-index: 2; }
.jobs-heading { width: min(820px, calc(100% - 48px)); margin: 0 auto 32px; text-align: center; color: var(--bone); font-family: var(--font); font-size: clamp(28px, 4vw, 48px); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; }
.jobs-stack { width: min(580px, calc(100% - 48px)); margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.job-card { border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; background: linear-gradient(168deg, #16213C 0%, #121B33 60%, #0F1830 100%); overflow: hidden; cursor: pointer; box-shadow: 0 24px 50px -30px rgba(2,4,12,0.6); transition: border-color .2s var(--ease), transform .2s var(--ease); }
.job-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-2px); }
.job-card.open { border-color: var(--accent-ring, rgba(30,91,255,0.45)); transform: none; }
.job-card.spontaneous { background: linear-gradient(168deg, #1B2A4E 0%, #141E3C 58%, #101A34 100%); }
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px 0; }
.job-title { margin: 0; font-family: var(--font); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; color: var(--bone); }
.job-toggle { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; color: var(--accent, var(--apex-blue)); background: rgba(30,91,255,0.10); transition: transform .3s var(--ease), background .2s var(--ease); }
.job-toggle svg { width: 17px; height: 17px; }
.job-card.open .job-toggle { transform: rotate(45deg); }
.job-desc { margin: 8px 24px 0; color: var(--soft-grey); font-size: 14.5px; line-height: 1.5; }
.job-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 14px 24px 22px; color: var(--muted); font-size: 13px; }
.job-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.job-meta .meta-item svg { width: 15px; height: 15px; opacity: .8; }
.job-meta .sep { color: rgba(255,255,255,0.18); }
.job-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.job-card.open .job-body { grid-template-rows: 1fr; }
.job-body-inner { overflow: hidden; }
.job-body-content { padding: 4px 24px 26px; border-top: 1px solid var(--hair); margin-top: 0; }
.job-section { margin-top: 22px; }
.job-section h4 { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent, var(--apex-blue)); }
.job-section p { margin: 0; color: var(--soft-grey); font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.job-section ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.job-section li { position: relative; padding-left: 22px; color: var(--soft-grey); font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.job-section li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--apex-blue)); }
.job-section li strong { color: var(--bone); font-weight: 600; }
.job-section li .muted { color: var(--muted); font-weight: 500; }
.apply-btn { margin-top: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; appearance: none; border: 0; cursor: pointer; border-radius: var(--r-pill); background: var(--accent, var(--apex-blue)); color: var(--accent-ink, #fff); font-family: var(--font); font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em; padding: 13px 22px; transition: background .22s var(--ease); }
.apply-btn:hover { background: var(--accent-hover, var(--apex-blue-hover)); }
.apply-btn svg { width: 14px; height: 14px; transition: transform .24s var(--ease); }
.apply-btn:hover svg { transform: translate(2px, -2px); }

@media (max-width: 880px){
  .feature-grid { grid-template-columns: 1fr; gap: 36px; }
  .feature-impact .feature-grid { grid-template-columns: 1fr; }
  .feature-remote .feature-visual { order: -1; }
  /* globe band: show the top HALF of the globe resting on the headline, with a long gradual
     fade into the page bg (#0C1428). Same robust treatment as the home GlobeBand. The canvas
     is absolute-filled in Globe.jsx so it can never collapse on iOS Safari. */
  .feature-remote .feature-grid { gap: 0; }
  .feature-remote .feature-text { text-align: center; position: relative; z-index: 2; }
  .feature-remote .remote-visual {
    width: min(440px, 86vw); aspect-ratio: 1 / 1; margin: 0 auto max(-132px, -25.8vw); position: relative; z-index: 1;
  }
  .feature-remote .remote-visual canvas { pointer-events: none; touch-action: auto !important; cursor: default !important; }
  .feature-remote .remote-visual .globe-fade-overlay {
    display: block; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom,
      rgba(12,20,40,0) 0%, rgba(12,20,40,0) 38%,
      rgba(12,20,40,0.40) 50%, rgba(12,20,40,0.78) 59%,
      rgba(12,20,40,0.96) 66%, #0C1428 70%, #0C1428 100%);
  }
  .benefits-grid { grid-template-columns: 1fr; }
}

/* ===== Apply modal ======================================================== */
.apply-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4,6,12,.74); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease; }
.apply-overlay.open { opacity: 1; visibility: visible; }
.apply-modal { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--card, #131D3F); border: 1px solid var(--card-line); border-radius: 22px; padding: 32px 28px 28px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.72); transform: translateY(14px) scale(.98); transition: transform .28s var(--ease); }
.apply-overlay.open .apply-modal { transform: none; }
.apply-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,.06); color: var(--muted); transition: background .15s ease, color .15s ease; }
.apply-close svg { width: 18px; height: 18px; }
.apply-close:hover { background: rgba(255,255,255,.12); color: var(--bone); }
.apply-eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--accent, var(--apex-blue)); }
.apply-title { margin: 10px 0 4px; font-family: var(--font); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; color: var(--bone); }
.apply-position { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.apply-position span { color: var(--soft-grey); }
.apply-form { display: flex; flex-direction: column; gap: 16px; }
.field-label { display: block; margin-bottom: 7px; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--soft-grey); }
.field-label .req { color: var(--accent-hi, var(--apex-blue-hi)); }
.field-label .opt { color: var(--muted); font-weight: 400; }
.input-wrap { position: relative; }
.input-wrap .lead-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.apply-form input[type=text], .apply-form input[type=email], .apply-form input[type=tel] { width: 100%; background: #1B2440; border: 1px solid var(--card-line); border-radius: 12px; color: var(--bone); padding: 13px 14px 13px 40px; font-family: var(--font); font-size: 15px; outline: none; transition: border-color .15s ease, background .15s ease; }
.apply-form textarea { width: 100%; min-height: 96px; resize: vertical; background: #1B2440; border: 1px solid var(--card-line); border-radius: 12px; color: var(--bone); padding: 13px 14px; font-family: var(--font); font-size: 15px; line-height: 1.5; outline: none; transition: border-color .15s ease, background .15s ease; }
.apply-form input::placeholder, .apply-form textarea::placeholder { color: var(--muted); }
.apply-form input:focus, .apply-form textarea:focus { border-color: var(--accent, var(--apex-blue)); background: #131D3F; }
.file-drop { position: relative; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px dashed var(--card-line); border-radius: 12px; background: rgba(255,255,255,0.02); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.file-drop:hover, .file-drop.dragover { border-color: var(--accent, var(--apex-blue)); background: rgba(30,91,255,0.05); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,0.06); color: var(--soft-grey); }
.file-icon svg { width: 18px; height: 18px; }
.file-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-label { font-size: 14px; font-weight: 500; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-hint { font-size: 12px; color: var(--muted); }
.file-clear { display: none; appearance: none; border: 0; width: 28px; height: 28px; border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--muted); cursor: pointer; align-items: center; justify-content: center; }
.file-clear svg { width: 14px; height: 14px; }
.file-drop.has-file .file-clear { display: inline-flex; }
.file-drop.has-file .file-hint { display: none; }
.apply-terms { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.5; color: var(--soft-grey); cursor: pointer; }
.apply-terms input { position: absolute; opacity: 0; width: 0; height: 0; }
.apply-terms .checkbox { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--card-line); background: #1B2440; display: grid; place-items: center; margin-top: 1px; transition: background .15s ease, border-color .15s ease; }
.apply-terms .checkbox svg { opacity: 0; transition: opacity .15s ease; }
.apply-terms input:checked + .checkbox { background: var(--accent, var(--apex-blue)); border-color: transparent; }
.apply-terms input:checked + .checkbox svg { opacity: 1; }
.apply-terms a { color: var(--accent-hi, var(--apex-blue-hi)); text-decoration: none; border-bottom: 1px solid currentColor; }
.apply-submit { margin-top: 4px; width: 100%; appearance: none; border: 0; cursor: pointer; border-radius: var(--r-pill); background: var(--accent, var(--apex-blue)); color: var(--accent-ink, #fff); font-family: var(--font); font-weight: 600; font-size: 15px; padding: 15px 20px; transition: background .22s var(--ease); }
.apply-submit:hover { background: var(--accent-hover, var(--apex-blue-hover)); }
.apply-success { display: none; text-align: center; padding: 14px 6px 6px; }
.apply-success.show { display: block; }
.success-icon { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 999px; display: grid; place-items: center; background: rgba(62,207,142,0.12); border: 1px solid rgba(62,207,142,0.32); color: #3ECF8E; }
.apply-success h3 { margin: 0 0 10px; font-family: var(--font); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--bone); }
.apply-success p { margin: 0 0 22px; color: var(--soft-grey); font-size: 15px; line-height: 1.55; }
.apply-success p strong { color: var(--bone); }
