/* ==========================================================================
   ABOUT PAGE (Website 2.0)

   From the Figma file "Website 2.0", node 123:2408 (desktop, 1512px). It is
   built from the homepage's sections (home.css): .hero, .panel, .quote and
   .cta, which this file adjusts, and two of its own:

     .audiences  three illustrated cards: for your team, business and fun
     .team       the three founders

   It loads after home.css, so its rules win over the homepage's at every
   width they are set for.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero: centred, with an "Agent" cursor beside the last line
   -------------------------------------------------------------------------- */

.hero {
  align-items: center;
  padding-bottom: 80px;
  text-align: center;
}

.hero h1 {
  color: var(--text-light);
}

.hero h1 span {
  display: inline;
  color: inherit;
}

.hero h1 > span:first-child {
  padding-block: 0.2em;
  background-image: linear-gradient(to left, var(--text-brand), var(--icon-discovery));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The last line, which the cursor sits beside */
.hero h1 > span:last-child {
  position: relative;
  display: inline-block;
}

/* The cursor is drawn pointing up-left; Figma flips the "near me" icon */
.hero h1 > span:last-child > span {
  position: absolute;
  left: 100%;
  top: 38px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  font-family: var(--font-family-secondary);
  font-weight: 500;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.56px;
  color: var(--text-brand);
  white-space: nowrap;
  pointer-events: none;
}

.hero h1 > span:last-child > span > img {
  display: block;
  width: 40px;
  height: 40px;
  transform: scaleX(-1);
}

.hero h1 > span:last-child > span > span {
  padding: 0 4px 1px;
  border-radius: 4px;
  backdrop-filter: blur(12px);
}

.hero h1 + p {
  display: block;
  min-height: 0;
  max-width: 482px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.32px;
  color: var(--text-regular);
}

/* --------------------------------------------------------------------------
   Who it's for: two cards side by side, then one full width, in one box
   -------------------------------------------------------------------------- */

/* Capped at 1512px, so the gutter comes from that width, not the window's */
:is(.audiences, .team) {
  --edge: max(var(--grid-margin, 24px), calc((min(100vw, 1512px) - 1230px) / 2));
}

.audiences {
  width: 100%;
  max-width: 1512px;
  margin-inline: auto;
  padding-inline: var(--edge);
}

.audiences > ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  overflow: hidden;
}

.audiences > ul > li {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--background-surface-light);
}

.audiences > ul > li + li {
  border-left: 1px solid var(--border-light);
}

.audiences > ul > li:last-child {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-light);
  border-left: 0;
}

