/* ==========================================================================
   Careers (/jobs/) - page rules only.
   Header, nav, buttons, type, and footer come from /css/styles.css. This
   file lays out the intro statement, the application panel, and the perks.
   ========================================================================== */

/* The page's H1 is for assistive tech; the visible title is the statement. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Intro - a quiet statement on the page ground, clear of the fixed header.
   ========================================================================== */

.careers-intro {
  background: var(--ink-0);
  padding-top: calc(var(--header-h) + clamp(4.5rem, 9vw, 7.5rem));
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.careers-intro .statement-title { margin-bottom: 1.75rem; }

.careers-intro__lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--paper-2);
  max-width: 56ch;
  margin: 0;
}

.careers-intro__lead a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--t) var(--ease);
}
.careers-intro__lead a:hover { text-decoration-color: var(--paper); }

/* ==========================================================================
   Apply - the form in a hairline panel, what we offer beside it.
   ========================================================================== */

.careers-apply {
  background: var(--ink-1);
  padding-block: var(--section-y);
}

.careers-apply__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

/* ---------- The panel ----------
   Plain: one hairline, two pixel corners, no shadow. The thank-you block
   takes the same frame so the swap after submit does not jump. */
.apply-form,
.apply-form__thanks {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  color-scheme: dark;
}

/* The inline script toggles the hidden attribute; make sure it always wins. */
.apply-form[hidden],
.apply-form__thanks[hidden] { display: none; }

.apply-form__field { margin-bottom: 1.5rem; }

/* Labels speak in the eyebrow voice: small, tracked, gold. */
.apply-form__field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 90%;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.apply-form__field label span { color: var(--muted); }

.apply-form__optional {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-left: 0.5rem;
}

/* Fields are the page ground set into the panel; the hairline brightens
   when the field takes focus. */
.apply-form__field input,
.apply-form__field textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  font: inherit;
  line-height: 1.4;
  color: var(--paper);
  background: var(--ink-0);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color var(--t) var(--ease);
}

.apply-form__field textarea {
  resize: vertical;
  min-height: 9.5rem;
}

.apply-form__field input:focus,
.apply-form__field textarea:focus {
  outline: none;
  border-color: var(--line-strong);
}

/* Keep browser autofill from painting the fields light. */
.apply-form__field input:-webkit-autofill,
.apply-form__field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  -webkit-box-shadow: 0 0 0 1000px var(--ink-0) inset;
  caret-color: var(--paper);
}

/* The page's one action: full width, red. */
.apply-form__submit {
  width: 100%;
  margin-top: 0.5rem;
}

.apply-form__thanks h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0 0 0.75rem;
}

.apply-form__thanks p {
  margin: 0;
  color: var(--paper-2);
}

/* ---------- Perks ----------
   Three cells divided by hairlines, riding beside the form on wide screens. */
.careers-perks {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.apply-perks__label {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0 0 1.25rem;
}

.apply-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.apply-perks li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--paper);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .careers-apply__grid { grid-template-columns: 1fr; }
  .careers-perks { position: static; }
}
