/* Home page below the hero: Apple-inspired dark layout. Builds on about-apple.css. */
.home-apple .homepage-content {
  background: var(--ap-bg);
}

/* Founders intro */
.hp-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hp-intro__title {
  max-width: 1000px;
  color: var(--ap-text);
  font-size: clamp(40px, 6.4vw, 84px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.hp-intro__copy {
  max-width: 760px;
  margin: clamp(22px, 2.6vw, 34px) 0 30px !important;
  color: var(--ap-grey);
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 500;
  line-height: 1.4;
}

/* Why Vervestac: each reason is drawn as its own small idea, in the style of the about page tiles.
   The finished state is the default; the "before" state only applies while about-apple.js is
   animating and the tile has not scrolled into view yet, so reduced motion and no-JS see the result. */
.hp-why-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) 20px;
}

.hp-why-tile__media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: var(--ap-radius);
  background: var(--ap-card);
}

.hp-why-tile .ap-caption {
  max-width: 460px;
}

.hp-why-tile * {
  transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}

/* 1. Scattered suppliers snap into one stack */
.hp-merge__card {
  position: absolute;
  top: 44%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 11px 18px 11px 12px;
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  transform: translate(-50%, calc(-50% + (var(--i) - 2) * 40px));
  transition: transform 1.1s calc(var(--i) * .07s + .2s), opacity .6s ease;
}

.hp-merge__card::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--c);
}

.hp-merge__label {
  position: absolute;
  bottom: 9%;
  left: 50%;
  color: var(--ap-text);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: opacity .6s ease 1.2s, transform .8s 1.2s;
}

.ap-animate .hp-why-tile:not(.is-in) .hp-merge__card {
  opacity: .7;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r));
}

.ap-animate .hp-why-tile:not(.is-in) .hp-merge__label {
  opacity: 0;
  transform: translate(-50%, 10px);
}

/* 2. The real questions come first; "how it looks" gets struck out */
.hp-ask {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 clamp(28px, 4vw, 48px);
}

.hp-ask p {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.15;
}

.hp-ask__q {
  color: var(--ap-text);
  transition: opacity .7s ease calc(var(--i) * .25s + .2s), transform .8s calc(var(--i) * .25s + .2s);
}

.hp-ask__not {
  margin-top: 14px !important;
  color: rgba(255, 255, 255, .32);
}

.hp-ask__not span {
  position: relative;
}

.hp-ask__not span::after {
  content: "";
  position: absolute;
  top: 54%;
  left: -4%;
  width: 108%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff7a59, #ff3d8b, #a259ff, #2997ff);
  transform-origin: left;
  transition: transform .7s 1.2s;
}

.ap-animate .hp-why-tile:not(.is-in) .hp-ask__q {
  opacity: 0;
  transform: translateY(10px);
}

.ap-animate .hp-why-tile:not(.is-in) .hp-ask__not span::after {
  transform: scaleX(0);
}

/* 3. The same two founders on the first call and on the work */
.hp-same {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hp-same__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(78%, 340px);
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.hp-same__row small {
  color: var(--ap-grey);
  font-size: 15px;
  font-weight: 500;
}

.hp-same__faces {
  display: flex;
}

/* Cartoon heads cropped from the standing sprite sheets (2079px wide). */
.hp-same__face {
  --s: 46px;
  width: var(--s);
  height: var(--s);
  border: 3px solid var(--ap-card);
  border-radius: 50%;
  background-color: #3a3a40;
  background-repeat: no-repeat;
  transition: opacity .6s ease, filter .6s ease, transform .7s;
}

.hp-same__face + .hp-same__face {
  margin-left: -12px;
}

.hp-same__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);
}

.hp-same__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);
}

.hp-same__row--work .hp-same__face {
  transition-delay: .7s;
}

.hp-same__row--work .hp-same__face + .hp-same__face {
  transition-delay: .85s;
}

.hp-same__eq {
  color: var(--ap-text);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  transition: opacity .5s ease .5s;
}

.ap-animate .hp-why-tile:not(.is-in) .hp-same__row--work .hp-same__face {
  opacity: .25;
  filter: grayscale(1) blur(2px);
  transform: scale(.85);
}

.ap-animate .hp-why-tile:not(.is-in) .hp-same__eq {
  opacity: 0;
}

/* 4. A small tracking panel fills in */
.hp-track {
  display: grid;
  place-items: center;
}

