/* ==========================================================================
   Home page sections
   ========================================================================== */

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(64px, min(13vw, 15vh), 200px));
  padding-bottom: clamp(48px, 6vw, 80px);
  background:
    radial-gradient(40% 45% at 0% 45%, rgba(214, 190, 236, 0.55), transparent 70%),
    radial-gradient(35% 40% at 100% 0%, rgba(240, 200, 222, 0.55), transparent 70%),
    radial-gradient(50% 40% at 70% 95%, rgba(250, 228, 214, 0.5), transparent 70%);
}

.hero__inner {
  text-align: center;
}

.hero__kicker {
  margin-top: 0.15em;
  font-family: var(--font-display);
  font-size: var(--fs-kicker);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* The headline is longer than the --fs-hero scale was sized for, so it gets
   its own smaller clamp and may wrap (balanced) on narrow screens. */
.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 6.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* The gradient sits on an inline span and is cloned per line, so a wrapped
   headline fades each line rather than washing out the second one. */
.hero__title > span {
  padding-bottom: 0.12em;
  background:
    linear-gradient(180deg, rgba(244, 244, 245, 0) 18%, rgba(244, 244, 245, 0.4) 58%, rgba(244, 244, 245, 0.85) 92%),
    linear-gradient(90deg, #7a4cff 0%, #5b2bff 22%, #b145d2 52%, #fa3f8c 76%, #ff7a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
}

/* Dark Reader darkens gradient colours, which turns the headline murky on its
   dark page; brighten it back (Dark Reader never changes filters). */
html[data-darkreader-scheme='dark'] .hero__title > span {
  filter: brightness(2) saturate(1.15);
}

.hero__lead {
  max-width: 44em;
  margin: clamp(32px, 4.5vw, 64px) auto 0;
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.45;
  color: var(--c-ink-soft);
}

/* Partner logos: a seamless sideways loop (see marquee.js).
   Each list carries trailing padding equal to the gap, so shifting the track
   by exactly one list width (-50%) lines the copy up with the original. */
.marquee {
  --logo-w: clamp(110px, 11vw, 160px);
  --logo-gap: clamp(32px, 4.5vw, 72px);
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: clamp(48px, 6vw, 88px) auto 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.js .marquee.reveal {
  transition-delay: 0.3s;
}

.marquee__track {
  display: flex;
  width: max-content;
}

.marquee.is-running .marquee__track {
  animation: marquee var(--marquee-duration, 30s) linear infinite;
}

/* Pause while the visitor is looking at (or tabbing through) the logos. */
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
  animation-play-state: paused;
}

.partners {
  display: flex;
  gap: var(--logo-gap);
  padding-right: var(--logo-gap);
  flex: none;
}

.marquee.is-running .partners {
  width: max-content;
}

.partners .media--logo {
  width: var(--logo-w);
  height: 48px;
  flex: none;
}

/* Logos supplied on a solid white background: let the white melt into the hero. */
.partners__opaque > img {
  mix-blend-mode: multiply;
}

/* Dark Reader leaves pictures alone, so the dark partner logos would vanish on
   its dark page: show them in white instead, like the Caplyzer logo. (Trio's
   logo is a purple box, so it swaps to a white-text-only file instead.) */
html[data-darkreader-scheme='dark'] .media--logo > img {
  filter: brightness(0) invert(1);
  mix-blend-mode: normal;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* Without motion (or before JS runs) the logos simply wrap in a centred row. */
.marquee:not(.is-running) .partners {
  flex-wrap: wrap;
  justify-content: center;
  padding-inline: var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  .marquee.is-running .marquee__track {
    animation: none;
  }
}

/* --- Technology ------------------------------------------------------- */

.tech {
  padding-top: var(--section-y);
  background:
    radial-gradient(30% 40% at 30% 75%, rgba(230, 196, 236, 0.45), transparent 70%),
    radial-gradient(30% 40% at 72% 70%, rgba(200, 204, 250, 0.45), transparent 70%);
}

.tech__title-accent {
  padding-bottom: 0.08em;
  background: linear-gradient(90deg, #0fa3b1 0%, #0a9a63 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
}

.tech__grid {
  display: grid;
  /* The product column is capped by viewport height so the section fits one screen. */
  grid-template-columns: minmax(0, 1fr) minmax(220px, min(370px, calc(52vh * 370 / 640))) minmax(0, 1fr);
  grid-template-areas:
    'tl product tr'
    'bl product br';
  --gap: clamp(24px, 3.4vw, 48px);
  column-gap: var(--gap);
  row-gap: 80px;
  align-items: start;
}

.tech__product {
  grid-area: product;
  align-self: center;
  margin-top: -20px;
}

.media--product {
  aspect-ratio: 370 / 640;
  border-radius: var(--radius-xl);
}

.media--product:not(.is-loaded) {
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2)),
    rgba(220, 216, 236, 0.35);
  border: 1px dashed rgba(91, 43, 255, 0.18);
}

/* Icon + text side by side, styled after the "Why Caplyzer" one-pager. */
.feature {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 440px;
  border-radius: var(--radius);
  outline-offset: 8px;
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-purple) 0%, var(--c-violet) 55%, var(--c-blue) 100%);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(91, 43, 255, 0.55);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.feature__icon .icon {
  width: 22px;
  height: 22px;
}

.feature__body {
  min-width: 0;
}

.feature--tl { grid-area: tl; }
.feature--tr { grid-area: tr; }
.feature--bl { grid-area: bl; margin-left: clamp(0px, calc(50vw - 600px), 50px); align-self: end; }
.feature--br { grid-area: br; align-self: end; }

/* Each feature fills its column and keeps a strip on the product side free
   for its leader line, so the line always ends in the column gap, just short
   of the product image, whatever the viewport width. */
.feature {
  --lead: clamp(56px, 7vw, 92px);
}

.feature--tl,
.feature--bl {
  max-width: none;
  padding-right: calc(var(--lead) - var(--gap) + 24px);
}

.feature--tr,
.feature--br {
  max-width: none;
  padding-left: calc(var(--lead) - var(--gap) + 24px);
}

.feature__kicker {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-violet);
}

