/* =========================================================
   Job board — shared by open-positions.html, job.html and the
   teaser sections on recruitment.html and careers.html.
   ========================================================= */

/* ----- Filters ----- */
.rec-jobs { background: var(--bg); }

.rec-filters {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.rec-filter-group {
  flex: 1;
  min-width: 180px;
}

.rec-filter-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-faint);
  margin-bottom: 7px;
}

.rec-filter-group select {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  background-color: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238b8b96' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.rec-filter-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.jobs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.jobs-filter-reset {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jobs-filter-reset:hover { color: var(--accent-hover); }

/* ----- Job cards ----- */
.rec-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 20px;
}

@media (max-width: 420px) {
  .rec-jobs-grid { grid-template-columns: 1fr; }
}

.rec-job-card {
  padding: 26px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.rec-job-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 24px rgba(10, 10, 12, 0.06);
  transform: translateY(-2px);
}

.rec-job-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.rec-job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.rec-job-card h4 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.rec-job-type {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.rec-job-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.rec-job-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rec-job-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.rec-job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rec-job-tag {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
}

.rec-job-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.rec-job-link svg { transition: transform 0.22s; }
.rec-job-card:hover .rec-job-link svg { transform: translateX(3px); }

.rec-no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 1rem;
}

.rec-no-results a {
  color: var(--accent);
  text-decoration: underline;
}

/* Shown inside a jobs grid while the spreadsheet is being fetched, and if
   that fetch fails. Spans the grid so it stays centred under the filters. */
.jobs-status {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.jobs-status a {
  color: var(--accent);
  text-decoration: underline;
}

/* Live count of open roles, shown inside "see all" buttons. */
.btn-count {
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* ----- Teaser block on other pages ----- */
.jobs-teaser-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.jobs-teaser-head .section-title { margin-bottom: 6px; }
.jobs-teaser-head p { color: var(--text-muted); font-size: 0.95rem; }

.jobs-teaser-foot {
  margin-top: 32px;
  text-align: center;
}

/* =========================================================
   Single job page
   ========================================================= */
.job-hero {
  padding: calc(var(--header-h) + 60px) 0 44px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.job-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
  transition: color 0.18s;
}
.job-back:hover { color: var(--ink); }

.job-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 18px;
  max-width: 800px;
}

.job-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.job-hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
  padding-top: clamp(48px, 6vw, 76px);
  padding-bottom: clamp(64px, 8vw, 104px);
}

@media (max-width: 900px) {
  .job-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.job-summary {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text);
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.job-section { margin-top: 34px; }

.job-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.job-section p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.job-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.job-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.job-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* A description can also use "1." lines, which come out as a numbered list. */
ol.job-list { counter-reset: job-step; }

ol.job-list li::before {
  counter-increment: job-step;
  content: counter(job-step) '.';
  top: 0;
  left: 2px;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9em;
}

/* Inline formatting written in the description cell. */
.job-section strong { font-weight: 600; color: var(--text); }
.job-section em { font-style: italic; }

.job-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.job-section a:hover { color: var(--accent-hover); }

/* A role with no separate summary starts straight in on its first heading. */
.job-body > .job-section:first-child { margin-top: 0; }

.job-section p + p,
.job-section p + .job-list,
.job-section .job-list + p { margin-top: 14px; }

/* ----- Apply card ----- */
.job-aside { position: sticky; top: calc(var(--header-h) + 24px); }

@media (max-width: 900px) {
  .job-aside { position: static; }
}

.job-apply-card {
  padding: 30px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(10, 10, 12, 0.05);
}

.job-apply-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.job-apply-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.job-apply-card .btn { width: 100%; justify-content: center; }

.job-apply-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.job-apply-note a { color: var(--accent); text-decoration: underline; }

.job-apply-alt {
  display: block;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-faint);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s;
}
.job-apply-alt:hover { color: var(--ink); }

/* ----- Missing job ----- */
.job-missing {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 100px) 24px 140px;
  text-align: center;
}

.job-missing h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.job-missing p {
  color: var(--text-muted);
  margin-bottom: 28px;
}
