/* ==========================================================================
   careers.css - styles for /careers.html only
   --------------------------------------------------------------------------
   Loads AFTER bootstrap.min.css and maplarge-boot.css. Everything here is
   namespaced so it cannot leak into other pages.

   Palette values are lifted from the existing site (maplarge-boot.css):
     #071e36  deepest navy      #122d49  navy panel background
     #343e52  heading slate     #005dbd  link blue
     #6ba7ff  light accent blue #ED7C52  orange accent (used sparingly)

   To re-theme the page, change the custom properties in :root below.
   ========================================================================== */

:root {
  --ml-navy-deep: #071e36;
  --ml-navy: #122d49;
  --ml-slate: #343e52;
  --ml-link: #005dbd;
  --ml-accent: #6ba7ff;
  --ml-accent-warm: #ed7c52;
  --ml-hairline: #e4ecf6;
  --ml-surface: #ffffff;
  --ml-surface-alt: #f4f5f9;
  --ml-radius: 0.5rem;
}

/* Keyboard users land on the roles without tabbing the whole nav. */
.ml-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1100;
  padding: 0.75rem 1rem;
  background: #fff;
  color: var(--ml-navy);
  font-weight: 500;
}

.ml-skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Shared section rhythm
   -------------------------------------------------------------------------- */

.ml-section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

/* maplarge-boot.css puts 8rem of padding on every bare <section>. Where a
   band wraps an inner .ml-section the two would stack, so zero the outer one
   and let .ml-section own the vertical rhythm. */
.ml-roles-band,
.ml-process-band {
  padding-top: 0;
  padding-bottom: 0;
}

.ml-section-title {
  font-family: Roboto, sans-serif;
  color: var(--ml-slate);
  font-size: 2.375rem;
  line-height: 2.875rem;
  font-weight: 500;
  text-align: center;
  margin: 0 0 1rem;
}

.ml-section-title--left {
  text-align: left;
}

.ml-section-lede {
  max-width: 46rem;
  margin: 0 auto 2.75rem;
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.9rem;
  color: #4d5256;
}

.ml-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ml-accent);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Hero
   Background image is the existing /images/people.jpg asset, dimmed hard so
   the navy reads as brand colour rather than as a stock photo.
   -------------------------------------------------------------------------- */

.ml-careers-hero {
  background-color: var(--ml-navy);
  background-image: linear-gradient(180deg, rgba(7, 30, 54, 0.92), rgba(18, 45, 73, 0.97)),
    url("../images/people.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 5.5rem 0 3.5rem;
}

.ml-careers-hero__title {
  font-family: Roboto, sans-serif;
  color: #fff;
  font-size: 3.25rem;
  line-height: 3.75rem;
  font-weight: 500;
  margin: 0 0 1.25rem;
}

.ml-careers-hero__lede {
  font-size: 1.25rem;
  line-height: 2.125rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 44rem;
  margin-bottom: 2rem;
}

.ml-careers-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ml-careers-hero__actions .btn {
  min-width: 13.5rem;
}

/* Proof-point row under the hero copy. */
.ml-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 3.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ml-stat {
  flex: 1 1 12rem;
}

.ml-stat dt {
  font-size: 1.5rem;
  line-height: 1.9rem;
  font-weight: 500;
  color: #fff;
}

.ml-stat dd {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4rem;
  color: rgba(255, 255, 255, 0.72);
}

/* --------------------------------------------------------------------------
   "Why engineers stay" value cards
   -------------------------------------------------------------------------- */

.ml-value-card {
  height: 100%;
  padding: 2rem;
  border: 1px solid var(--ml-hairline);
  border-radius: var(--ml-radius);
  background: var(--ml-surface);
  border-top: 3px solid var(--ml-navy);
}

.ml-value-card h3 {
  font-family: Roboto, sans-serif;
  font-size: 1.375rem;
  line-height: 1.75rem;
  font-weight: 500;
  color: var(--ml-slate);
  margin: 0 0 0.75rem;
}

.ml-value-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7rem;
  color: #4d5256;
}

/* --------------------------------------------------------------------------
   Open roles
   -------------------------------------------------------------------------- */

.ml-roles-band {
  /* the site navbar is fixed-top, so keep #open-roles clear of it */
  scroll-margin-top: 5rem;
  background: var(--ml-surface-alt);
  border-top: 1px solid var(--ml-hairline);
  border-bottom: 1px solid var(--ml-hairline);
}

/* The filter bar is a JS enhancement. The site's existing inline snippet adds
   `w-mod-js` to <html>, so with JS off the chips never appear and every role
   card stays visible. */
.ml-filters,
.ml-filter-status {
  display: none;
}

.w-mod-js .ml-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.w-mod-js .ml-filter-status {
  display: block;
}