.hp-track__panel {
  width: min(82%, 380px);
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.hp-track__title {
  margin: 0 0 16px !important;
  color: var(--ap-text);
  font-size: 15px;
  font-weight: 600;
}

.hp-track__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hp-track__row span {
  color: var(--ap-grey);
  font-size: 13px;
}

.hp-track__row i {
  display: block;
  width: var(--w);
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #ff7a59, #ff3d8b, #a259ff, #2997ff);
  background-size: 380px 100%;
  transform-origin: left;
  transition: transform 1s calc(var(--i) * .2s + .2s);
}

.hp-track__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0 !important;
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 600;
  transition: opacity .5s ease 1.1s;
}

.hp-track__status::before {
  content: "";
  width: 10px;
  height: 5px;
  margin-top: -3px;
  border-bottom: 2px solid #30d158;
  border-left: 2px solid #30d158;
  transform: rotate(-45deg);
}

.ap-animate .hp-why-tile:not(.is-in) .hp-track__row i {
  transform: scaleX(0);
}

.ap-animate .hp-why-tile:not(.is-in) .hp-track__status {
  opacity: 0;
}

@media (max-width: 834px) {
  .hp-why-tiles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hp-merge__card {
    min-width: 140px;
    padding: 8px 14px 8px 10px;
    font-size: 15px;
    transform: translate(-50%, calc(-50% + (var(--i) - 2) * 34px));
  }

  .hp-merge__card::before {
    width: 16px;
    height: 16px;
  }
}

/* Who we work with */
.hp-who {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  margin-top: 20px;
  padding: clamp(32px, 4vw, 56px);
  border-radius: var(--ap-radius);
  background:
    radial-gradient(60% 120% at 0% 100%, rgba(41, 151, 255, .18), transparent 70%),
    radial-gradient(50% 100% at 100% 0%, rgba(191, 90, 242, .16), transparent 70%),
    var(--ap-card);
}

.hp-who__text {
  color: var(--ap-grey);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 500;
  line-height: 1.4;
}

