/* =========================================================================
   Careers page.

   Built to the reference the client supplied as a full-page capture: an
   editorial layout of alternating light and dark bands, large light-weight
   display type, thin rules, outlined rectangular buttons and an accordion of
   openings. The reference is strict black and white; here the dark band is
   the site's own green-black and the light band an off-white with a faint
   green-grey bias, so the page belongs to regobs.com rather than to the
   reference. The yellow accent is used the way the reference uses its blue:
   at the scale of a dot.

   Loaded after styles.css. Nothing shared is restyled.
   ========================================================================= */

:root {
  --c-light:      #F4F5F2;
  --c-light-2:    #EAECE7;
  --c-ink:        #0C1E1B;
  --c-ink-soft:   #3E4A46;
  --c-ink-dim:    #7A847F;
  --c-rule-light: rgba(12, 30, 27, 0.16);
  --c-rule-dark:  rgba(240, 240, 240, 0.14);
}

.careers-page { overflow-x: hidden; }

.cw {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Every band paints its own ground and ink, so a component never has to know
   which one it sits in. */
.band { padding: 120px 0; }
.band--dark  { background: var(--bg-dark);   color: var(--text-white); }
.band--light { background: var(--c-light);   color: var(--c-ink); }
.band--grey  { background: var(--c-light-2); color: var(--c-ink); }

/* ---------------------------------------------------------------- type */

.display {
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-wrap: balance;
  margin: 0;
}
.display--xl { font-size: clamp(3rem, 7.5vw, 6rem); line-height: 0.98; }
.display--l  { font-size: clamp(2.5rem, 5vw, 4.25rem); }
.display--m  { font-size: clamp(2rem, 3.6vw, 3rem); }

.lede {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0;
}
.band--dark .lede  { color: var(--text-muted); }
.band--light .lede, .band--grey .lede { color: var(--c-ink-soft); }

.centered { text-align: center; }
.centered .display { margin-left: auto; margin-right: auto; }
.centered .lede { max-width: 58ch; margin: 22px auto 0; }

/* Two-column section header: heading left, one line of copy right. */
.head-split {
  display: grid;
  gap: 20px;
  align-items: end;
  margin-bottom: 72px;
}
@media (min-width: 900px) { .head-split { grid-template-columns: 1fr 1fr; gap: 60px; } }
.head-split .lede { font-size: 1.375rem; font-weight: 300; line-height: 1.45; max-width: 26ch; }

/* -------------------------------------------------------------- button */

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  color: inherit;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn-outline svg { width: 16px; height: 16px; flex: none; transition: transform 0.25s ease; }
.btn-outline:hover svg { transform: translateX(4px); }
.btn-outline:focus-visible { outline: 2px solid var(--green-accent); outline-offset: 3px; }

.band--dark .btn-outline:hover  { background: var(--text-white); color: var(--c-ink); }
.band--light .btn-outline:hover,
.band--grey .btn-outline:hover  { background: var(--c-ink); color: var(--c-light); }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 140px 32px 100px;
  background: var(--bg-darker);
  color: var(--text-white);
  overflow: hidden;
}

/* The team photograph, darkened enough for white type to sit on it. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/static/images/team/team-dinner.jpg") center 45% / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(9, 23, 20, 0.62), rgba(9, 23, 20, 0.5) 55%, var(--bg-dark));
}

.hero-inner { max-width: 900px; }

.hero .display { margin-bottom: 30px; }
.hero .lede { max-width: 46ch; margin: 0 auto 40px; color: var(--text-muted); }

/* ------------------------------------------------------------ openings */

.acc { border-top: 1px solid var(--c-rule-light); }

.acc details { border-bottom: 1px solid var(--c-rule-light); }

.acc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 30px 0;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:focus-visible { outline: 2px solid var(--green-accent); outline-offset: 4px; }

.acc summary svg {
  width: 14px; height: 14px; flex: none;
  transition: transform 0.3s ease;
}
.acc details[open] summary svg { transform: rotate(180deg); }

.acc-rows { padding-bottom: 14px; }

.acc-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--c-rule-light);
  font-size: 1.0625rem;
}
@media (min-width: 760px) {
  .acc-row { grid-template-columns: 1.6fr 0.8fr auto; gap: 24px; align-items: center; }
}

.acc-row .yrs { color: var(--c-ink-soft); }

.acc-row .apply {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-ink);
  text-decoration: none;
  justify-self: start;
}
@media (min-width: 760px) { .acc-row .apply { justify-self: end; } }
.acc-row .apply svg { width: 16px; height: 16px; transition: transform 0.25s ease; }
.acc-row .apply:hover svg { transform: translateX(4px); }

/* The role brief, revealed under its row. */
.acc-row details { grid-column: 1 / -1; }
.acc-row details summary {
  padding: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-ink-dim);
  display: inline-flex;
  gap: 8px;
}
.brief {
  display: grid;
  gap: 28px;
  padding: 22px 0 10px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--c-ink-soft);
}
@media (min-width: 760px) { .brief { grid-template-columns: 1fr 1fr; gap: 48px; } }
.brief h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink);
  margin: 0 0 12px;
}
.brief ul { margin: 0; padding-left: 1.1rem; }
.brief li { margin-bottom: 7px; }