.feature__title {
  margin-top: 4px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}

.feature__text {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: #4a4a54;
  font-weight: 500;
}

/* Thin leader lines pointing from each feature toward the product.
   They are masks so their colour can animate on hover. */
.feature__connector {
  position: absolute;
  top: 23px;
  width: var(--lead);
  height: 38px;
  background: #9c9ca6;
  -webkit-mask: var(--path) center / 100% 100% no-repeat;
  mask: var(--path) center / 100% 100% no-repeat;
  transition: background 0.4s;
}

.feature--tl .feature__connector {
  right: calc(12px - var(--gap));
  --path: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 38' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M0 1h60l31 36'/%3E%3C/svg%3E");
}

.feature--tr .feature__connector {
  left: calc(12px - var(--gap));
  --path: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 38' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M1 37 32 1h60'/%3E%3C/svg%3E");
}

.feature--bl .feature__connector {
  top: -13px;
  right: calc(12px - var(--gap));
  --path: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 38' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M0 37h60l31-36'/%3E%3C/svg%3E");
}

.feature--br .feature__connector {
  top: -7px;
  left: calc(12px - var(--gap));
  --path: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 38' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M1 1l25 30h50'/%3E%3C/svg%3E");
}

.feature:hover .feature__icon,
.feature:focus-visible .feature__icon {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(91, 43, 255, 0.7), 0 0 0 4px rgba(91, 43, 255, 0.12);
}

.feature:hover .feature__connector,
.feature:focus-visible .feature__connector {
  background: var(--grad-brand);
}

@media (max-width: 1200px) {
  .feature__connector {
    display: none;
  }

  .feature--tl,
  .feature--tr,
  .feature--bl,
  .feature--br {
    max-width: 440px;
    margin-left: 0;
    padding-inline: 0;
  }

  .feature--tr,
  .feature--br {
    justify-self: end;
  }
}

@media (max-width: 860px) {
  .tech__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'product product'
      'tl tr'
      'bl br';
    row-gap: 48px;
  }

  .tech__product {
    justify-self: center;
    width: min(300px, 70%);
    margin: 0 0 16px;
  }

  .feature--tr,
  .feature--br {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .tech__grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'product' 'tl' 'tr' 'bl' 'br';
  }
}