.ml-chip {
  border: 1px solid #cbd3e7;
  background: #fff;
  color: var(--ml-slate);
  border-radius: 999px;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ml-chip:hover {
  border-color: var(--ml-navy);
}

.ml-chip.is-active {
  background: var(--ml-navy);
  border-color: var(--ml-navy);
  color: #fff;
}

.ml-chip:focus-visible {
  outline: 2px solid var(--ml-link);
  outline-offset: 2px;
}

.w-mod-js .ml-filter-status {
  text-align: center;
  font-size: 0.875rem;
  color: #7a8794;
  min-height: 1.25rem;
  margin-bottom: 2rem;
}

.ml-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.5rem;
}

.ml-role {
  display: flex;
  flex-direction: column;
  background: var(--ml-surface);
  border: 1px solid var(--ml-hairline);
  border-radius: var(--ml-radius);
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgb(82 91 115 / 12%);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ml-role:hover {
  box-shadow: 0 8px 24px rgb(82 91 115 / 16%);
  transform: translateY(-2px);
}

.ml-role__title {
  font-family: Roboto, sans-serif;
  font-size: 1.25rem;
  line-height: 1.65rem;
  font-weight: 500;
  color: var(--ml-slate);
  margin: 0 0 0.5rem;
}

/* Clearance flag - the one place the warm accent is used. */
.ml-role__badge {
  display: inline-block;
  align-self: flex-start; /* .ml-role is a column flexbox - stop the badge stretching */
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a3b1c;
  background: rgba(237, 124, 82, 0.14);
  border: 1px solid rgba(237, 124, 82, 0.4);
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
  margin: 0 0 0.6rem;
}

.ml-role__meta {
  font-size: 0.875rem;
  line-height: 1.35rem;
  color: #7a8794;
  margin: 0 0 1rem;
}

.ml-role__points {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex-grow: 1;
}

.ml-role__points li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.6rem;
  font-size: 0.9375rem;
  line-height: 1.55rem;
  color: #4d5256;
}

.ml-role__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--ml-accent);
}

/* Matches the existing .ml-career-job link treatment on the current site. */
.ml-role__link {
  align-self: flex-start;
  text-transform: uppercase;
  color: var(--ml-link);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
}

.ml-role__link:hover {
  text-decoration: underline;
}

.ml-empty-state {
  text-align: center;
  margin: 2.5rem 0 0;
  color: #4d5256;
}

/* --------------------------------------------------------------------------
   Who thrives here
   -------------------------------------------------------------------------- */

/* No custom margin rules for the two-column row on purpose. Bootstrap's g-4
   sets --bs-gutter-y as well as -x: every .row > * gets margin-top: 1.5rem and
   the .row carries -1.5rem to cancel the first row's. That already gives the
   gap when the columns stack, and overriding margin-top on one column knocks it
   out of vertical alignment with the other. */

.ml-trait-intro {
  font-size: 1.0625rem;
  line-height: 1.8rem;
  color: #4d5256;
  margin: 0 0 1.25rem;
}

.ml-trait-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ml-trait-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
  font-size: 1.0625rem;
  line-height: 1.8rem;
  color: #4d5256;
}

.ml-trait-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 0.75rem;
  height: 2px;
  background: var(--ml-accent);
}

.ml-trait-list strong {
  color: var(--ml-slate);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Hiring process
   -------------------------------------------------------------------------- */

.ml-process-band {
  background: var(--ml-surface-alt);
  border-top: 1px solid var(--ml-hairline);
}

.ml-process {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}

.ml-process li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--ml-hairline);
  border-radius: var(--ml-radius);
  font-size: 0.9375rem;
  line-height: 1.5rem;
  color: #4d5256;
}

.ml-process__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--ml-navy);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
}

.ml-process strong {
  color: var(--ml-slate);
  font-weight: 500;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.ml-cta-band {
  background: var(--ml-navy-deep);
  color: #fff;
  padding: 4.5rem 0;
}

.ml-cta-band__title {
  font-family: Roboto, sans-serif;
  font-size: 2.125rem;
  line-height: 2.625rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 0.75rem;
}

.ml-cta-band__text {
  font-size: 1.125rem;
  line-height: 1.85rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38rem;
  margin: 0 auto 2rem;
}

.ml-eeo {
  max-width: 46rem;
  margin: 3rem auto 0;
  font-size: 0.8125rem;
  line-height: 1.4rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Accommodation contact must stay legible against the navy, not fade into the
   legal text around it - people who need it have to be able to find it. */
.ml-eeo__link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.ml-eeo__link:hover,
.ml-eeo__link:focus {
  color: #fff;
}

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

@media screen and (max-width: 991px) {
  .ml-careers-hero__title {
    font-size: 2.5rem;
    line-height: 3rem;
  }
}

@media screen and (max-width: 767px) {
  .ml-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .ml-careers-hero {
    padding: 3.5rem 0 2.5rem;
  }

  .ml-careers-hero__title {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  .ml-careers-hero__lede {
    font-size: 1.0625rem;
    line-height: 1.8rem;
  }

  .ml-careers-hero__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .ml-section-title {
    font-size: 1.75rem;
    line-height: 2.25rem;
  }

  .ml-stat-row {
    gap: 1.5rem;
  }

  .ml-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .ml-role,
  .ml-chip {
    transition: none;
  }

  .ml-role:hover {
    transform: none;
  }
}
