/**
 * Careers page.
 *
 * Only what the shared layer does not already provide: the hero, the reasons
 * grid, the openings accordion and the application modal's own sizing. The
 * `style-hover` attributes the export's runtime interpreted are reconstructed
 * here as real :hover / :focus-within rules.
 *
 * The export shipped no media queries at all, so every breakpoint below is new.
 */

/* --- Section geometry ------------------------------------------------------
 *
 * The export sized every careers section by hand. Three of them differ from the
 * shared defaults, so they re-point the tokens `.iff-section` and `.iff-wrap`
 * already consume rather than hardcoding widths:
 *
 *   HERO              120px / 48px / 96px   wrap 1200px (theme default)
 *   WHY WORK HERE     104px / 48px          wrap 1200px (theme default)
 *   WHY WORK WITH US  104px / 48px          wrap 1000px
 *   OPEN POSITIONS    104px / 48px          wrap  900px
 *
 * `--section-y` resolves to one value, so it cannot express the hero's
 * asymmetric padding; the hero states both edges itself. Each clamp's maximum
 * is the exact desktop figure and is reached at a 1200px viewport — the width
 * the design is drawn at — so the vertical rhythm still scales down on phones.
 */

.iff-careers-reasons,
.iff-careers-offer,
.iff-careers-jobs {
  --section-y: clamp(3.5rem, 0.5rem + 8vw, 6.5rem); /* 104px */
}

.iff-careers-offer {
  --wrap: 1000px;
}

.iff-careers-jobs {
  --wrap: 900px;
}

/* --- Hero ----------------------------------------------------------------- */

.iff-careers-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  /* 120px top / 48px sides / 96px bottom at desktop. */
  padding: clamp(4rem, 10vw, 7.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
  /* The photo slot is optional, so ink carries the hero on its own. */
  background: var(--iff-ink);
  color: var(--iff-cream);
}

.iff-careers-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.iff-careers-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iff-careers-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    120deg,
    rgb(13 40 24 / 60%) 0%,
    rgb(13 40 24 / 45%) 55%,
    rgb(13 40 24 / 30%) 100%
  );
  pointer-events: none;
}

.iff-careers-hero__inner {
  position: relative;
  z-index: 2;
}

.iff-careers-hero__eyebrow {
  margin-bottom: 1.75rem;
}

.iff-careers-hero__title {
  max-width: 16ch;
  margin: 0 0 1.5rem;
  font-weight: 700;
}

.iff-careers-hero__lead {
  max-width: 56ch;
  margin: 0;
  color: var(--c-on-dark-soft);
  font-weight: 300;
}

/* --- Why work here -------------------------------------------------------- */

.iff-careers-reasons {
  background: var(--c-bg);
}

/* A 1px gap over a hairline background draws the dividers the export inlined. */
.iff-careers-reasons__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--c-hairline);
  border: 1px solid var(--c-hairline);
}

.iff-careers-reason {
  padding: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem) clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  background: var(--c-bg);
}

.iff-careers-reason__number {
  margin: 0 0 1rem;
  color: var(--c-highlight);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.iff-careers-reason__title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.iff-careers-reason__body {
  margin: 0;
  color: var(--c-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 300;
}

/* --- Why work with us ----------------------------------------------------- */

.iff-careers-offer {
  background: var(--c-bg-alt);
}

.iff-careers-offer__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
}

.iff-careers-offer__eyebrow {
  color: var(--c-muted);
  letter-spacing: 0.16em;
}

.iff-careers-offer__title {
  margin: 0 0 2rem;
}

.iff-careers-offer__body {
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  font-weight: 300;
}

.iff-careers-offer__body p {
  margin: 0 0 1.5rem;
}

.iff-careers-offer__list {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--c-hairline);
}

.iff-careers-offer__label {
  margin: 0 0 1.75rem;
  color: var(--c-ink);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.iff-careers-offer__items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iff-careers-offer__items li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--c-ink);
  font-size: 1rem;
}

.iff-careers-offer__items li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--c-highlight);
  font-family: var(--font-mono);
}

/* --- Open positions ------------------------------------------------------- */

.iff-careers-jobs {
  background: var(--iff-white);
}

.iff-careers-jobs__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
}

.iff-careers-jobs__eyebrow {
  color: var(--c-muted);
  letter-spacing: 0.16em;
}

.iff-careers-jobs__title {
  margin: 0 0 3.25rem;
}