/* --- Compare ------------------------------------------------------------ */

/* Pill, headline, then the intro text across the full width of the section. */
.compare .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'pill' 'title' 'lead';
}

.compare .pill {
  grid-area: pill;
  justify-self: start;
}

.compare__title { grid-area: title; }
.compare__lead { grid-area: lead; }

.compare__title {
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.compare__title-accent {
  padding-bottom: 0.08em;
  background: linear-gradient(90deg, #e75f6a 0%, var(--c-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The deep purple end disappears on Dark Reader's dark page: lighter shades of
   the same gradient there. Dark Reader leaves the colours of a gradient that
   contains a var() as they are (as with the one above), hence the var(--from). */
html[data-darkreader-scheme='dark'] .compare__title-accent {
  background-image: linear-gradient(90deg, #f27a84 var(--from, 0%), #b45cff 100%);
}

.compare__lead {
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.55;
  color: var(--c-ink-soft);
}

.compare__scroller {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}

.compare__scroller:focus-visible {
  outline: 2px solid var(--c-violet);
  outline-offset: 4px;
}

.compare-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  /* Fixed layout: the column widths below hold no matter how long each cell's text is. */
  table-layout: fixed;
  text-align: left;
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  line-height: 1.4;
}

.compare-table th,
.compare-table td {
  padding: clamp(10px, 1.6vh, 20px) clamp(18px, 2.2vw, 32px);
  vertical-align: middle;
}

.compare-table tbody tr {
  border-top: 1px solid var(--c-line);
}

/* Row labels and the Caplyzer column take 22% each; ALK, PEM and AEM share the rest equally. */
.compare-table thead td {
  width: 22%;
}

.compare-table thead th {
  width: calc(56% / 3);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.compare-table tbody th {
  font-weight: 600;
}

.compare-table tbody td {
  color: var(--c-ink-soft);
}

/* The Caplyzer column runs the full height of the table in the brand gradient.
   It is painted once on the table, under the column's 22%, so it runs through
   every row without restarting. */
.compare-table {
  background-image: var(--grad-caplyzer);
  background-position: 100% 0;
  background-size: 22% 100%;
  background-repeat: no-repeat;
}

.compare-table .compare-table__us {
  width: 22%;
  color: #fff;
  font-weight: 500;
}

.compare-table tbody .compare-table__us {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.compare-table__logo {
  display: block;
  height: 24px;
  width: auto;
  max-width: none;
}

.compare__note {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--c-muted);
}

/* --- About -------------------------------------------------------------- */

.about .section-title {
  color: var(--c-dark-ink);
}

/* Two columns: the figures, what they mean and the team photo on the left (two
   thirds); the lab photo with the origin card and Proven Foundation on the right. */
.about__layout {
  --origin-inset: clamp(16px, 2.5vw, 32px);
  /* The folder tab on the team photo and the origin card (see below). */
  --tab-w: 176px;
  --tab-h: 28px;
  --tab-slope: 30px;
  --tab-r: 12px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 48px clamp(24px, 4vw, 56px);
  margin-top: -16px;
}

.about__main,
.about__side {
  display: flex;
  flex-direction: column;
}

.stats {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 32px clamp(28px, 4.5vw, 80px);
}

.stat__value,
.stat__label {
  white-space: nowrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 24px;
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 3.6vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--c-dark-muted);
}

.stats__text {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--c-dark-muted);
}

/* Fills the rest of the left column, so both columns end level. */
.about__team-photo {
  flex: 1;
  min-height: 340px;
  margin-top: clamp(32px, 5vh, 48px);
  border-radius: 14px;
}

/* Out of flow so the image's own height doesn't set the row height. */
.about__team-photo > img {
  position: absolute;
  inset: 0;
  /* The frame is wider than the photo: crop more from the bottom than the top, so the team sits in the middle. */
  object-position: 50% 25%;
}

/*.about__team-photo > img {
  filter: grayscale(1);
  transition: filter 0.8s var(--ease), opacity 0.5s;
}

.about__team:hover .about__team-photo > img {
  filter: grayscale(0);
}*/

/* Under the team photo. */
.about__foundation {
  margin-top: 40px;
}

.about__heading {
  font-size: 1.625rem;
  letter-spacing: -0.01em;
}

.about__text {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.25;
  color: var(--c-dark-muted);
}

/* Lab photo with the origin card laid over its lower edge. The glow is on the
   pair, since the card's mask would cut off a shadow of its own. */
.about__origin {
  filter: drop-shadow(0 26px 34px rgba(122, 76, 255, 0.32));
}

/* Inset to the card's width so photo and card line up. */
.about__origin-photo {
  margin: 0 var(--origin-inset);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.about__origin-photo > img {
  object-position: center 20%;
}

/* Blue card with a folder-style tab, overlapping the lab photo. The tab is part
   of the card itself (the top --tab-h of it), cut out with a mask: the tab, its
   slope, the body's top edge, its rounded top-right corner, and the rest. */
.origin-card {
  --overlap: 32px;
  position: relative;
  z-index: 1;
  margin: calc(-1 * (var(--overlap) + var(--tab-h))) var(--origin-inset) 0;
  padding: calc(16px + var(--tab-h)) 22px 20px;
  border-radius: var(--tab-r) 0 var(--tab-r) var(--tab-r);
  background: var(--grad-origin);
  color: #fff;
  -webkit-mask:
    linear-gradient(#000 0 0) 0 0 / calc(var(--tab-w) - var(--tab-slope)) calc(var(--tab-h) + 1px) no-repeat,
    linear-gradient(to top right, #000 50%, transparent calc(50% + 0.5px)) calc(var(--tab-w) - var(--tab-slope)) 0 / var(--tab-slope) calc(var(--tab-h) + 1px) no-repeat,
    linear-gradient(#000 0 0) 0 var(--tab-h) / calc(100% - var(--tab-r)) calc(var(--tab-r) + 1px) no-repeat,
    radial-gradient(circle at 0 100%, #000 calc(var(--tab-r) - 0.5px), transparent var(--tab-r)) 100% var(--tab-h) / var(--tab-r) var(--tab-r) no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--tab-h) + var(--tab-r)) / 100% 100% no-repeat;
  mask:
    linear-gradient(#000 0 0) 0 0 / calc(var(--tab-w) - var(--tab-slope)) calc(var(--tab-h) + 1px) no-repeat,
    linear-gradient(to top right, #000 50%, transparent calc(50% + 0.5px)) calc(var(--tab-w) - var(--tab-slope)) 0 / var(--tab-slope) calc(var(--tab-h) + 1px) no-repeat,
    linear-gradient(#000 0 0) 0 var(--tab-h) / calc(100% - var(--tab-r)) calc(var(--tab-r) + 1px) no-repeat,
    radial-gradient(circle at 0 100%, #000 calc(var(--tab-r) - 0.5px), transparent var(--tab-r)) 100% var(--tab-h) / var(--tab-r) var(--tab-r) no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--tab-h) + var(--tab-r)) / 100% 100% no-repeat;
  transition: transform 0.5s var(--ease);
}

.origin-card__title {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.origin-card p {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

.origin-card:hover {
  transform: translateY(-6px);
}

/* Give the right column more room before the layout stacks. */
@media (max-width: 1240px) {
  .about__layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* Stacked: figures, team photo, Proven Foundation, then the lab photo. */
@media (max-width: 1000px) {
  .stats {
    grid-template-columns: auto auto;
  }

  .about__layout {
    --origin-inset: 0px;
    grid-template-columns: minmax(0, 1fr);
  }

  .about__team-photo {
    flex: none;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .icon-tile--dark {
    width: 72px;
    height: 72px;
  }

  .origin-card {
    padding: calc(16px + var(--tab-h)) 20px 20px;
  }
}

/* --- Roadmap ---------------------------------------------------------- */

.roadmap {
  --head-h: 64px;
  --track-h: 40px;
  padding-bottom: var(--section-y);
}

.roadmap .section-head {
  margin-bottom: calc(var(--head-gap) * 0.8);
}

.roadmap__scroller {
  position: relative;
}

/* A band of fine tick marks runs edge-to-edge behind the milestones. */
.roadmap__scroller::before {
  content: '';
  position: absolute;
  top: var(--head-h);
  left: 0;
  width: 100%;
  height: var(--track-h);
  background: repeating-linear-gradient(90deg, transparent 0 30px, #d4d4da 30px 31px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  pointer-events: none;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.milestone {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 0 14px 20px;
  border-left: 1px solid #d4d4da;
  transition: background 0.4s var(--ease), border-color 0.4s;
}

.milestone:last-child {
  border-right: 1px solid #d4d4da;
}

.milestone__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--head-h);
}

.milestone__head h3 {
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.milestone__head .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--c-violet);
  transition: transform 0.4s var(--ease);
}

.milestone__track {
  position: relative;
  height: var(--track-h);
  margin-inline: -14px;
}

/* Small arrow marking each milestone on the track. */
.milestone__track::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  border: 6px solid transparent;
  border-left: 8px solid #cfcfd6;
  transform: translateY(-50%);
  transition: border-color 0.4s;
}

.milestone__text {
  margin-top: 22px;
  font-size: clamp(0.9375rem, 1.1vw, 1rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--c-muted);
}

.milestone__logos {
  margin-top: 14px;
}

.milestone__logos--row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.milestone:hover,
.milestone:focus-visible {
  background: linear-gradient(180deg, rgba(225, 205, 245, 0.7), rgba(225, 205, 245, 0.25) 60%, rgba(244, 244, 245, 0));
  outline: none;
}

.milestone:hover .milestone__head .icon,
.milestone:focus-visible .milestone__head .icon {
  transform: scale(1.15);
}

.milestone:hover .milestone__track::before,
.milestone:focus-visible .milestone__track::before,
.milestone--brand .milestone__track::before {
  border-left-color: var(--c-purple);
}

.milestone--brand {
  border-left: 2px solid var(--c-purple);
  align-items: center;
}

.milestone--brand .milestone__head {
  justify-content: center;
}

.milestone__brand img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
}

.milestone--brand .milestone__track {
  align-self: stretch;
}

/* Where Caplyzer is today: an orange line before the milestone, labelled "Now" at its foot. */
.milestone--now {
  border-left: 2px solid var(--c-orange);
}

.milestone--now .milestone__track::before {
  border-left-color: var(--c-orange);
}

.milestone__now {
  position: absolute;
  bottom: 0;
  left: -1px;
  z-index: 1;
  padding-top: 6px;
  color: var(--c-orange);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translate(-50%, 100%);
}

.milestone__2022 {
  position: absolute;
  bottom: 0;
  left: -1px;
  z-index: 1;
  padding-top: 6px;
  color: var(--c-purple);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translate(-50%, 100%);
}

@media (max-width: 1200px) {
  .roadmap__scroller::before {
    display: none;
  }

  .timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 32px;
  }

  .milestone__track {
    background: repeating-linear-gradient(90deg, transparent 0 30px, #d4d4da 30px 31px);
  }

  .milestone:nth-child(4n) {
    border-right: 1px solid #d4d4da;
  }
}

/* Phones: one milestone per row along a vertical ruler, read top to bottom. */
@media (max-width: 600px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  /* The ruler: the desktop's tick band, turned upright. */
  .timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--gutter);
    width: 14px;
    border-left: 1px solid #d4d4da;
    background: repeating-linear-gradient(180deg, transparent 0 15px, #d4d4da 15px 16px);
    -webkit-mask: linear-gradient(180deg, #000 92%, transparent);
    mask: linear-gradient(180deg, #000 92%, transparent);
  }

  .timeline > .milestone {
    --pad-top: 0px;
    min-height: 0;
    padding: var(--pad-top) 0 28px 38px;
    border: 0;
    align-items: stretch;
  }

  .milestone__head,
  .milestone--brand .milestone__head {
    justify-content: flex-start;
    gap: 10px;
    height: auto;
    min-height: 28px;
  }

  .milestone__head h3 {
    font-size: 1.125rem;
  }

  /* The arrow sits on the ruler, pointing at the milestone's heading. */
  .milestone__track,
  .milestone--brand .milestone__track {
    position: absolute;
    top: var(--pad-top);
    left: 0;
    width: 30px;
    height: 28px;
    margin: 0;
    background: none;
  }

  .milestone__track::before {
    left: 18px;
  }

  .milestone__text {
    margin-top: 4px;
  }

  .milestone__logos {
    margin-top: 10px;
  }

  .milestone:hover,
  .milestone:focus-visible {
    background: linear-gradient(90deg, rgba(225, 205, 245, 0.6), rgba(244, 244, 245, 0));
  }

  /* "Now": an orange line across the timeline, labelled underneath, before Scaling. */
  .timeline > .milestone--now {
    --pad-top: 40px;
  }

  .milestone--now::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--c-orange);
  }

  .milestone__now {
    top: 6px;
    bottom: auto;
    left: 38px;
    padding-top: 0;
    transform: none;
  }
}

/* --- Team ------------------------------------------------------------- */

.team .section-title {
  color: var(--c-dark-ink);
}

/* All five cards share one row on desktop; below 1200px they wrap, centred. */
.people {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Cards have a bevelled top-right corner, so the hover shadow is a
   drop-shadow (follows the clipped shape) rather than a box-shadow. */
.person {
  --cut-x: 60px;
  --cut-y: 54px;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  max-width: 280px;
  color: var(--c-ink);
  filter: drop-shadow(0 0 0 rgba(58, 51, 255, 0));
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.person:hover {
  transform: translateY(-8px);
  filter: drop-shadow(0 22px 26px rgba(58, 51, 255, 0.35));
}

/* The scroll reveal's rules (base.css) outrank the two above: without these the
   card never lifts and its shadow snaps on instead of fading in. */
.js .person.reveal {
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.5s var(--ease);
}

.js .person.reveal.is-visible:hover {
  transform: translateY(-8px);
}

.person__top {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 270px;
  padding: 20px 20px 0;
  border-radius: var(--radius-lg) 0 0 0;
  background: var(--grad-person);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--cut-x)) 0, 100% var(--cut-y), 100% 100%, 0 100%);
}

/* Board cards: dark top with a hairline outline. The outer box paints the
   outline colour and ::before paints the fill 1px inside it. */
.person--board .person__top {
  background: rgba(255, 255, 255, 0.2);
}

.person--board .person__top::before {
  content: "";
  position: absolute;
  inset: 1px 1px 0;
  z-index: -1;
  border-radius: calc(var(--radius-lg) - 1px) 0 0 0;
  background: var(--grad-board);
  clip-path: polygon(0 0, calc(100% - var(--cut-x)) 0, 100% var(--cut-y), 100% 100%, 0 100%);
}

/* Every name leaves a line free above it for a title (Prof., Ph.D.), so all
   names start at the same height whether or not the person has one. */
.person__name {
  position: relative;
  padding-top: 1.375rem;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.person__title {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.6);
}

/* Keeps the name's first line clear of the cut corner, which reaches about
   20px into the text area at that height; a longer name wraps instead. */
.person__name::before {
  content: '';
  float: right;
  width: 24px;
  height: 1em;
}

.person__role {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
}

.person .media--portrait {
  flex: 1;
  margin: 12px auto 0;
  width: 86%;
}

/*.person .media--portrait > img {
  filter: grayscale(1);
}*/

/* Fixed minimum so text boxes match even when cards wrap onto separate rows. */
.person__bottom {
  position: relative;
  flex: 1;
  min-height: 210px;
  padding: 18px 20px 54px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--c-surface);
}

.person__bottom p {
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--c-muted);
}

.person__linkedin {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: #0a66c2;
  transition: transform 0.3s var(--ease);
}

.person__linkedin .icon {
  width: 24px;
  height: 24px;
}

.person__linkedin:hover {
  transform: scale(1.12);
}

@media (max-width: 1200px) {
  .people {
    flex-wrap: wrap;
    gap: 32px 20px;
  }

  .person {
    flex: 0 1 280px;
  }
}

@media (max-width: 760px) {
  .people {
    gap: 28px;
  }
}
