/* =========================
   CAREER — HERO
   Two stacked zones inside one 100vh view:
   UPPER  = the oversized "Careers" wordmark, centred both ways,
            with a hairline divider (2rem inset) on its lower edge.
   LOWER  = eyebrow + a 2-line section heading + location on the
            LEFT and a 4-line paragraph on the RIGHT, sitting on
            the bottom padding (2rem).
   Letter + line reveals: /js/career-hero-animations.js
========================= */
.career-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  box-sizing: border-box;
  padding: 0 2rem 2rem;
}

/* UPPER ZONE — takes every pixel the statement below does not, and
   centres the wordmark in it on both axes (same as the About hero). */
.career-hero__top {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  /* border-bottom: 1px solid rgba(255, 255, 255, 0.14); */
}

.career-hero__word {
  margin: 0;
  /* tight leading + no descenders makes the glyphs sit visually high in
     their box — nudge down so it reads centred between header and line */
  transform: translateY(0.06em);
  font-family: "degular", sans-serif;
  font-size: clamp(3.25rem, 22vw, 22rem);
  line-height: 0.86;
  font-weight: var(--dz-heading-weight);
  letter-spacing: -0.02em;
  color: var(--dz-fg);
  white-space: nowrap;
  text-align: center;
}

/* LOWER ZONE — heading left, paragraph right, sitting on the 2rem
   bottom padding. Only as tall as its own content, so the wordmark
   above keeps the whole of the remaining height to centre in. */
.career-hero__statement {
  flex: 0 0 auto;
  width: 100%;
  padding-top: clamp(2rem, 7vh, 4.5rem);
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 7vw, 7rem);
  text-align: left;
}

.career-hero__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.career-hero__eyebrow.dz-eyebrow {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

/* section-sized heading — copy + max-width tuned to wrap to 2 lines */
/* shared page-hero scale from main.css — identical on every page */
.career-hero__heading {
  margin: 0;
  max-width: 20ch;

  font-family: var(--dz-font-display);
  font-size: var(--dz-page-hero-size);
  line-height: var(--dz-page-hero-line);
  font-weight: var(--dz-heading-weight);
  letter-spacing: var(--dz-heading-tracking);
  color: var(--dz-heading-color);
}

/* supporting copy — right column, ~4 lines, sits on the heading's baseline */
.career-hero__para {
  flex: 0 1 44ch;
  max-width: 44ch;
  margin: 0 0 0.35em;

  font-family: var(--dz-font-body);
  font-size: var(--dz-body-size);
  line-height: var(--dz-body-line);
  color: var(--dz-body-color);
}

.career-hero__location {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 820px) {
  .career-hero__statement {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(1.5rem, 5vw, 2.5rem);
  }

  .career-hero__heading {
    max-width: 24ch;
  }

  .career-hero__para {
    flex-basis: auto;
    max-width: 52ch;
    margin-bottom: 0;
  }
}

.career-loc-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--dz-fg-rgb), calc(0.35 + var(--dz-text-lift)));
}

.career-loc-item i {
  font-size: 0.85rem;
  opacity: calc(0.6 + var(--dz-text-lift));
}

.career-loc-sep {
  color: rgba(var(--dz-fg-rgb), calc(0.2 + var(--dz-text-lift)));
}


/* =========================
   SECTION DIVIDERS
   The same hairline the About page puts between its sections
   (.about-section in /css/about.css) — edge to edge, so the page
   reads as one stacked document rather than loose blocks.
   The hero is excluded: it already closes on its own rule, and a
   line above the first section would sit on nothing.
========================= */
.career-team,
.career-why,
.career-roles,
.career-gallery {
  border-top: 1px solid rgba(var(--dz-fg-rgb), 0.08);
}


/* =========================
   THE TEAM
========================= */
.career-team {
  padding: 2rem 2rem 0;
}

.career-team__media {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
}

.career-team__media img {
  display: block;
  width: 100%;
  height: clamp(320px, 46vw, 640px);
  object-fit: cover;
  filter: grayscale(1);

  will-change: transform;
  transform: scale(1.05) translateZ(0);
  backface-visibility: hidden;
}