.iff-careers-jobs__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.iff-careers-jobs__empty {
  padding: 2.5rem 0;
  border-top: 1px solid var(--c-hairline);
  border-bottom: 1px solid var(--c-hairline);
}

.iff-careers-jobs__empty p {
  margin: 0;
  color: var(--c-body);
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  font-weight: 300;
}

/* --- Job accordion -------------------------------------------------------- */

.iff-job,
.iff-careers-open {
  border: 1.5px solid rgb(13 40 24 / 22%);
  border-radius: 10px;
  box-shadow: 0 20px 40px -24px rgb(13 40 24 / 22%);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.iff-job:hover,
.iff-job:focus-within,
.iff-careers-open:hover,
.iff-careers-open:focus-within {
  transform: translateY(-4px);
  border-color: rgb(13 40 24 / 40%);
  box-shadow: 0 28px 52px -20px rgb(13 40 24 / 30%);
}

/* The heading exists for document outline only; the button carries the style. */
.iff-job__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.iff-job__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.875rem 2rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}

.iff-job__label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.iff-job__title {
  color: var(--c-ink);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}

.iff-job__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.iff-job__meta span + span::before {
  content: "·";
  margin-right: 1rem;
}

.iff-job__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--c-highlight);
  transition: transform var(--dur) var(--ease);
}

.iff-job__icon svg {
  width: 20px;
  height: 20px;
}

.iff-job.is-open .iff-job__icon {
  transform: rotate(45deg);
}

.iff-job__panel {
  padding: 0 2rem 1.875rem;
}

.iff-job__panel[hidden] {
  display: none;
}

.iff-job__body {
  margin-bottom: 1.25rem;
  padding-top: 1.375rem;
  border-top: 1px solid var(--c-hairline);
  font-size: 0.9375rem;
  line-height: 1.65;
  font-weight: 300;
}

/* --- Open application card ------------------------------------------------ */

.iff-careers-open {
  margin-top: 2.75rem;
  padding: 2.25rem;
  text-align: center;
}

.iff-careers-open__text {
  margin: 0 0 1.125rem;
  color: var(--c-body);
  font-size: 0.9375rem;
  font-weight: 300;
}

.iff-careers-open__cta {
  padding: 0;
  border: none;
  background: none;
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}

.iff-careers-open__cta:hover {
  color: var(--c-highlight);
}

/* --- Application modal ---------------------------------------------------- */

.iff-careers-modal .iff-modal__panel {
  width: min(560px, 100%);
}

.iff-careers-modal__form[hidden],
.iff-careers-modal__success[hidden] {
  display: none;
}

.iff-careers-modal__title {
  margin: 0 0 1.75rem;
  color: var(--c-ink);
  font-size: 1.375rem;
}

/* CF7 renders a bare file input; the export used a dashed drop-zone. */
.iff-careers-modal .iff-form input[type="file"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--c-hairline-strong);
  border-radius: var(--radius);
  background: var(--iff-white);
  font-family: inherit;
  font-size: 0.875rem;
}

.iff-careers-modal__success {
  padding: 1.25rem 0;
  text-align: center;
}

.iff-careers-modal__success h3 {
  margin: 0 0 0.75rem;
}

.iff-careers-modal__success-text {
  margin: 0 0 1.75rem;
  color: var(--c-body);
  font-size: 0.9375rem;
  font-weight: 300;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  .iff-careers-reasons__grid {
    grid-template-columns: 1fr;
  }

  .iff-careers-hero__title {
    max-width: 20ch;
  }

  .iff-job__toggle {
    padding: 1.5rem 1.5rem;
  }

  .iff-job__panel {
    padding: 0 1.5rem 1.5rem;
  }
}

@media (max-width: 640px) {
  .iff-careers-hero {
    min-height: 420px;
  }

  .iff-careers-hero__title {
    max-width: none;
  }

  .iff-careers-offer__items {
    grid-template-columns: 1fr;
  }

  .iff-job__toggle {
    align-items: flex-start;
    gap: 1rem;
  }

  .iff-job__meta {
    gap: 0.5rem 0.75rem;
  }

  .iff-job__meta span + span::before {
    margin-right: 0.75rem;
  }

  .iff-job__apply {
    width: 100%;
  }

  .iff-careers-open {
    padding: 1.75rem 1.25rem;
  }

  /* The page-specific width would otherwise beat base.css's full-screen sheet. */
  .iff-careers-modal .iff-modal__panel {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}