.hp-who__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-who__tags li {
  padding: 10px 16px;
  color: var(--ap-text);
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

/* Experience figures */
.hp-stats {
  margin-top: clamp(80px, 9vw, 130px);
  text-align: center;
}

.hp-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(28px, 3vw, 40px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.hp-stats__grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(32px, 4vw, 48px) 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.hp-stats__grid li:not(:nth-child(3n + 1)) {
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.hp-stats__grid strong {
  font-size: clamp(44px, 5.6vw, 76px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 30%, #9a9aa3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hp-stats__grid span {
  max-width: 220px;
  color: var(--ap-grey);
  font-size: 15px;
  line-height: 1.4;
}

.hp-stats__note {
  max-width: 760px;
  margin: clamp(32px, 4vw, 48px) auto 0 !important;
  color: var(--ap-grey);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
  line-height: 1.45;
}

.hp-stats__fine {
  margin-top: 14px !important;
  color: #6e6e73;
  font-size: 13px;
}

.hp-why__cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(44px, 5vw, 64px);
}

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

  .hp-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-stats__grid li:not(:nth-child(3n + 1)) {
    border-left: 0;
  }

  .hp-stats__grid li:nth-child(even) {
    border-left: 1px solid rgba(255, 255, 255, .12);
  }
}


/* Featured project: a folder that opens as it scrolls into view and hands out the project cover.
   With no class the folder shows open, so the cover is visible even without JavaScript. */
.hp-folder {
  --folder-w: min(440px, 72%);
  --folder-ease: cubic-bezier(.22, 1, .36, 1);
  position: relative;
  max-width: 1100px;
  height: clamp(300px, 54vw, 640px);
  margin: 0 auto;
  perspective: 1400px;
}

.hp-folder__back,
.hp-folder__front {
  position: absolute;
  bottom: 4%;
  left: 50%;
  width: var(--folder-w);
  border-radius: 26px;
  transition: transform .9s var(--folder-ease), opacity .6s ease;
}

.hp-folder__back {
  aspect-ratio: 1 / .72;
  background: linear-gradient(160deg, #5f8fbe, #2f5781);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: translateX(-50%) translateY(30%) scale(.92);
  opacity: 0;
}

.hp-folder__back::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 0;
  width: 42%;
  height: 40px;
  border-radius: 22px 22px 0 0;
  background: #5f8fbe;
}

.hp-folder__front {
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  aspect-ratio: 1 / .56;
  padding: 26px 28px;
  color: #fff;
  background: linear-gradient(170deg, rgba(150, 194, 236, .96), rgba(70, 118, 168, .97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 30px 60px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-origin: 50% 100%;
  transform: translateX(-50%) translateY(40%) rotateX(62deg);
  opacity: 0;
}

.hp-folder__front strong {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -.01em;
}

.hp-folder__front small {
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-weight: 600;
}

.hp-folder__cover {
  position: absolute;
  z-index: 2;
  bottom: 4%;
  left: 50%;
  width: min(1000px, 94%);
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-radius: var(--ap-radius);
  background: var(--ap-card);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6);
  transform-origin: 50% 100%;
  transform: translateX(-50%);
  transition: transform 1.1s var(--folder-ease) .2s, border-radius 1.1s var(--folder-ease) .2s;
}

.hp-folder__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-folder__badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .5s ease .9s;
}

/* Closed: the cover sits small inside the folder */
.hp-folder.is-closed .hp-folder__back {
  opacity: 1;
  transform: translateX(-50%);
}

.hp-folder.is-closed .hp-folder__front {
  opacity: 1;
  transform: translateX(-50%);
}

.hp-folder.is-closed .hp-folder__cover {
  border-radius: 40px;
  transform: translateX(-50%) translateY(-9%) scale(.4);
  transition-delay: 0s;
}

.hp-folder.is-closed .hp-folder__badge {
  opacity: 0;
  transition-delay: 0s;
}

/* Opening: the front flap tips forward first, then the cover rises and grows */
.hp-folder.is-open .hp-folder__front {
  transition: transform .8s var(--folder-ease), opacity .5s ease .35s;
}

.hp-folder.is-open .hp-folder__back {
  transition: transform .9s var(--folder-ease) .3s, opacity .6s ease .45s;
}

.hp-feature__lead {
  max-width: 720px;
  margin: clamp(36px, 4vw, 56px) auto 0 !important;
  color: var(--ap-grey);
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 834px) {
  .hp-folder {
    --folder-w: min(300px, 74%);
    height: clamp(230px, 62vw, 460px);
  }

  .hp-folder__front {
    padding: 18px 20px;
    border-radius: 20px;
  }

  .hp-folder__back {
    border-radius: 20px;
  }

  .hp-folder__back::before {
    top: -16px;
    height: 30px;
  }

  .hp-folder__badge {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-folder__back,
  .hp-folder__front,
  .hp-folder__cover,
  .hp-folder__badge {
    transition: none !important;
  }
}

/* FAQ accordion: centred title, divider rows, plus that turns into a minus */
.hp-faq__list {
  max-width: 880px;
  margin: 0 auto;
}

.hp-faq__head {
  margin-bottom: clamp(48px, 6vw, 72px);
  text-align: center;
}

.hp-faq__head h2 {
  max-width: 1000px;
  margin: 0 auto;
  color: var(--ap-text);
  font-size: clamp(48px, 7.4vw, 100px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: .95;
}

.hp-faq__head p {
  margin-top: 22px;
  color: var(--ap-grey);
  font-size: clamp(15px, 1.3vw, 18px);
}

.hp-faq__item {
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.hp-faq__item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.hp-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  color: var(--ap-text);
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 500;
  letter-spacing: -.01em;
  list-style: none;
  cursor: pointer;
}

.hp-faq__item summary::-webkit-details-marker {
  display: none;
}

.hp-faq__item summary:focus-visible {
  outline: 3px solid var(--ap-link);
  outline-offset: 4px;
  border-radius: 4px;
}

.hp-faq__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.hp-faq__icon::before,
.hp-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.6px;
  border-radius: 1px;
  background: var(--ap-text);
  transform: translateY(-50%);
  transition: transform .35s var(--ap-ease), opacity .35s ease;
}

.hp-faq__icon::after {
  transform: translateY(-50%) rotate(90deg);
}

.hp-faq__item[open] .hp-faq__icon::after {
  opacity: 0;
  transform: translateY(-50%) rotate(0deg);
}

.hp-faq__item p {
  max-width: 820px;
  padding: 0 48px 32px 0;
  color: var(--ap-grey-light);
  font-size: 16px;
  line-height: 1.75;
  animation: hp-faq-open .4s var(--ap-ease);
}

@keyframes hp-faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .hp-faq__item summary {
    padding: 22px 0;
  }

  .hp-faq__item p {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-faq__icon::before,
  .hp-faq__icon::after {
    transition: none;
  }

  .hp-faq__item p {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 834px) {
}

@media (max-width: 600px) {
  .hp-intro__title {
    font-size: clamp(36px, 10.5vw, 48px);
  }
}


/* ==========================================================================
   Consistency rules for the home-style pages (home, contact, careers).
   Every section follows the about page: a 1260px
   content width, 150px of space between sections, one 72px title style,
   centred headers with a 24px grey intro, and the site's single black.
   The about page keeps its own layout.
   ========================================================================== */
.home-apple {
  --ap-bg: #020306;
  --ap-gutter: max(22px, calc((100% - 1260px) / 2));
  --hp-space: clamp(80px, 10vw, 150px);
  --hp-title: clamp(40px, 5.6vw, 72px);
}

/* Spacing: every section adds space above it only, so gaps never double up. */
.home-apple .ap-section {
  padding-top: var(--hp-space);
  padding-bottom: 0;
}

.home-apple .services {
  padding-bottom: 0;
}

.home-apple .homepage-content > section:last-child,
.home-apple main.ap > section:last-child {
  padding-bottom: var(--hp-space);
}

/* One title style for every section. */
.home-apple .ap-head h2,
.home-apple .ap-banner h2,
.home-apple .hp-intro__title,
.home-apple .hp-faq__head h2,
.home-apple .cr-apply h2,
.home-apple #services-title,
.home-apple .testimonials .section-heading h2 {
  color: var(--ap-text);
  font-size: var(--hp-title);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.06;
}

/* Headers are always centred, with the same intro under them. */
.home-apple .ap-head {
  max-width: none;
  margin-inline: auto;
  margin-bottom: clamp(40px, 4.5vw, 64px);
  text-align: center;
}

.home-apple .ap-head .ap-sub,
.home-apple .ap-banner .ap-sub,
.home-apple .hp-intro__copy,
.home-apple .hp-faq__head p,
.home-apple .hp-feature__lead,
.home-apple .services--preview .services__intro,
.home-apple .testimonials .section-heading p {
  max-width: 640px;
  margin-inline: auto !important;
  color: var(--ap-grey);
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 500;
  letter-spacing: .009em;
  line-height: 1.35;
}

.home-apple .ap-head .ap-sub,
.home-apple .hp-faq__head p {
  margin-top: 22px !important;
}

/* Wide elements sit inside the same 1260px column. */
.home-apple .hp-folder,
.home-apple .hp-faq__list,
.home-apple .hp-faq__head h2 {
  max-width: 100%;
}

/* Two headers sit above content that reads from the left (the tiles and the FAQ list),
   so they break from the centred ones: a stacked title on the left, the intro beside it. */
.home-apple .hp-why .ap-head,
.home-apple .hp-faq__head {
  text-align: left;
}

.home-apple .hp-why .ap-head .ap-sub,
.home-apple .hp-faq__head p,
.home-apple .hp-faq__head h2 {
  margin-inline: 0 !important;
}

@media (min-width: 835px) {
  .home-apple .hp-why .ap-head,
  .home-apple .hp-faq__head {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: clamp(40px, 6vw, 88px);
    align-items: end;
  }

  .home-apple .hp-why .ap-head > :not(.ap-sub),
  .home-apple .hp-faq__head h2 {
    grid-column: 1;
  }

  .home-apple .hp-why .ap-head .ap-sub,
  .home-apple .hp-faq__head p {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    margin-top: 0 !important;
    padding-bottom: .4em;
  }

}

.home-apple .hp-why .ap-head h2 {
  max-width: 5.2em;
}

/* The services cards come from home.css with their own width;
   on desktop they join the same 1260px column as the rest of the page.
   The reviews keep their own narrower card. */
@media (min-width: 1081px) {
  .home-apple .services--preview .services__grid {
    width: min(1260px, calc(100% - 44px));
    max-width: none;
    margin-inline: auto;
  }

  .home-apple .services--preview .services__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-apple .services--preview .service-card {
    width: auto;
    max-width: none;
  }
}

/* The services and reviews sections come from home.css with their own spacing;
   they use the same space above as every other section and none below. */
.home-apple .services--preview,
.home-apple .testimonials {
  padding-top: var(--hp-space);
  padding-bottom: 0;
}