/* =========================
   WHY WORK HERE
   Two columns: the pitch on the left, four numbered points on the
   right. Plain static layout — no pinning, no scroll interaction, so
   it stays quiet next to the roles stack that follows it.
   Mirrors the .career-roles grid so both sections line up.
========================= */
.career-why {
  padding: clamp(4rem, 9vh, 7rem) 2rem;
}

.career-why__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.career-why__heading {
  margin: 0;
  font-family: var(--dz-font-display);
  font-size: var(--dz-section-size);
  line-height: var(--dz-section-line);
  font-weight: var(--dz-heading-weight);
  letter-spacing: var(--dz-heading-tracking);
  color: var(--dz-heading-color);
}

.career-why__desc {
  margin: clamp(2rem, 5vh, 3.25rem) 0 0;
  max-width: 34ch;
  font-family: var(--dz-font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(var(--dz-fg-rgb), calc(0.4 + var(--dz-text-lift)));
}


/* ── the numbered points ── */
.career-why__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.why-row {
  display: grid;
  grid-template-columns: clamp(2.5rem, 4vw, 3.5rem) minmax(8rem, 0.9fr) minmax(0, 2fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: baseline;

  padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
  border-top: 1px solid rgba(var(--dz-fg-rgb), 0.14);
}

.why-row:last-child {
  border-bottom: 1px solid rgba(var(--dz-fg-rgb), 0.14);
}

.why-row__num {
  font-family: "degular", sans-serif;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  font-weight: var(--dz-regular-weight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(var(--dz-fg-rgb), calc(0.3 + var(--dz-text-lift)));
}

.why-row__title {
  font-family: "degular", sans-serif;
  font-size: clamp(1.3rem, 1.9vw, 1.75rem);
  font-weight: var(--dz-heading-weight);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--dz-fg);
}

.why-row__desc {
  font-family: var(--dz-font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(var(--dz-fg-rgb), calc(0.5 + var(--dz-text-lift)));
}


/* ── tablet: pitch above, points below ── */
@media (max-width: 1024px) {
  .career-why__inner {
    display: block;
  }

  .career-why__aside {
    margin-bottom: clamp(2rem, 5vw, 3rem);
  }
}


/* ── mobile: number + title on one line, copy underneath ── */
@media (max-width: 1024px) {
  .career-why {
    padding: 3.5rem 1rem;
  }

  .why-row {
    grid-template-columns: clamp(2rem, 8vw, 2.5rem) minmax(0, 1fr);
    gap: 0.5rem 1rem;
  }

  .why-row__desc {
    grid-column: 2;
  }
}


/* =========================
   OPEN ROLES  —  vertical scroll stack
   Driven by GSAP ScrollTrigger in /js/career-roles.js

   The section is pinned for the length of the interaction. Every box in
   the stack (the job cards AND the CTA) is absolutely positioned inside
   .career-roles__jobs and moved with a `y` transform by the script, so
   the script decides every position — nothing here can make two boxes
   overlap by accident.

   CSS only has to do three things:
     1. take the boxes out of flow so JS can place them,
     2. give .role-card__body `overflow: hidden` so its height can be
        animated to 0 (that is how the description hides),
     3. fall back to a plain, static list on mobile.
========================= */
.career-roles {
  /* top · sides · bottom */
  padding: 3rem 2rem 2rem;
  box-sizing: border-box;
  min-height: 100vh;
}

.career-roles__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.career-roles__aside {
  align-self: start;
}

.career-section-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--dz-fg-rgb), calc(0.3 + var(--dz-text-lift)));
  margin-bottom: 1.2rem;
}

.career-roles__heading {
  margin: 0;
  font-family: var(--dz-font-display);
  font-size: var(--dz-section-size);
  line-height: var(--dz-section-line);
  font-weight: var(--dz-heading-weight);
  letter-spacing: var(--dz-heading-tracking);
  color: var(--dz-heading-color);
}