.openings-cta { text-align: center; margin-top: 64px; }

/* -------------------------------------------------------------- values */

.values {
  display: grid;
  gap: 60px;
}
@media (min-width: 900px) { .values { grid-template-columns: 1fr 1fr; gap: 80px; } }

.values-left .display { margin-bottom: 28px; max-width: 12ch; }
.values-left .lede { max-width: 34ch; }

/* The asterisk. The reference's mark, rendered here as a thin six-armed
   glyph in the accent colour. */
.asterisk {
  display: block;
  width: 88px;
  height: 88px;
  margin-top: 64px;
  color: var(--green-accent);
}

.values-right {
  border-left: 1px solid var(--c-rule-dark);
  padding-left: 40px;
  display: grid;
  gap: 64px;
  counter-reset: v;
}

.value { position: relative; }
.value::before {
  counter-increment: v;
  content: counter(v, decimal-leading-zero);
  display: block;
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}
.value h3 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 18px;
}
.value p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 44ch;
  margin: 0;
}

/* ------------------------------------------------------------- gallery */

/* The reference grid, exactly: four columns; a tall tile spanning two rows
   in column two, a wide tile spanning two columns in the first row. */
.life-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  margin-top: 64px;
}
@media (min-width: 900px) {
  .life-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; }
  .life-tile:nth-child(2) { grid-row: span 2; }
  .life-tile:nth-child(3) { grid-column: span 2; }
}

.life-tile {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #DCE0D9, #C9CFC5);
}
.life-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.life-tile .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--c-ink-dim);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.life-tile .more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 30, 27, 0.55);
  color: var(--text-white);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.life-tile .more span { display: grid; place-items: center; gap: 10px; }

.life-note {
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--c-ink-dim);
  text-align: center;
}

/* --------------------------------------------------------------- perks */

.perks {
  display: grid;
  gap: 0 48px;
}
@media (min-width: 760px) { .perks { grid-template-columns: repeat(3, 1fr); } }

.perk {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--c-rule-light);
}

.perk-icon {
  width: 40px; height: 40px;
  margin-bottom: 26px;
  color: var(--c-ink);
}
.perk-icon svg { width: 100%; height: 100%; }

.perk h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin: 0 0 14px;
}
.perk p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--c-ink-soft);
  margin: 0;
}

/* ------------------------------------------------------------ like-it */

.like {
  display: grid;
  gap: 60px;
  align-items: center;
}
@media (min-width: 900px) { .like { grid-template-columns: 1.1fr 0.9fr; gap: 80px; } }

.like .display { margin-bottom: 28px; max-width: 12ch; }
.like .lede { max-width: 44ch; margin-bottom: 40px; }

/* The portrait and its ring. The ring overlaps the portrait's lower-right
   corner, spins slowly, and stops under reduced motion. */
.portrait-wrap {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
}
.portrait img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* The slider. Each slide is a frame that fills itself with a blurred,
   enlarged copy of its own photograph, then lays the sharp photograph on
   top uncropped. The frame is always full, nothing is cut off, and the
   photographs can be any shape. */
.slider { overflow: hidden; position: relative; }
.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.slide::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: var(--bg) center / cover no-repeat;
  filter: blur(28px) saturate(0.9) brightness(0.72);
  transform: scale(1.1);
}
.slide img {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.slider-dots {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}
.slider-dots button {
  width: 28px;
  height: 3px;
  padding: 0;
  border: 0;
  background: rgba(240, 240, 240, 0.4);
  cursor: pointer;
  transition: background 0.25s ease;
}
.slider-dots button.is-on { background: var(--green-accent); }
.slider-dots button:focus-visible { outline: 2px solid var(--green-accent); outline-offset: 3px; }

.portrait {
  aspect-ratio: 3 / 4;
  background: var(--bg-dark);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ring {
  position: absolute;
  right: -56px;
  bottom: -56px;
  width: 200px;
  height: 200px;
}
.ring svg { width: 100%; height: 100%; animation: spin 24s linear infinite; transform-origin: 50% 50%; }
.ring text {
  fill: var(--c-ink-dim);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ insights */

.posts {
  display: grid;
  gap: 40px 32px;
  margin-top: 56px;
}
@media (min-width: 760px) { .posts { grid-template-columns: repeat(3, 1fr); } }

.post {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-top: 20px;
  border-top: 1px solid var(--c-rule-light);
}
.post .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--c-ink-dim);
  margin-bottom: 14px;
}
.post h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  margin: 0;
  transition: color 0.2s ease;
}
.post:hover h3 { color: var(--c-ink-soft); }

.insights-cta { text-align: center; margin-top: 56px; }

/* ------------------------------------------------------------ closing */

.closing {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 800px) { .closing { grid-template-columns: 1fr auto; gap: 60px; } }
.closing .sub {
  margin-top: 14px;
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  .ring svg { animation: none; }
  .slider-track { transition: none; }
  .btn-outline, .btn-outline svg, .acc summary svg, .acc-row .apply svg { transition: none; }
}
