/* ==========================================================================
   Greenhills — Careers (listing, vacancy detail, application form)
   Page-scoped; every value derives from the tokens in styles.css.
   ========================================================================== */

.page-hero--careers { --hero-image: url('/assets/campus-life.jpg'); }

.careers-intro { max-width: 780px; margin: 0 auto; text-align: center; }
.careers-intro p { color: var(--muted); font-size: var(--text-lg); line-height: var(--lh-body); margin: 0; }

/* ── Vacancy cards ────────────────────────────────────────────────────── */
.job-list { width: min(1080px, 100%); margin: 0 auto; display: grid; gap: 1rem; }

.job-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 12px 32px rgba(8, 27, 49, .045);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.job-card:hover { transform: translateY(-2px); box-shadow: 0 20px 45px rgba(8, 27, 49, .1); border-color: rgba(8, 27, 49, .22); }

.job-card h3 { margin: 0 0 .5rem; font-size: var(--card-title); line-height: var(--lh-title); }
.job-card h3 a { color: var(--navy-950); }
.job-card h3 a:hover { color: var(--accent-hover); }
.job-summary { margin: 0 0 .85rem; color: var(--muted); font-size: var(--text-card); line-height: 1.6; }

.job-meta { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin: 0; padding: 0; list-style: none; }
.job-meta li {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mist);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.3;
}
.job-meta svg { flex: none; color: var(--blue-700); }

/* Status is never colour-only — the label itself says open or closed. */
.job-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.job-status--open { background: rgba(46, 125, 50, .12); color: var(--accent-hover); }
.job-status--closed { background: rgba(8, 27, 49, .08); color: var(--muted); }

.job-empty {
  width: min(1080px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--warm-white);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.job-empty h3 { margin: 0 0 .5rem; font-size: var(--card-title); }
.job-empty p { margin: 0 auto 1.25rem; max-width: 46ch; color: var(--muted); font-size: var(--text-card); line-height: 1.66; }

/* ── Vacancy detail ───────────────────────────────────────────────────── */
.job-detail { width: min(820px, 100%); margin: 0 auto; }
.job-detail .job-meta { margin-bottom: 1.5rem; }
.job-detail h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.7rem); line-height: var(--lh-title); margin: 2rem 0 .75rem; }
.job-detail h2:first-of-type { margin-top: 0; }
.job-detail p { color: var(--muted); font-size: var(--text-card); line-height: 1.7; }
/* :not(.job-meta) matters — the meta chips are also a <ul> inside .job-detail.
   Without it they inherit display:grid and the bullet, and render as stacked
   full-width rows instead of inline pills. */
.job-detail ul:not(.job-meta) { padding-left: 0; list-style: none; display: grid; gap: .55rem; }
.job-detail ul:not(.job-meta) li { position: relative; padding-left: 1.6rem; color: var(--muted); font-size: var(--text-card); line-height: 1.6; }
.job-detail ul:not(.job-meta) li::before {
  content: ""; position: absolute; left: 0; top: .58rem;
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent);
}

.job-closed-note {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .95rem 1.1rem; margin: 0 0 1.5rem;
  background: var(--blue-100); border-left: 3px solid var(--blue-700); border-radius: 6px;
  color: var(--muted); font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.55;
}
.job-closed-note svg { flex: none; margin-top: .15rem; color: var(--blue-700); }

/* ── Application form ─────────────────────────────────────────────────── */
.apply-card {
  width: min(820px, 100%);
  margin: 0 auto;
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 18px 44px rgba(8, 27, 49, .06);
}
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.apply-grid .full { grid-column: 1 / -1; }
.apply-grid label { display: grid; gap: .35rem; font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.35; font-weight: 700; color: var(--navy-850); }
.apply-grid .req { color: var(--accent-hover); }
.apply-grid input,
.apply-grid select,
.apply-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem;
  font: inherit;
  font-size: 1rem;      /* 16px — stops iOS zooming the viewport on focus */
  line-height: 1.45;
  background: #fff;
  color: var(--charcoal);
}
.apply-grid textarea { min-height: 110px; resize: vertical; }
.apply-grid input:focus-visible,
.apply-grid select:focus-visible,
.apply-grid textarea:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
.apply-grid input[aria-invalid="true"],
.apply-grid select[aria-invalid="true"] { border-color: #a62639; background: rgba(166, 38, 57, .03); }

.field-hint { font-weight: 400; color: var(--muted); font-size: var(--text-xs); line-height: 1.4; }
.field-error { color: #a62639; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 600; line-height: 1.4; min-height: 1em; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.file-drop {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem; border: 1px dashed var(--line); border-radius: 8px; background: var(--mist);
  font-family: var(--font-ui); font-size: var(--text-sm); color: var(--muted);
}
.file-drop input[type="file"] { border: 0; padding: 0; background: none; font-size: var(--text-sm); }

/* Must out-specify `.apply-grid label { display: grid }`, or the checkbox
   stacks above its own label text instead of sitting beside it. */
.consent-row,
.apply-grid label.consent-row { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; }
.consent-row input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin-top: .15rem; flex: none; }
.consent-row span { color: var(--muted); font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.55; }

.form-status { margin: 0; font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.5; }
.form-status[data-state="error"] { color: #a62639; font-weight: 600; }
.form-status[data-state="ok"] { color: var(--accent-hover); font-weight: 600; }

.apply-success {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(46, 125, 50, .06);
  border: 1px solid rgba(46, 125, 50, .25);
  border-radius: 8px;
}
.apply-success h3 { margin: 0 0 .5rem; font-size: var(--card-title); color: var(--navy-950); }
.apply-success p { margin: 0 auto; max-width: 48ch; color: var(--muted); font-size: var(--text-card); line-height: 1.66; }

.careers-alt {
  width: min(820px, 100%); margin: 1.25rem auto 0;
  text-align: center; color: var(--muted);
  font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.6;
}
.careers-alt a { color: var(--blue-700); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .job-card { grid-template-columns: 1fr; }
  .job-card > .button-row, .job-card > a.primary-button { width: 100%; }
  .apply-grid { grid-template-columns: 1fr; }
  .careers-intro { text-align: left; }
  .careers-intro p { font-size: var(--text-base); }
}
