/* ============================================================
   Optilic role-detail pages. Light professional ground: one page
   per role, a centred serif title, the body copy on the left and
   a sticky summary card (level / location / department / apply)
   on the right. Tokens come from main.css.
   ============================================================ */

body { background: var(--paper); overflow-x: hidden; }

/* ---------- back link ---------- */
.job-top {
  max-width: 1120px; margin: 0 auto;
  padding: 6.2rem 1.5rem 0;
}
.role-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  color: var(--ink); text-decoration: none;
}
.role-back .arr { transition: transform 0.25s var(--ease); }
.role-back:hover .arr { transform: translateX(-4px); }
.role-back:hover { color: var(--record-ink); }

/* ---------- centred title ---------- */
.job-hero {
  max-width: 900px; margin: 0 auto; text-align: center;
  padding: clamp(2.5rem, 7vh, 5rem) 1.5rem clamp(2rem, 6vh, 4rem);
}
.job-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.02em;
  line-height: 1.08;
}
.job-hero .job-kicker {
  display: block; margin-bottom: 1.2rem;
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.22em; color: var(--room-ink);
}

/* ---------- body + summary card ---------- */
.job-layout {
  max-width: 1120px; margin: 0 auto;
  padding: 0 1.5rem clamp(3rem, 7vh, 5rem);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.job-body { max-width: 62ch; }
.job-body > p { margin-bottom: 1rem; font-size: 0.97rem; }
.job-body h2 {
  font-family: var(--font-body); font-weight: 600;
  font-size: 1.02rem; color: var(--ink);
  margin: 2.2rem 0 0.9rem;
}
.job-body ul { margin: 0 0 1rem 1.2rem; }
.job-body li { font-size: 0.94rem; margin-bottom: 0.55rem; max-width: 56ch; }
.job-note {
  margin-top: 2.2rem; padding-left: 1.1rem;
  border-left: 2px solid var(--record-ink);
  color: var(--ink-dim); font-size: 0.88rem; max-width: 52ch;
}

.job-card {
  position: sticky; top: 6rem;
  background: linear-gradient(165deg, #FFFFFF, var(--paper-lift));
  border: 1px solid rgba(27, 36, 48, 0.1);
  border-radius: 26px;
  box-shadow: 0 18px 50px -30px rgba(27, 36, 48, 0.35);
  padding: 2.2rem 2rem; text-align: center;
}
.jc-row + .jc-row { margin-top: 1.4rem; }
.jc-k {
  display: block; font-family: var(--font-body); font-weight: 600;
  font-size: 0.72rem; color: var(--ink-dim); margin-bottom: 0.3rem;
}
.jc-v {
  display: block; font-family: var(--font-body);
  font-size: 1.05rem; color: var(--ink);
}
.jc-apply {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 2rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  color: var(--paper); background: var(--ink);
  border-radius: 999px; padding: 0.85rem 1.9rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.25s;
}
.jc-apply:hover { transform: translateY(-2px); background: var(--record-b); }
.jc-apply .arr { transition: transform 0.25s var(--ease); }
.jc-apply:hover .arr { transform: translateX(3px); }

@media (max-width: 900px) {
  .job-layout { grid-template-columns: 1fr; }
  .job-card { position: static; order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
}

/* ---------- application form: a white card, boxed fields ---------- */
.job-apply {
  border-top: 1px solid rgba(27, 36, 48, 0.1);
  background: #E8EBEF;
  padding: clamp(2.5rem, 6vh, 4.5rem) 1.5rem clamp(3.5rem, 8vh, 6rem);
}
.job-apply-inner {
  max-width: 880px; margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid rgba(27, 36, 48, 0.05);
  border-radius: 24px;
  box-shadow: 0 24px 70px -40px rgba(27, 36, 48, 0.3);
  padding: 2.4rem 2.6rem 3.2rem;
}
.af-brand {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'Poppins', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.af-brand svg { width: 17px; height: 17px; }
.af-brand svg g { fill: var(--ink); }
.af-brand .delta { color: #E8853A; font-size: 0.95rem; line-height: 1; }
.af-rule {
  border: none; border-top: 1px solid rgba(27, 36, 48, 0.12);
  margin: 2.6rem 0 2rem;
}
.job-apply h2 {
  font-family: var(--font-body); font-weight: 600;
  font-size: 1.45rem; letter-spacing: -0.01em; color: #1F3550;
  margin-bottom: 0.35rem;
}
.af-req {
  font-family: var(--font-body); font-size: 0.85rem;
  color: #56677D; margin-bottom: 1.9rem;
}
.req { color: #D64545; }

/* single column like a real ATS: every field spans the row, only the
   fields marked .half pair up (country + phone) */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.45rem 1.4rem;
  max-width: 680px;
}
.form-field { display: flex; flex-direction: column; grid-column: 1 / -1; }
.form-field.half { grid-column: auto; }
.form-field.full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-field.half { grid-column: 1 / -1; } }

.form-field label {
  font-family: var(--font-body); font-weight: 600; font-size: 0.875rem;
  color: #3D5068;
  margin-bottom: 0.45rem; line-height: 1.45;
}
.form-field label .req { color: #D64545; }
.form-field input,
.form-field select {
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--ink); background: #FFFFFF;
  border: 1px solid #C3CDD9;
  border-radius: 6px; padding: 0.62rem 0.85rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  outline: none;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #4F6B8E;
  box-shadow: 0 0 0 3px rgba(79, 107, 142, 0.14);
}
.form-field textarea {
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--ink); background: #FFFFFF;
  border: 1px solid #C3CDD9;
  border-radius: 6px; padding: 0.65rem 0.85rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  outline: none;
  resize: vertical; min-height: 100px; line-height: 1.55;
}
.form-field select { cursor: pointer; appearance: auto; }
.form-field select option { background: #FFFFFF; color: var(--ink); }
.form-hint {
  font-family: var(--font-body); font-size: 0.76rem;
  color: #56677D; margin-top: 0.35rem;
}
.form-section-label {
  grid-column: 1 / -1;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: #1F3550;
  border-top: 1px solid rgba(27, 36, 48, 0.1);
  padding-top: 1.7rem; margin-top: 0.7rem;
}
.form-submit-row {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 1.2rem;
  margin-top: 0.8rem; flex-wrap: wrap;
}
.form-submit {
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  background: var(--ink); color: var(--paper);
  border: none; border-radius: 999px;
  padding: 0.8rem 1.9rem; cursor: pointer;
  transition: background 0.3s, transform 0.15s;
}
.form-submit:hover { background: var(--record-b); }
.form-submit:active { transform: scale(0.97); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-status { font-family: var(--font-mono); font-size: 0.72rem; color: var(--record-ink); }
.form-status.success { color: #1E7B4D; }
.form-status.error { color: var(--room-a); }
