/* Team page — Figma node 6669:8234. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.fl-redesign {
  overflow-x: hidden;
  max-width: 100%;
}

body.fl-team-page {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--fl-surface);
  color: var(--fl-ink);
  font-family: var(--fl-font-sans);
}

body.fl-team-page h1,
body.fl-team-page h2,
body.fl-team-page h3 {
  text-wrap: balance;
}

body.fl-team-page p {
  text-wrap: pretty;
}

.fl-team-main {
  --fl-team-hero-values-gap: 380px;

  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 30px;
}

.fl-team-main > section {
  width: 100%;
  margin-bottom: 150px;
}


.fl-team-main > .fl-team-hero {
  margin-bottom: var(--fl-team-hero-values-gap);
}
/* Match homepage demo width — cancel .fl-team-main horizontal padding. */
.fl-team-main > .fl-demo.fl-section-sep {
  box-sizing: border-box;
  width: calc(100% + 60px);
  max-width: none;
  margin-inline: -30px;
  margin-bottom: 200px;
}

.fl-team-main > .fl-footer {
  flex: none;
  width: 100vw;
  margin: 0 0 0 calc(50% - 50vw);
}

/* Hero */
.fl-team-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 542px;
  padding: 200px 0 0;
}

.fl-team-hero__bg {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: 100vw;
  height: auto;
  aspect-ratio: 90 / 49;
  overflow: hidden;
  opacity: 0.39;
  transform: translateX(-50%);
  pointer-events: none;
  background-color: lightgray;
  background-image: url("/redesign/assets/team/hero-skyline.png");
  background-image: image-set(
    url("/redesign/assets/team/hero-skyline.webp") type("image/webp"),
    url("/redesign/assets/team/hero-skyline.png") type("image/png")
  );
  background-position: -355.28px -61.468px;
  background-repeat: no-repeat;
  background-size: 125.011% 119.052%;
}

.fl-team-hero__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  width: min(100%, 690px);
  padding: 24px;
  border-radius: 5px;
  background: var(--fl-white);
  text-align: center;
}

.fl-team-hero__card h1 {
  margin: 0;
  color: var(--fl-ink);
  font: 400 64px/67.2px "Cormorant Garamond", Georgia, serif;
  letter-spacing: -1.6px;
}

.fl-team-hero__card p {
  max-width: 639px;
  margin: 0;
  color: var(--fl-text-muted);
  font-size: 16px;
  line-height: 26px;
}

/* Values */
.fl-team-values {
  --fl-team-values-title-gap: 50px;
  --fl-team-values-stats-gap: 100px;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  padding: 0 40px;
}

.fl-team-values__title {
  margin: 0 0 var(--fl-team-values-title-gap);
  color: var(--fl-ink);
  font: 400 60px/61.2px "Cormorant Garamond", Georgia, serif;
  letter-spacing: -1.5px;
  text-align: center;
}

.fl-team-values__script {
  color: var(--fl-green);
  font-family: var(--fl-font-script);
  font-weight: 700;
}

.fl-team__values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin-bottom: var(--fl-team-values-stats-gap);
}

.fl-team__value {
  padding: 20px;
  border: 2px solid var(--fl-ink);
  border-radius: 8px;
  background: var(--fl-white);
  box-shadow: var(--fl-shadow-lg);
}

.fl-team__value h3 {
  margin: 16px 0 0;
  font: 700 24px/30px "Cormorant Garamond", Georgia, serif;
}

.fl-team__value p {
  margin: 8px 0 0;
  color: var(--fl-text-muted);
  font-size: 16px;
  line-height: 26px;
}

.fl-team__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 11px;
  align-items: end;
  justify-items: center;
  width: min(100%, 899px);
}

.fl-team__stat {
  display: contents;
}

.fl-team__stat:nth-child(1) .fl-team__stat-value {
  grid-area: 1 / 1;
}

.fl-team__stat:nth-child(1) .fl-team__stat-label {
  grid-area: 2 / 1;
}

.fl-team__stat:nth-child(2) .fl-team__stat-value {
  grid-area: 1 / 2;
}

.fl-team__stat:nth-child(2) .fl-team__stat-label {
  grid-area: 2 / 2;
}

