/* Careers page: builds on the shared dark layout in about-apple.css and the consistency rules in home-apple.css.
   Plain, typographic sections; the only image is the founders' cartoon heads. */
.cr-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(130px, 14vw, 190px) var(--ap-gutter) 0;
  text-align: center;
}

.cr-hero h1 {
  color: var(--ap-text);
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1.02;
}

.cr-hero h1 span {
  color: var(--ap-grey);
}

.cr-hero .ap-lead {
  max-width: 720px;
  margin: 22px 0 34px;
}

.cr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 26px;
}

.cr-button {
  display: inline-block;
  padding: 15px 28px;
  color: #020306;
  font: 600 16px/1 var(--ap-font);
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  background: #f5f5f7;
  cursor: pointer;
  transition: background .3s ease;
}

.cr-button:hover {
  background: #fff;
}

.cr-link {
  color: var(--ap-link);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

.cr-link:hover {
  text-decoration: underline;
}

.cr-button:focus-visible,
.cr-link:focus-visible {
  outline: 3px solid var(--ap-link);
  outline-offset: 3px;
  border-radius: 999px;
}

/* How we work: four plain points */
.cr-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) clamp(32px, 5vw, 72px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cr-points li {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.cr-points span {
  color: var(--ap-grey);
  font-size: 14px;
  font-weight: 500;
}

.cr-points h3 {
  margin: 14px 0 10px;
  color: var(--ap-text);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}

.cr-points p {
  color: var(--ap-grey);
  font-size: 17px;
  line-height: 1.47;
}

/* Founders strip with the cartoon heads cropped from the standing sprite sheets (2079px wide). */
.cr-founders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: clamp(48px, 6vw, 72px);
  padding: 22px 0;
  border-block: 1px solid rgba(255, 255, 255, .2);
}

.cr-founders__faces {
  display: flex;
}

.cr-face {
  --s: 56px;
  width: var(--s);
  height: var(--s);
  border: 3px solid #020306;
  border-radius: 50%;
  background-color: #2c2c30;
  background-repeat: no-repeat;
}

.cr-face + .cr-face {
  margin-left: -14px;
}

.cr-face--umair {
  background-image: url("runner-umair-smooth-idle-sheet.png");
  background-size: calc(var(--s) * 2079 / 112) auto;
  background-position: calc(var(--s) * -55 / 112) calc(var(--s) * -194 / 112);
}

.cr-face--abdul {
  background-image: url("runner-abdul-smooth-idle-sheet.png");
  background-size: calc(var(--s) * 2079 / 104) auto;
  background-position: calc(var(--s) * -44 / 104) calc(var(--s) * -219 / 104);
}

.cr-founders p {
  flex: 1;
  min-width: 220px;
  color: var(--ap-grey);
  font-size: 17px;
}

/* Please include */
.cr-include {
  max-width: 680px;
  text-align: left;
}

.cr-include__title {
  margin-bottom: 14px !important;
  color: var(--ap-text);
  font-size: 17px;
  font-weight: 600;
}

.cr-include ol {
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  counter-reset: include;
  text-align: left;
}

.cr-include li {
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 16px 0;
  color: var(--ap-grey-light);
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  counter-increment: include;
}

.cr-include li:first-child {
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.cr-include li::before {
  content: counter(include, decimal-leading-zero);
  color: var(--ap-grey);
  font-size: 14px;
}

.cr-start .cr-actions {
  justify-content: flex-start;
  margin-top: 4px;
}

@media (max-width: 834px) {
  .cr-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .cr-hero {
    padding-top: 130px;
  }
}

/* Sections below the opening title start on the left edge of the column. */
.careers-page .ap-head {
  margin-inline: 0;
  text-align: left;
}

.careers-page .ap-head .ap-sub,
.careers-page .ap-banner .ap-sub {
  margin-inline: 0 !important;
}

/* Show us what you make: one small animated tile per craft, in the Verve palette.
   Animations only run once the row has scrolled into view (about-apple.js adds .is-in). */
.cr-crafts {
  --verve: linear-gradient(90deg, #ff7a59, #ff3d8b 35%, #a259ff 65%, #2997ff);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 clamp(48px, 6vw, 72px);
  padding: 0;
  list-style: none;
}

.cr-craft > span {
  display: block;
  margin-top: 14px;
  color: var(--ap-text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.cr-craft__art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 20px;
  background: var(--ap-card);
}

.ap-animate .cr-crafts:not(.is-in) .cr-craft__art *,
.ap-animate .cr-crafts:not(.is-in) .cr-craft__art *::before {
  animation-play-state: paused;
}

/* Designers: a pen-tool curve draws itself between its handles */
.cr-art-design svg {
  width: 78%;
  overflow: visible;
}

.cr-art-design__handle {
  fill: none;
  stroke: rgba(255, 255, 255, .25);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.cr-art-design__curve {
  fill: none;
  stroke: #ff3d8b;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 220;
  animation: cr-draw 4s cubic-bezier(.22, 1, .36, 1) infinite;
}

.cr-art-design circle {
  fill: #fff;
}

.cr-art-design .cr-art-design__knob {
  fill: #a259ff;
}

@keyframes cr-draw {
  0%, 8% { stroke-dashoffset: 220; }
  50%, 88% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -220; }
}

/* Developers: lines of code type out */
.cr-art-code {
  place-items: start;
  align-content: center;
  gap: 10px;
  padding: 0 14%;
}

.cr-art-code i {
  display: block;
  width: var(--w);
  height: 9px;
  margin-left: var(--x, 0);
  border-radius: 5px;
  background: var(--verve);
  background-size: 260px 100%;
  transform-origin: left;
  animation: cr-type 5s steps(8) infinite;
  animation-delay: var(--d);
}

@keyframes cr-type {
  0%, 6% { transform: scaleX(0); }
  30%, 90% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* Writers: a line of copy appears behind a blinking caret */
.cr-art-write {
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding: 0 12%;
}

.cr-art-write b {
  color: var(--ap-text);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}

.cr-art-write__line {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ap-grey-light);
  font-size: clamp(13px, 1.2vw, 15px);
  white-space: nowrap;
  border-right: 2px solid #a259ff;
  animation: cr-write 5s steps(24) infinite, cr-caret .8s step-end infinite;
}

@keyframes cr-write {
  0%, 6% { width: 0; }
  55%, 90% { width: 100%; }
  100% { width: 0; }
}

@keyframes cr-caret {
  50% { border-color: transparent; }
}

/* Video makers: a playhead runs across two tracks of clips */
.cr-art-video {
  align-content: center;
  gap: 8px;
  padding: 0 10%;
}

.cr-art-video__track {
  display: flex;
  gap: 4px;
  width: 100%;
}

.cr-art-video__track i {
  width: var(--w);
  height: 22px;
  border-radius: 5px;
  background: var(--c);
  opacity: .85;
}

.cr-art-video__head {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 10%;
  width: 2px;
  background: #fff;
  animation: cr-play 4s linear infinite;
}

.cr-art-video__head::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -5px;
  border: 6px solid transparent;
  border-top-color: #fff;
}

@keyframes cr-play {
  from { left: 10%; }
  to { left: 90%; }
}

/* Marketers: results bars climb */
.cr-art-market {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 16% 18% 14%;
}

.cr-art-market i {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #ff3d8b, #a259ff);
  transform-origin: bottom;
  animation: cr-grow 4.5s cubic-bezier(.22, 1, .36, 1) infinite;
  animation-delay: var(--d);
}

@keyframes cr-grow {
  0%, 6% { transform: scaleY(.08); }
  40%, 88% { transform: scaleY(1); }
  100% { transform: scaleY(.08); }
}

/* Strategists: scattered notes get put in order */
.cr-art-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cr-art-plan i {
  display: grid;
  place-items: center;
  width: 25%;
  aspect-ratio: 1;
  color: #fff;
  font-size: clamp(13px, 1.2vw, 15px);
  font-style: normal;
  font-weight: 600;
  border-radius: 8px;
  background: var(--c);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
  animation: cr-order 5s cubic-bezier(.22, 1, .36, 1) infinite;
}

@keyframes cr-order {
  0%, 8% { transform: translate(calc(var(--fx) * var(--k, 1)), calc(var(--fy) * var(--k, 1))) rotate(var(--r)); }
  40%, 90% { transform: none; }
  100% { transform: translate(calc(var(--fx) * var(--k, 1)), calc(var(--fy) * var(--k, 1))) rotate(var(--r)); }
}

@media (max-width: 834px) {
  .cr-crafts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .cr-crafts {
    gap: 12px;
  }

  .cr-craft__art {
    border-radius: 14px;
  }

  .cr-craft > span {
    margin-top: 10px;
    font-size: 15px;
  }

  .cr-art-write__line {
    font-size: 11px;
  }

  .cr-art-plan {
    gap: 6px;
  }

  .cr-art-plan i {
    --k: .45;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cr-crafts .cr-craft__art *,
  .cr-crafts .cr-craft__art *::before {
    animation: none !important;
  }

  .cr-art-design__curve { stroke-dashoffset: 0; }
  .cr-art-write__line { width: 100%; }
}

/* Titles alternate: lists and grids start on the left; the short statement and the
   closing call to action sit in the centre. */
.careers-page .cr-roles .ap-head,
.careers-page .cr-start .ap-head {
  margin-inline: auto;
  text-align: center;
}

.careers-page .cr-roles .ap-head .ap-sub,
.careers-page .cr-start .ap-head .ap-sub {
  margin-inline: auto !important;
}

.careers-page .cr-start .cr-actions {
  justify-content: center;
}