.career-roles__desc {
  margin: clamp(2rem, 5vh, 3.25rem) 0 0;
  max-width: 34ch;
  font-family: var(--dz-font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(var(--dz-fg-rgb), calc(0.4 + var(--dz-text-lift)));
}


/* The window the stack lives in. The script sets its height to the
   height of the finished stack, because absolutely positioned children
   give their parent no height of their own. */
.career-roles__jobs {
  position: relative;
}

/* Every box in the stack — job cards and the CTA alike — is placed by
   the script. `top: 0` is only the starting line; the real position is
   the `y` transform GSAP writes. */
.career-roles__jobs > .role-card,
.career-roles__jobs > .roles-outro {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--dz-bg);          /* solid, so nothing shows through */
  will-change: transform;
}

.role-card {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(var(--dz-fg-rgb), 0.14);
}

/* The part that hides. `overflow: hidden` is what lets the script
   animate its height down to 0 without the copy spilling out.
   padding-top instead of a margin on the first child, so the measured
   height is the real height. */
.role-card__body {
  overflow: hidden;
  padding-top: 1.5rem;
}


/* ── card internals ── */
.role-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.role-card__title {
  margin: 0;
  font-family: "degular", sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: var(--dz-heading-weight);
  color: var(--dz-fg);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.role-card__top .role__apply {
  flex-shrink: 0;
}

.role-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;   /* the body's padding-top provides this space instead */
}

.role-card__desc {
  margin: 1.25rem 0 0;
  max-width: 68ch;
  font-family: var(--dz-font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(var(--dz-fg-rgb), calc(0.55 + var(--dz-text-lift)));
}

.role-card__req-title {
  margin: 1.5rem 0 0;
  font-family: var(--dz-font-body);
  font-size: 0.72rem;
  font-weight: var(--dz-medium-weight);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--dz-fg-rgb), calc(0.32 + var(--dz-text-lift)));
}

.role-card__req-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.role-card__req-list li {
  position: relative;
  padding-left: 1.4rem;
  font-family: var(--dz-font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(var(--dz-fg-rgb), calc(0.5 + var(--dz-text-lift)));
}

.role-card__req-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(var(--dz-fg-rgb), calc(0.22 + var(--dz-text-lift)));
}


/* ── the CTA ──
   The CTA is simply the LAST box in the stack. The script parks every
   job card above it and never gives it a position that another card can
   reach, so it can't be covered. It also has no `__body`, so nothing
   about it ever collapses — it is always shown in full. */
.roles-outro {
  padding: 2rem 0;
  border-top: 1px solid rgba(var(--dz-fg-rgb), 0.14);
  border-bottom: 1px solid rgba(var(--dz-fg-rgb), 0.14);
}

.roles-outro__heading {
  margin: 0;
  font-family: "degular", sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: var(--dz-heading-weight);
  color: var(--dz-fg);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.roles-outro__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(1.25rem, 3vh, 2rem);
}