.fl-team__stat:nth-child(3) .fl-team__stat-value {
  grid-area: 1 / 3;
}

.fl-team__stat:nth-child(3) .fl-team__stat-label {
  grid-area: 2 / 3;
  max-width: 160px;
}

.fl-team__stat-value {
  margin: 0;
  align-self: end;
  color: var(--fl-ink);
  font: 500 60px/1 "Cormorant Garamond", Georgia, serif;
  text-align: center;
}

.fl-team__stat-value--accent {
  font-size: 40px;
  font-weight: 700;
}

.fl-team__stat-label {
  margin: 0;
  align-self: end;
  color: var(--fl-green);
  font-family: var(--fl-font-script);
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

/* Gallery — infinite horizontal marquee (Figma node 7253:15920). */
.fl-team-gallery {
  --fl-gallery-gap: 24px;
  --fl-gallery-aspect: 1024 / 830;
  --fl-gallery-shadow: 4px;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  padding: 0 40px;
  overflow: hidden;
  box-sizing: border-box;
}

.fl-team-gallery__viewport {
  --fl-gallery-card-w: min(522px, calc(100cqw - var(--fl-gallery-gap)));
  overflow: hidden;
  width: 100%;
  padding-bottom: var(--fl-gallery-shadow);
  box-sizing: border-box;
  container-type: inline-size;
  container-name: team-gallery;
}

.fl-team-gallery__track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: var(--fl-gallery-gap);
  animation: fl-team-gallery-marquee 52s linear infinite;
}

.fl-team-gallery__track:hover {
  animation-play-state: paused;
}

.fl-team__gallery-item {
  position: relative;
  flex: none;
  width: var(--fl-gallery-card-w);
  aspect-ratio: var(--fl-gallery-aspect);
  margin: 0;
  padding: 0;
  border: 4px solid var(--fl-ink);
  border-radius: 12px;
  background: transparent;
  box-shadow: var(--fl-shadow-lg);
  overflow: hidden;
  box-sizing: border-box;
}

.fl-team__gallery-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.fl-team__gallery-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}

/* Hero card reveal — same fade-up pattern as fl-note (note.css). */
.fl-team-hero--armed .fl-team-hero__card {
  opacity: 0;
}

