/* ==========================================================================
   D08 — Careers
   Manifesto hero, team cards, filterable role search, hiring process,
   lab gallery + stories, talent-community sign-up.
   Behavior: js/pages/d08-careers.js
   ========================================================================== */

/* --------------------------------------------------------------------------
   Manifesto hero
   -------------------------------------------------------------------------- */
.careers-hero {
  position: relative;
  padding: clamp(64px, 10vw, 160px) 0 clamp(56px, 7vw, 112px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.careers-hero__inner {
  max-width: 1440px;
}

.careers-hero__title {
  margin-top: 18px;
  font-size: clamp(56px, 11vw, 184px);
  line-height: .84;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -.05em;
}

.careers-hero__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 32px 64px;
  align-items: end;
  margin-top: 40px;
}

.careers-hero__lead {
  max-width: 36ch;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.35;
}

.careers-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.careers-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The original buttons have no border box */
/* Secondary link keeps the plain body type of the original; on hover only
   the text turns amber (base link hover), the border stays. */
.careers-hero__secondary {
  padding: 0 22px;
  font-weight: 400;
  font-stretch: 100%;
}

.careers-hero__secondary:hover {
  border-color: var(--line-strong);
  color: var(--action-text);
}

/* --------------------------------------------------------------------------
   Section frame (teams, roles, process, labs)
   -------------------------------------------------------------------------- */
.careers-section {
  position: relative;
  padding: clamp(80px, 9vw, 136px) 0;
  border-bottom: 1px solid var(--line);
}

.careers-section--alt {
  background: var(--surface-1);
}

/* .heading-section--lg with the original's larger 64px cap */
.careers-section__title {
  font-size: clamp(34px, 4.4vw, 64px);
}

.careers-section__title--spaced {
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   Teams
   Cards are <button>s; the original uses the browser's default button type
   (Arial 13.33px, line-height normal) for the text that sets no font.
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-top: 40px;
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--text);
  font: 400 13.3333px Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  outline: 1px dashed transparent;
  outline-offset: 0;
  transition: outline-offset 400ms var(--ease-inertia), outline-color 250ms, transform 700ms var(--ease-inertia);
}

.team-card:hover {
  outline-color: var(--info);
  outline-offset: 8px;
}

.team-card .icon {
  color: var(--text);
}

.team-card__index,
.team-card__sites {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.team-card__title {
  font: 650 24px var(--font-sans);
  font-stretch: 118%;
}

.team-card__text {
  font-size: 15px;
  color: var(--text-2);
}

.team-card__foot {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  font-size: 14px;
}

.team-card__count {
  color: var(--action-text);
}

/* --------------------------------------------------------------------------
   Role search
   -------------------------------------------------------------------------- */
.role-search {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.role-search__field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
}

.role-search__field .icon {
  color: #EDEFF2;
}

.role-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 17px var(--font-sans);
  outline: none;
}

.role-search__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.role-search__group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-search__chip {
  height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  line-height: normal;
  cursor: pointer;
}

.role-search__chip[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--canvas);
}

.role-search__chip--team {
  border-radius: var(--r-pill);
  font: 500 13px var(--font-sans);
}

.role-search__chip--site {
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: 11px;
}

.role-search__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

/* Result list */
.role-list {
  margin-top: 12px;
  border-top: 1px solid var(--line-strong);
}

.role-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 6px 24px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.role-row:hover {
  background: var(--surface-2);
  color: var(--text);
}

.role-row__main {
  grid-column: span 2;
  min-width: 0;
}

.role-row__title {
  font-size: 18px;
}

.role-row__meta {
  font-size: 14px;
  color: var(--text-2);
}

.role-row__site,
.role-row__pay {
  font-family: var(--font-mono);
  font-size: 12px;
}

.role-row__pay {
  color: var(--text-2);
}

.role-row__link {
  font-size: 14px;
  color: var(--action-text);
  text-align: right;
}

/* Empty state */
.role-empty {
  padding: 40px;
  border: 1px dashed var(--line-strong);
  text-align: center;
  color: var(--text-2);
}

.role-empty__link {
  color: var(--action-text);
}

/* --------------------------------------------------------------------------
   Hiring process
   -------------------------------------------------------------------------- */
.process-steps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin-top: 40px;
}

.process-steps__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.process-steps__title {
  font-size: 20px;
}

.process-steps__text {
  font-size: 14px;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   Lab gallery + stories
   -------------------------------------------------------------------------- */
.lab-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(120px, 14vw, 200px);
  gap: 8px;
  margin-top: 32px;
}

.lab-gallery__tile {
  grid-column: span var(--cols, 1);
  grid-row: span var(--rows, 1);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, rgba(237, 239, 242, .05) 0 1px, transparent 1px 10px),
    linear-gradient(160deg, var(--tint), #07080B 80%);
}

.lab-gallery__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #AEB4BE;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin-top: 48px;
}

.story-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--canvas);
}

.story-card__quote {
  font-size: 22px;
  line-height: 1.35;
}

.story-card__person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.story-card__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 6px), var(--surface-2);
}

.story-card__who {
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Talent community
   -------------------------------------------------------------------------- */
.talent-community {
  position: relative;
  padding: clamp(96px, 11vw, 160px) 0;
}

.talent-community__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 48px;
  align-items: end;
}

.talent-community__title {
  margin-top: 14px;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: .92;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -.04em;
}

.talent-community__text {
  max-width: 44ch;
  margin-top: 18px;
  color: var(--text-2);
}

.talent-form,
.talent-form__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.talent-form__label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.talent-form__select {
  height: 52px;
  padding: 0 12px;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  font: 400 16px var(--font-sans);
}

.talent-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.talent-form__email {
  flex: 1;
  min-width: 220px;
  height: 56px;
  padding: 0 14px;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  font: 400 16px var(--font-sans);
}

.talent-form__submit {
  height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-1);
  background: var(--action);
  color: var(--on-action);
  font: 600 16px var(--font-sans);
  font-stretch: 112%;
  cursor: pointer;
}

.talent-form__fine {
  font-size: 13px;
  color: var(--text-3);
}

.talent-form__done {
  padding: 20px;
  border: 1px solid var(--success);
}