.roles-outro__desc {
  margin: 0;
  max-width: 40ch;
  font-family: var(--dz-font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(var(--dz-fg-rgb), calc(0.45 + var(--dz-text-lift)));
}


/* ── buttons + chips ── */
.role__apply {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;

  font-family: var(--dz-font-button);
  font-size: 0.95rem;
  color: var(--dz-fg);
  text-decoration: none;

  border: 1px solid rgba(var(--dz-fg-rgb), 0.35);
  border-radius: 2px;
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.role__apply:hover,
.role__apply:focus-visible {
  color: var(--dz-bg);
  border-color: var(--dz-fg);
  background: var(--dz-fg);
  outline: none;
}

.role__apply--solid {
  flex-shrink: 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.role__apply i {
  font-size: 1.05em;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.role__apply:hover i,
.role__apply:focus-visible i {
  transform: rotate(45deg);
}

.role-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;

  font-family: var(--dz-font-body);
  font-size: 0.78rem;
  color: rgba(var(--dz-fg-rgb), calc(0.6 + var(--dz-text-lift)));

  background: rgba(var(--dz-fg-rgb), 0.07);
  border-radius: 3px;
}


/* ── tablet ── */
@media (max-width: 1024px) and (min-width: 768px) {
  .career-roles__inner {
    display: block;
  }

  .career-roles__aside {
    margin-bottom: 2.5rem;
  }
}


/* ── mobile: plain readable list, no stacking ──
   The script does not run below 768px (see /js/career-roles.js), so the
   cards go back to normal flow: every title, description, Apply button
   and the CTA are all visible, and nothing overlaps. */
@media (max-width: 1024px) {
  .career-roles {
    padding: 3.5rem 1rem 4rem;
    min-height: 0;
  }

  .career-roles__inner {
    display: block;
  }

  .career-roles__aside {
    margin-bottom: 2rem;
  }

  /* undo the absolute placement — back to a simple stacked list */
  .career-roles__jobs {
    height: auto !important;
  }

  .career-roles__jobs > .role-card,
  .career-roles__jobs > .roles-outro {
    position: static;
    width: auto;
  }

  .role-card__top,
  .roles-outro__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}


/* =========================
   STUDIO GALLERY  —  continuous horizontal marquee

   How the endless loop works:
   The track holds the SAME row of images twice. The animation slides
   the track left by exactly 50% of its own width — the width of one
   group — and then snaps back to the start. Because group 2 is sitting
   exactly where group 1 was, the snap is invisible and the row appears
   to run forever.

   No JavaScript. Nothing to initialise, nothing to break.
========================= */
.career-gallery {
  /* how long ONE full pass takes.
     BIGGER = slower. SMALLER = faster. */
  --gallery-speed: 60s;

  /* the space between images */
  --gallery-gap: clamp(0.75rem, 1.5vw, 1.25rem);

  padding: clamp(3rem, 8vh, 6rem) 0;
  overflow: hidden;      /* hides everything outside the screen edges */
}

.career-gallery__track {
  display: flex;
  width: max-content;    /* let the row be as wide as it needs to be */

  animation: career-gallery-scroll var(--gallery-speed) linear infinite;
  will-change: transform;
}

/* The gap lives INSIDE the group, and the group carries the same gap
   again on its right edge. That way the two groups are exactly the same
   width including their spacing, so half the track is exactly one group
   and the loop joins up perfectly.

   (Putting a gap on the track instead would split it between the two
   groups and leave the row half a gap out of step at the join.) */
.career-gallery__group {
  display: flex;
  gap: var(--gallery-gap);
  margin-right: var(--gallery-gap);
}

/* slide left by half the track — i.e. exactly one group */
@keyframes career-gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.gallery-item {
  flex: 0 0 auto;
  width: clamp(220px, 22vw, 340px);
  aspect-ratio: 4 / 5;      /* portrait — the height follows the width */
  border-radius: 0;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.4s ease;
}

/* a little life on hover, without stopping the row */
.gallery-item:hover img {
  filter: grayscale(0);
}

/* respect a reduced-motion preference — show the images, hold still */
@media (prefers-reduced-motion: reduce) {
  .career-gallery__track {
    animation: none;
  }
}


/* =========================
   PHONE  (≤ 767px) — shared mobile system from main.css
   · "Careers" runs gutter to gutter (3.15em measured width)
   · every section on the one 1.25rem gutter (was 1rem / 2rem)
   · the studio photo becomes a 4:5 portrait plate
========================= */
@media (max-width: 1024px) {
  .career-hero {
    min-height: 100svh;
    padding: 0 var(--dz-gutter) 1.75rem;
  }

  .career-hero__word {
    font-size: calc((100vw - 2 * var(--dz-gutter)) / 3.15);
  }

  .career-team {
    padding: var(--dz-gutter) var(--dz-gutter) 0;
  }

  .career-team__media img {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .career-why {
    padding: var(--dz-section-py) var(--dz-gutter);
  }

  .career-roles {
    padding: var(--dz-section-py) var(--dz-gutter);
  }

  .gallery-item {
    width: 62vw;
  }
}