.fl-team-hero--play .fl-team-hero__card {
  animation: fl-team-rise 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Values reveal — heading then cards one-by-one (platform.css pattern). */
.fl-team-values--armed .fl-team-values__title,
.fl-team-values--armed .fl-team__value {
  opacity: 0;
}

.fl-team-values--play .fl-team-values__title {
  animation: fl-team-rise 750ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fl-team-values--play .fl-team__value {
  animation: fl-team-card-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fl-team-values--play .fl-team__value:nth-child(1) {
  animation-delay: 160ms;
}

.fl-team-values--play .fl-team__value:nth-child(2) {
  animation-delay: 280ms;
}

.fl-team-values--play .fl-team__value:nth-child(3) {
  animation-delay: 400ms;
}

@keyframes fl-team-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fl-team-card-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fl-team-hero--armed .fl-team-hero__card,
  .fl-team-hero--play .fl-team-hero__card,
  .fl-team-values--armed .fl-team-values__title,
  .fl-team-values--armed .fl-team__value,
  .fl-team-values--play .fl-team-values__title,
  .fl-team-values--play .fl-team__value {
    opacity: 1;
    animation: none;
  }
}

@keyframes fl-team-gallery-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fl-team-gallery__track {
    animation: none;
  }

  .fl-team-gallery__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .fl-team-gallery__viewport::-webkit-scrollbar {
    display: none;
  }

  .fl-team__gallery-item {
    scroll-snap-align: center;
  }
}

/* Note — full content width (Figma node 7253:15925), aligned with values + demo. */
.fl-team-note {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 40px;
}

.fl-team-note .fl-note__card {
  width: 100%;
  max-width: none;
  gap: 11px;
  padding: 34px;
}

.fl-team-main > .fl-team-note {
  margin-bottom: 185px;
}

@media (max-width: 1023px) {
  .fl-team-main {
    padding-inline: 20px;
    overflow-x: hidden;
  }

  /*
   * Mobile hero full-bleed: cancel main padding with negative margins.
   * Never use 100vw / calc(50% - 50vw) here — that causes the right-side gap.
   */
  .fl-team-main > .fl-team-hero {
    position: relative;
    align-self: stretch;
    width: calc(100% + 40px);
    max-width: none;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: var(--fl-team-hero-values-gap);
    overflow: hidden;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 96px 20px;
    box-sizing: border-box;
  }

  .fl-team-main > .fl-team-hero .fl-team-hero__bg {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    aspect-ratio: unset;
    transform: none;
    background-position: center top;
    background-size: cover;
  }

  .fl-team-main > section {
    margin-bottom: 80px;
  }

  .fl-team-hero__card {
    width: min(86%, 360px);
    max-width: 360px;
    margin-inline: auto;
    padding: 36px 28px;
    gap: 24px;
  }

  .fl-team-hero__card h1 {
    font-size: clamp(36px, 8vw, 56px);
    line-height: 1.05;
    letter-spacing: -1px;
  }

  .fl-team-values {
    --fl-team-values-title-gap: 24px;
    --fl-team-values-stats-gap: 40px;
    padding: 0;
  }

  .fl-team-values__title {
    font-size: clamp(36px, 9vw, 60px);
    line-height: 1.05;
  }

  .fl-team__values {
    grid-template-columns: 1fr;
  }

  .fl-team__stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    margin-inline: auto;
  }

  .fl-team__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .fl-team__stat-value,
  .fl-team__stat-label {
    align-self: center;
    grid-area: auto;
  }

  .fl-team__stat:nth-child(3) .fl-team__stat-label {
    max-width: none;
  }

  .fl-team__stat-value {
    font-size: clamp(44px, 12vw, 60px);
    line-height: 1;
  }

  .fl-team-gallery {
    --fl-gallery-gap: 12px;
    --fl-gallery-aspect: 1024 / 880;
    --fl-gallery-peek: 44px;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: 0;
  }

  .fl-team-gallery__viewport {
    --fl-gallery-card-w: min(360px, calc(100cqw - var(--fl-gallery-peek) * 2));
  }

  .fl-team-gallery__track {
    animation: none;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .fl-team-gallery__track.is-resetting {
    transition: none;
  }

  .fl-team-gallery__track.is-resetting .fl-team__gallery-item {
    transition: none;
  }

  .fl-team__gallery-item {
    transform: scale(0.92);
    opacity: 0.55;
    transition:
      transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
  }

  .fl-team__gallery-item.is-active {
    transform: scale(1);
    opacity: 1;
    z-index: 1;
  }

  .fl-team-main > .fl-demo.fl-section-sep {
    width: calc(100% + 40px);
    margin-inline: -20px;
    margin-bottom: 100px;
  }

  .fl-team-note .fl-note__body {
    font-size: 18px;
    line-height: 28px;
  }
}

@media (max-width: 767px) {
  .fl-team-main {
    --fl-team-hero-values-gap: 100px;

    padding-inline: 16px;
  }

  .fl-team-main > .fl-team-hero {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 88px 16px 24px;
  }

  .fl-team-hero__card {
    width: min(84%, 320px);
    max-width: 320px;
    padding: 40px 24px;
    gap: 22px;
  }

  .fl-team-hero__card h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .fl-team-hero__card p {
    font-size: 15px;
    line-height: 26px;
  }

  .fl-team-main > section {
    margin-bottom: 64px;
  }

  .fl-team-values {
    --fl-team-values-title-gap: 20px;
    --fl-team-values-stats-gap: 32px;
  }

  .fl-team__value {
    padding: 18px 18px 32px;
  }

  .fl-team__value h3 {
    font-size: 22px;
    line-height: 28px;
  }

  .fl-team-gallery {
    --fl-gallery-peek: 36px;
    --fl-gallery-gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: 0;
  }

  .fl-team-note,
  .fl-team-values {
    padding: 0;
  }

  .fl-team-note .fl-note__card {
    padding: 24px 20px;
  }

  .fl-team-note .fl-note__body {
    font-size: 16px;
    line-height: 26px;
  }
}

@media (max-width: 800px) {
  .fl-team-main > .fl-demo.fl-section-sep {
    width: 90%;
    max-width: 90%;
    margin-inline: auto;
  }
}