.audiences > ul > li > figure {
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.audiences > ul > li > p {
  box-sizing: content-box;
  max-width: 566px;
  margin: 0;
  padding: 40px;
  font-weight: 500;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: -0.72px;
  color: var(--text-light);
}

.audiences > ul > li > p strong {
  font-weight: 500;
  color: var(--text-strong);
}

/* --------------------------------------------------------------------------
   How it compares: four cards, two by two, under the illustration
   -------------------------------------------------------------------------- */

.panel > div > ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.panel > div > ul > li {
  padding: 32px 40px;
}

.panel > div > ul > li + li {
  border-left: 0;
}

.panel > div > ul > li:nth-child(even) {
  border-left: 1px solid var(--border-light);
}

.panel > div > ul > li:nth-child(n + 3) {
  border-top: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   Why we built it: an eyebrow over a large quote, swept from light to
   regular as it scrolls (home.js)
   -------------------------------------------------------------------------- */

.quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding-top: 180px;
  padding-bottom: 180px;
}

.quote h2 {
  margin: 0;
  padding-block: 0.2em;
  margin-block: -0.2em;
  font-family: var(--font-family-brand);
  font-weight: 400;
  font-size: 24px;
  line-height: 24px;
  letter-spacing: -0.96px;
  background-image: linear-gradient(to left, var(--text-brand), var(--icon-discovery));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quote p {
  font-size: 64px;
  line-height: 60px;
  letter-spacing: -2.56px;
  color: var(--text-disabled);
}

/* Line spacing = 24px line box + 2 x padding - 2 x overlap = 60px */
.quote .qline {
  margin-block: -12px;
  padding-block: 30px;
  line-height: 24px;
}

/* --------------------------------------------------------------------------
   Team: three people in one box, each with a soft colour wash
   -------------------------------------------------------------------------- */

.team {
  width: 100%;
  max-width: 1512px;
  margin-inline: auto;
  padding-inline: var(--edge);
}

.team > ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  overflow: hidden;
}

.team > ul > li {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 550px;
  min-width: 0;
  background: var(--background-surface-light);
}

.team > ul > li + li {
  border-left: 1px solid var(--border-light);
}

/* The washes: Figma's conic gradient at low opacity, from a corner */
.team > ul > li::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.team > ul > li:nth-child(1)::before {
  background: radial-gradient(120% 90% at 0% 100%, rgba(246, 196, 170, 0.32) 0%, rgba(246, 196, 170, 0) 65%);
}

.team > ul > li:nth-child(2)::before {
  background: radial-gradient(130% 90% at 10% 100%, rgba(168, 190, 246, 0.3) 0%, rgba(168, 190, 246, 0) 65%);
}

.team > ul > li:nth-child(3)::before {
  background: radial-gradient(120% 100% at 100% 70%, rgba(246, 205, 180, 0.34) 0%, rgba(246, 205, 180, 0) 65%);
}

.team > ul > li > * {
  position: relative;
}

/* Photo, then name, role and bio */
.team > ul > li > img {
  display: block;
  width: 128px;
  height: 128px;
  margin: 40px 40px auto;
  border-radius: 16px;
  object-fit: cover;
}

.team > ul > li > h3,
.team > ul > li > p:last-child {
  margin: 0;
  font-family: var(--font-family-brand);
  font-weight: 400;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: -0.96px;
  color: var(--text-strong);
}

.team > ul > li > h3 {
  padding: 32px 40px 0;
}

.team > ul > li > h3 + p {
  margin: 0;
  padding: 0 40px 24px;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.64px;
  color: var(--text-regular);
}

.team > ul > li > h3 + p span {
  background-image: linear-gradient(to left, var(--text-brand), var(--icon-discovery));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* A fixed-height bio keeps every name on the same line */
.team > ul > li > p:last-child {
  box-sizing: border-box;
  min-height: 172px;
  padding: 0 40px 32px;
}

/* --------------------------------------------------------------------------
   Closing call to action: one line here
   -------------------------------------------------------------------------- */

.cta h2 span {
  background-image: linear-gradient(97.2deg, #7b6bb5 0%, #646444 100%);
}

/* ==========================================================================
   Narrower screens
   ========================================================================== */

@media (max-width: 1179px) {
  .quote {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .team > ul {
    grid-template-columns: 1fr;
  }

  .team > ul > li {
    min-height: 0;
  }

  .team > ul > li + li {
    border-left: 0;
    border-top: 1px solid var(--border-light);
  }

  .team > ul > li > img {
    margin-bottom: 0;
  }

  .team > ul > li > p:last-child {
    min-height: 0;
  }
}

@media (max-width: 899px) {
  .hero {
    padding-top: 72px;
    padding-bottom: 56px;
  }

  .hero h1 {
    font-size: 52px;
    line-height: 52px;
    letter-spacing: -2.08px;
  }

  .hero h1 > span:last-child > span {
    display: none;
  }

  .audiences > ul,
  .panel > div > ul {
    grid-template-columns: 1fr;
  }

  .audiences > ul > li + li {
    border-left: 0;
    border-top: 1px solid var(--border-light);
  }

  .panel > div > ul > li:nth-child(even) {
    border-left: 0;
  }

  .panel > div > ul > li + li {
    border-top: 1px solid var(--border-light);
  }

  .quote p {
    font-size: 44px;
    line-height: 44px;
    letter-spacing: -1.76px;
  }

  .quote .qline {
    margin-block: -10px;
    padding-block: 20px;
  }
}

/* Phones: the "about / mobile" frame in the Website 2.0 Figma file
   (node 152:20910), drawn at 390px wide */
@media (max-width: 699px) {
  /* Hero: left-aligned, one flowing heading */
  .hero {
    align-items: flex-start;
    gap: 24px;
    padding-top: 48px;
    padding-bottom: 32px;
    text-align: left;
  }

  .hero h1 {
    font-size: 40px;
    line-height: 40px;
    letter-spacing: -1.6px;
  }

  .hero h1 br {
    display: none;
  }

  .hero h1 > span:first-child {
    padding-block: 0;
  }

  .hero h1 > span:last-child {
    display: inline;
  }

  .hero h1 + p {
    max-width: none;
  }

  /* Who it's for: three separate framed cards, 48px apart, 8px from the
     screen edge; each illustration is full size and cropped (home.js) */
  .audiences {
    padding-inline: 8px;
  }

  .audiences > ul {
    display: flex;
    flex-direction: column;
    gap: 48px;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .audiences > ul > li,
  .audiences > ul > li + li,
  .audiences > ul > li:last-child {
    padding: 6px;
    border: 1px solid var(--border-disabled);
    border-radius: 20px;
  }

  .audiences > ul > li > figure {
    height: 350px;
    align-items: flex-start;
    justify-content: var(--phone-align, center);
    border-radius: 16px;
    overflow: clip;
    --phone-zoom: 1;
  }

  .audiences > ul > li > figure:has(> :is(.mock-about-team, .mock-about-fun)) {
    --phone-align: flex-start;
  }

  .audiences > ul > li > figure:has(> .mock-about-business) {
    --phone-align: flex-end;
  }

  .audiences > ul > li > p {
    padding: 24px;
  }

  /* How it compares: the illustration a little smaller, then the cards */
  .panel figure:has(> .mock-about-create) {
    --phone-zoom: 0.7;
  }

  .panel > div > ul > li {
    padding: 24px 28px;
  }

  /* Why we built it: a larger, left-aligned quote */
  .quote {
    gap: 16px;
    padding: 200px var(--edge);
  }

  .quote p {
    font-size: 40px;
    line-height: 40px;
    letter-spacing: -1.6px;
    text-align: left;
  }

  .quote .qline {
    margin: -10px 0;
    padding-block: 18px;
  }

  /* Team: 16px from the screen edge */
  .team {
    padding-inline: 16px;
  }

  .team > ul > li > img {
    margin: 24px 24px 0;
  }

  .team > ul > li > h3 {
    padding: 32px 24px 0;
  }

  .team > ul > li > h3 + p {
    padding: 0 24px 24px;
  }

  .team > ul > li > p:last-child {
    min-height: 0;
    padding: 0 24px 32px;
  }

  /* The closing line keeps the About page's larger size */
  .cta h2 + p:not(:last-child) {
    font-size: 18px;
    line-height: 26px;
    letter-spacing: -0.36px;
    color: #45556c;
  }
}
