/* ==========================================================
   加入我们页
   层次：为什么加入 → 招聘岗位（筛选 + 可展开岗位卡片）→ 应聘方式
   颜色全部取自 theme.css 的变量
   ========================================================== */

/* ---------- 01 为什么加入 ---------- */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.why article { padding: 2rem 2rem 0 0; }
.why article + article { padding-left: 2rem; border-left: 1px solid var(--line); }
.why__no { font-size: 1.25rem; font-weight: 600; line-height: 1; color: var(--brand-red); }
.why h3 { margin: 1rem 0 .6rem; font-size: 1.375rem; }
.why p { font-size: 1rem; line-height: 1.85; color: var(--muted); }

/* ---------- 02 招聘岗位 ---------- */
.jobs-total { font-style: normal; color: var(--brand-red); }

.job-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.75rem; }
.job-filter button {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .55rem 1.1rem;
  font: inherit; font-size: .9375rem; color: var(--muted);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: color .2s, border-color .2s, background-color .2s;
}
.job-filter button span {
  min-width: 1.4rem; padding: 0 .35rem;
  font-size: .75rem; line-height: 1.4rem; text-align: center;
  color: var(--muted); background: var(--paper); border-radius: 999px;
}
.job-filter button:hover { color: var(--text); border-color: var(--line-strong); }
.job-filter button.is-active { color: #fff; background: var(--graphite); border-color: var(--graphite); }
.job-filter button.is-active span { color: var(--graphite); background: #fff; }

.jobs { display: grid; gap: .875rem; }
.job {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.job:hover { border-color: var(--line-strong); }
.job[open] { border-color: var(--line-strong); box-shadow: 0 16px 40px rgba(15, 17, 21, .07); }
.job[hidden] { display: none; }

.job summary {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto 2.5rem;
  align-items: center; gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  list-style: none; cursor: pointer;
}
.job summary::-webkit-details-marker { display: none; }
.job summary:focus-visible { outline: 2px solid var(--brand-red); outline-offset: -2px; border-radius: 8px; }
.job__cat {
  justify-self: start;
  padding: .2rem .65rem;
  font-size: .8125rem; color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: 3px;
}
.job__main { min-width: 0; }
.job__title { display: flex; align-items: center; gap: .75rem; font-size: 1.375rem; font-weight: 700; line-height: 1.4; color: var(--text); }
.job__hot {
  padding: .1rem .5rem;
  font-size: .75rem; font-weight: 500; color: #fff; background: var(--brand-red); border-radius: 2px;
}
.job__meta { display: flex; flex-wrap: wrap; gap: .25rem 0; margin-top: .45rem; font-size: .9375rem; color: var(--muted); }
.job__meta li:not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: .8em; margin: 0 .75rem; background: var(--line-strong); vertical-align: -.05em; }
.job__count { font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.job__count b { font-size: 1.125rem; color: var(--text); }
.job__toggle {                         /* 加号，展开后变为减号 */
  position: relative; justify-self: end;
  width: 2.25rem; height: 2.25rem; border: 1px solid var(--line-strong); border-radius: 50%;
  transition: background-color .2s, border-color .2s;
}
.job__toggle::before, .job__toggle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: .8rem; height: 1.5px; background: var(--text);
  transform: translate(-50%, -50%); transition: transform .25s, background-color .2s;
}
.job__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.job[open] .job__toggle { background: var(--graphite); border-color: var(--graphite); }
.job[open] .job__toggle::before, .job[open] .job__toggle::after { background: #fff; }
.job[open] .job__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.job summary:hover .job__title { color: var(--brand-red); }

.job__body { padding: 0 1.75rem 1.75rem calc(1.75rem + 4.5rem + 1.5rem); }
.job__cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.job__cols h4 { margin: 0 0 .8rem; font-size: .875rem; font-weight: 600; letter-spacing: .12em; color: var(--metal); }
.job__cols ul { display: grid; gap: .55rem; }
.job__cols li { position: relative; padding-left: 1.3rem; font-size: 1rem; line-height: 1.75; color: var(--text); }
.job__duties li::before {
  content: ""; position: absolute; left: 0; top: .82em; width: .55rem; height: 2px; background: var(--brand-red);
}
.job__reqs li::before {
  content: ""; position: absolute; left: .1rem; top: .5em;
  width: .4rem; height: .7rem; border: solid var(--text); border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.job__apply {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  margin-top: 1.75rem; padding: 1.25rem 1.5rem;
  background: var(--paper); border-radius: 6px;
}
.job__apply p { font-size: .9375rem; color: var(--muted); }
.job__apply p a { color: var(--text); border-bottom: 1px solid var(--line-strong); }
.job__apply p a:hover { color: var(--brand-red); }

/* ---------- 03 应聘方式 ---------- */
.apply { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; }
.apply__steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1.25rem;
}
.apply__steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: .4375rem; height: 1px; background: rgba(255, 255, 255, .18);
}
.apply__steps li { position: relative; display: flex; flex-direction: column; gap: .3rem; padding-top: 2rem; }
.apply__steps li::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: .875rem; height: .875rem; border-radius: 50%;
  background: var(--graphite); border: 2px solid var(--metal-light);
}
.apply__steps li:first-child::before { background: var(--laser-soft); border-color: var(--laser-soft); }
.apply__steps span { font-size: 1.0625rem; font-weight: 600; color: var(--laser-soft); }
.apply__steps b { font-size: 1.125rem; color: var(--text-on-dark); }
.apply__steps small { font-size: .9375rem; line-height: 1.7; color: var(--muted-on-dark); }
.apply__mail {
  padding: 2rem;
  background: var(--graphite-2); border: 1px solid var(--line-dark); border-radius: 8px;
}
.apply__label { font-size: .8125rem; letter-spacing: .14em; color: var(--muted-on-dark); }
.apply__email {
  display: block; margin: .5rem 0 1.5rem;
  font-size: clamp(1.25rem, 1rem + .8vw, 1.75rem); font-weight: 600; color: var(--text-on-dark);
  overflow-wrap: anywhere;
}
.apply__email:hover { color: var(--laser-soft); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why article:nth-child(3) { padding-left: 0; border-left: 0; }
  .why article:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 2rem; }
  .apply { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .job summary { grid-template-columns: minmax(0, 1fr) 2.25rem; gap: .75rem 1rem; padding: 1.25rem; }
  .job__cat { grid-column: 1; grid-row: 1; }
  .job__main { grid-column: 1; grid-row: 2; }
  .job__count { grid-column: 1; grid-row: 3; }
  .job__toggle { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .job__body { padding: 0 1.25rem 1.25rem; }
  .job__meta { gap: .2rem .9rem; }
  .job__meta li:not(:last-child)::after { display: none; }
  .job__cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .why { grid-template-columns: 1fr; }
  .why article, .why article + article { padding: 1.5rem 0; border-left: 0; margin-top: 0; }
  .why article + article { border-top: 1px solid var(--line); }
  .job__title { font-size: 1.1875rem; }
  .apply__steps { grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
  .apply__steps::before { display: none; }
  .apply__steps li { padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .18); }
  .apply__steps li::before { top: -.5rem; }
  .apply__mail { padding: 1.5rem; }
}

/* ---------- 暂无岗位 ---------- */
.jobs-empty {
  padding: clamp(2rem, 4vw, 3.5rem);
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  text-align: center;
}
.jobs-empty__title { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.jobs-empty p:not(.jobs-empty__title) { max-width: 36rem; margin: .9rem auto 1.75rem; font-size: 1rem; line-height: 1.85; color: var(--muted); }
.jobs-empty p a { color: var(--text); border-bottom: 1px solid var(--line-strong); }
.jobs-empty p a:hover { color: var(--brand-red); }
