/* careers on a phone: the opening and the founders section */
@media (max-width: 900px) {
  .careers-jump { align-self: stretch; justify-content: center; min-height: 52px; margin: 0 1vw; font-size: 16px; }

  /* the ask at poster size, filling its screen from the foot up under the figure the film dims behind it; the two claims
     under the rule are set as claims, one a line */
  .careers-lead { min-height: 100svh; padding: 96px var(--gutter) max(64px, 10svh); }
  .careers-lead h2 { max-width: none; margin-bottom: clamp(28px, 4.4svh, 48px); font-size: clamp(46px, 15.2vw, 112px); line-height: .92; letter-spacing: -.048em; text-wrap: balance; }
  .careers-lead .statement-rule { margin-bottom: clamp(18px, 2.8svh, 30px); }
  .careers-lead .statement-body { font-size: clamp(30px, 9.2vw, 64px); line-height: 1.02; letter-spacing: -.034em; text-wrap: balance; }

  /* the founders: the claim at poster size, then each group as a stack. the group's name holds at the top of the screen;
     each feature holds under it and the next slides over it (careers.js lets the one going under recede). the cards are
     equal rows, the tallest one's height, so a card always covers the one before it whole */
  .careers-life { --foot: clamp(36px, 5svh, 52px); display: block; min-height: 0; padding: clamp(96px, 14svh, 140px) 0 16px; }
  .careers-life-head { margin: 0 var(--gutter) clamp(44px, 7svh, 80px); font-size: clamp(44px, 14.4vw, 104px); line-height: .92; letter-spacing: -.046em; }
  .careers-life-group { --stick: 60px; display: block; }
  .careers-life-group + .careers-life-group { margin-top: clamp(40px, 6svh, 72px); }
  .careers-life-group h3 { display: flex; align-items: flex-end; height: var(--stick); margin: 0; padding: 0 var(--gutter) 14px; background: var(--ink); font-size: 16px; line-height: 1.2; color: var(--fg-dim); }
  .careers-life-group ul { display: grid; grid-auto-rows: 1fr; }
  .careers-life-group li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: clamp(340px, 48svh, 520px); padding: 24px var(--gutter) var(--foot); border-top: 0; background: var(--ink); transform-origin: 50% 0; }
  .careers-life-group li::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: rgb(243 241 236 / .34); transform-origin: 0 0; }
  /* a soft lead edge over the card before, lit by careers.js once this card starts to slide over it: the words it reaches
     fade into it instead of being cut by the rule */
  .careers-life-group li::after { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: clamp(72px, 11svh, 112px); background: linear-gradient(rgb(8 9 11 / 0), var(--ink)); opacity: var(--edge, 0); pointer-events: none; }
  .careers-life-group h4 { font-size: clamp(34px, 10.6vw, 64px); line-height: .98; letter-spacing: -.036em; text-wrap: balance; }
  .careers-life-group li > p { max-width: 36rem; margin-top: 16px; font-size: clamp(17px, 4.5vw, 21px); line-height: 1.42; }
  /* the quote is the card's foot, in the claim's weight, its opening mark hung in the margin so the words keep the edge */
  .careers-life-quote { max-width: 36rem; margin-top: auto; padding-top: 32px; font-size: clamp(22px, 6.3vw, 34px); line-height: 1.2; letter-spacing: -.018em; font-weight: 500; text-wrap: pretty; }
  .careers-life-quote p { display: block; text-indent: -.4em; }
  .careers-life-quote footer { display: block; margin: 12px 0 0; font-size: 16px; line-height: 1.3; letter-spacing: 0; font-weight: 400; }
}

/* the stack needs a screen taller than a card and its group's name; a phone on its side reads the features as a list,
   and so does a group careers.js finds too tall for the screen (.is-flat) */
@media (max-width: 900px) and (min-height: 600px) {
  .careers-life-group h3 { position: sticky; top: 0; z-index: 3; }
  .careers-life-group ul:not(.is-flat) > li { position: sticky; top: var(--stick); }
}

/* a card lands as its own moment: its rule draws, its title's words rise, then its line and its quote */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .careers-life-group ul[data-cascade] > li { opacity: 1; animation: none; }
  .careers-life-group li::before { transform: scaleX(0); transition: transform calc(1.2s * var(--pace, 1)) var(--ease) calc(var(--wait, 0ms) * var(--pace, 1)); }
  .careers-life-group h4 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
  .careers-life-group h4 .w > span { display: block; transform: translateY(112%); transition: transform calc(1.1s * var(--pace, 1)) var(--ease) calc((var(--wait, 0ms) + 120ms + var(--i) * 45ms) * var(--pace, 1)); }
  .careers-life-group li > p, .careers-life-group .careers-life-quote { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity calc(.9s * var(--pace, 1)) var(--ease) var(--at), transform calc(1.1s * var(--pace, 1)) var(--ease) var(--at); }
  .careers-life-group li > p { --at: calc((var(--wait, 0ms) + 320ms) * var(--pace, 1)); }
  .careers-life-group .careers-life-quote { --at: calc((var(--wait, 0ms) + 520ms) * var(--pace, 1)); }
  .careers-life-group li.is-in::before, .careers-life-group li.is-in h4 .w > span, .careers-life-group li.is-in > p, .careers-life-group li.is-in .careers-life-quote { opacity: 1; transform: none; }
}
