/*
 * formfast — About page styles
 * Extends styles.css + tokens.css. Dark sections reuse existing
 * classes; about-specific components are namespaced .about-* / .subhero.
 */

/* ==========================================================================
   Header — dark sections: subdued nav; white sections: match homepage (nav.js + data-nav-light)
   ========================================================================== */
.about-page .site-header__nav a {
  color: var(--color-content-subdued-dark);
}

.about-page .site-header__nav a.is-active {
  color: var(--color-white);
}

.about-page .site-header__status-copy {
  color: var(--color-white);
}

.about-page .site-header--light .site-header__nav a,
.about-page .site-header--light .site-header__nav a.is-active {
  color: var(--color-black);
}

.about-page .site-header--light .site-header__status-copy {
  color: var(--color-black);
}

/* Gap between staggered H1 block and subtitle when content stacks (column layout). */
.about-page {
  --about-subhero-stacked-gap: var(--spacing-2xl);
}

/* ==========================================================================
   Subpage hero — "nice to / meet you"
   ========================================================================== */

/* Column grid lines — top of subhero only, fades out before the heading */
.subhero__stripes {
  left: var(--pad-section-x);
  right: var(--pad-section-x);
  top: 0;
  height: 300px;
  z-index: 0;
}

.subhero__stripes .grid-line {
  background: linear-gradient(
    to bottom,
    #222222 0%,
    transparent 100%
  );
}

.subhero {
  position: relative;
  width: 100%;
  height: 500px;
  background-color: var(--color-black);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: var(--section-padding-y) var(--pad-section-x) var(--spacing-3xl);
}

/* ==========================================================================
   Banner — Figma 284:8866 / 284:8867 (frame width); media 16:9 aspect.
   ========================================================================== */
.about-banner {
  background: linear-gradient(to bottom, var(--color-black) 50%, var(--color-white) 50%);
  padding: 0 var(--pad-section-x);
}

.about-banner__media {
  position: relative;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius-media);
  overflow: hidden;
}

.about-banner__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.about-banner__clip img {
  display: block;
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: 78% 38%;
  pointer-events: none;
  transform: translateY(var(--about-banner-parallax-y, 0px));
}

@media (prefers-reduced-motion: reduce) {
  .about-banner__clip img {
    transform: none;
  }
}

/* Bottom row: stagger heading left, subtitle right */
.subhero__content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Decorative star in subpage heroes (desktop only). */
.subhero__spark {
  display: none;
}

.subhero__spark.is-chat-trigger {
  cursor: pointer;
  pointer-events: auto;
}

.subhero__spark.is-chat-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

@media (min-width: 1200px) {
  .subhero__spark {
    position: absolute;
    top: 290px;   /* fallback; JS aligns above subtitle */
    right: 48px;  /* fallback; JS aligns to subtitle right edge */
    width: 64px;
    height: 64px;
    pointer-events: none;
    z-index: 3;
    display: block;
    transform: rotate(var(--subhero-spark-rot, 0deg));
    transform-origin: center center;
    will-change: transform;
  }
}

/* About + Work: stacked column so flex gap on .subhero__content matches (Figma rhythm) */
.about-page .subhero__heading-block,
.work-page .subhero__heading-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

/* About hero — same stagger model as Work; desktop ≥1200 uses 90px H1 (see media query) */
.about-page .subhero__heading {
  display: inline-grid;
  grid-template-columns: max-content;
  grid-template-rows: max-content;
  line-height: 0;
  place-items: start;
  /* Tight block height to overlapping lines; avoids extra blank band above the intro line */
  height: fit-content;
  min-height: 0;
}

.about-page .subhero__heading > * {
  grid-column: 1;
  grid-row: 1;
}

/* Stagger overlay — line / arrow / line-2 share the same grid cell */
.subhero__heading {
  display: inline-grid;
  grid-template-columns: max-content;
  grid-template-rows: max-content;
  line-height: 0;
  place-items: start;
}

.subhero__heading > * {
  grid-column: 1;
  grid-row: 1;
}

.subhero__overline {
  margin-left: 0;
  margin-top: 0;
  color: var(--color-white);
}

/* "nice to" — H1 Paralucent Light 90px */
.subhero__line-1 {
  font-family: var(--type-h1-family);
  font-size: var(--type-h1-size);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-line-height);
  letter-spacing: var(--type-h1-letter-spacing);
  color: var(--color-white);
  font-style: normal;
  margin-left: 0;
  margin-top: 28px;
}

/* Decorative down arrow */
.subhero__arrow {
  display: block;
  width: 32px;
  height: 32px;
  margin-left: 274px;
  margin-top: 73px;
}

.subhero__arrow img {
  width: 100%;
  height: 100%;
}

/* Arrow uses same .hero__heading-clip as letters; keep fixed 32×32 box without text padding */
.subhero__arrow .hero__heading-clip {
  display: block;
  width: 100%;
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.subhero__arrow .hero__heading-inner {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateY(115%) rotate(90deg);
  transform-origin: center center;
}

.subhero.is-revealed .subhero__arrow .hero__heading-inner {
  transform: translateY(0) rotate(0deg);
}

/* "meet you" — H1 Paralucent Light 90px, right-aligned */
.subhero__line-2 {
  font-family: var(--type-h1-family);
  font-size: var(--type-h1-size);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-line-height);
  letter-spacing: var(--type-h1-letter-spacing);
  color: var(--color-white);
  font-style: normal;
  text-align: right;
  margin-left: 182px;
  margin-top: 103px;
  width: 373px;
}

/* Tablet + desktop — desktop stagger applies from 768px up */
@media (min-width: 768px) {
  .about-page .subhero__line-1 {
    margin-left: 0;
    margin-top: 0;
    width: auto;
    white-space: nowrap;
  }

  .about-page .subhero__arrow {
    margin-left: 274px;
    margin-top: 39px;
    width: 32px;
    height: 32px;
  }

  .about-page .subhero__line-2 {
    margin-left: 182px;
    margin-top: 80px;
    width: 373px;
    text-align: right;
    white-space: nowrap;
  }
}

/* Tablet only (768–1199): About page rebuilt from Figma node 284:9094 */
@media (min-width: 768px) and (max-width: 1199px) {
  .about-page .subhero {
    height: 420px;
  }

  .about-page .subhero__stripes {
    left: var(--pad-section-x);
    right: var(--pad-section-x);
    top: 0;
    height: 300px;
  }

  .about-page .subhero__line-1 {
    width: 268px;
  }

  .about-page .subhero__arrow {
    margin-top: 45px;
  }

  .about-page .subhero__line-2 {
    margin-top: 74.75px;
  }

  .about-page .about-lead {
    padding: var(--section-padding-y) var(--pad-section-x);
    gap: var(--spacing-xl);
  }

  .about-page .about-lead > .about-lead__formfast {
    display: block;
    max-width: 563px;
    margin-bottom: calc(var(--spacing-section-md) - var(--spacing-xl));
  }

  .about-page .about-lead > .about-lead__text-group {
    max-width: 563px;
    margin-bottom: 0;
  }

  .about-page .about-lead > .about-lead__chat-cta {
    align-self: flex-start;
  }
}

/* Subtitle — H5g (work subhero) */
.subhero__subtitle {
  font-family: var(--type-h5g-family);
  font-size: var(--type-h5g-size);
  font-weight: var(--type-h5g-weight);
  line-height: var(--type-h5g-line-height);
  letter-spacing: var(--type-h5g-letter-spacing);
  color: var(--color-white);
  width: 546px;
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .subhero__subtitle {
    text-align: right;
  }
}

/* About lead — overline + body copy + CTA (Figma: Mobile About 284:8963 — py section-md 80px) */
.about-lead {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  padding: var(--section-padding-y) var(--pad-section-x);
  background-color: var(--color-black);
}

.about-lead__text-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  max-width: 546px;
}

.about-lead__subtitle {
  font-family: var(--type-overline-family);
  font-size: var(--type-overline-size);
  font-weight: var(--type-overline-weight);
  line-height: var(--type-overline-line-height);
  letter-spacing: var(--type-overline-letter-spacing);
  text-transform: uppercase;
  color: var(--color-white);
}

.about-lead .about-text__copy {
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line-height);
  letter-spacing: var(--type-body-letter-spacing);
}

.about-lead__chat-cta {
  align-self: flex-start;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 720ms;
}

/* Hidden when the desktop subhero subtitle is shown (≥1200px). */
.about-lead__formfast {
  display: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 546px; /* same rhythm as .about-lead__text-group + subhero subtitle */
  margin: 0;
  font-family: var(--type-h5g-family);
  font-size: var(--type-h5g-size);
  font-weight: var(--type-h5g-weight);
  line-height: var(--type-h5g-line-height);
  letter-spacing: var(--type-h5g-letter-spacing);
  color: var(--color-white);
}

/* “This is formfast…” only beside the staggered H1 from 1200px up (Figma About 284:8816).
   Below that — same as tablet/mobile (284:9094 / 284:8940): tagline in .about-lead__formfast. */
@media (max-width: 1199px) {
  .about-page .subhero__subtitle--about-desktop {
    display: none;
  }

  .about-page .about-lead__formfast {
    display: block;
  }
}

/* Clip-reveal: reuses .hero__heading-clip / .hero__heading-inner from styles.css */
.subhero.is-revealed .hero__heading-inner {
  transform: translateY(0);
}

/* ==========================================================================
   About — simple text sections (two: left-aligned and right-aligned)
   ========================================================================== */
.about-text {
  display: flex;
  flex-direction: column;
  background-color: var(--color-black);
  padding: var(--section-padding-y) var(--pad-section-x);
}

.about-text--right {
  align-items: flex-end;
}

.about-text__inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  width: 620px;
}

.about-text__eyebrow {
  color: var(--color-white);
}

/* H5g: Graphik Regular 28px — matches subhero subtitle */
.about-text__copy {
  font-family: var(--type-h5g-family);
  font-size: var(--type-h5g-size);
  font-weight: var(--type-h5g-weight);
  line-height: var(--type-h5g-line-height);
  letter-spacing: var(--type-h5g-letter-spacing);
  color: var(--color-white);
}

/* ==========================================================================
   About — USP cards (white background variant)
   ========================================================================== */
.about-usps {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--pad-section-x);
  position: relative;
}

.about-usps__cards {
  display: flex;
  width: 100%;
  position: relative;
  align-items: flex-start; /* lets aspect-ratio define height — default stretch breaks squares */
}

.about-usp-card {
  flex: 1;
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  position: relative;
  overflow: visible;
}

/* Match homepage USP separators: only internal vertical dividers, no outer side borders. */
.about-usp-card:not(:last-of-type) {
  border-right: 1px solid #e8e8e8;
}

.about-usp-card__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-xl);
  width: 100%;
}

.about-usp-card__header-main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  min-width: 0;
  flex: 1 1 auto;
}

.about-usp-card__number {
  color: var(--color-content-subdued-light);
}

/* H6: Graphik Medium 21px */
.about-usp-card__title {
  font-family: var(--type-h6-family);
  font-size: var(--type-h6-size);
  font-weight: var(--type-h6-weight);
  line-height: var(--type-h6-line-height);
  letter-spacing: var(--type-h6-letter-spacing);
  color: var(--color-black);
}

.about-usp-card__body {
  color: var(--color-black);
}

/* Decorative stars — left/top set by JS (getBoundingClientRect) */
.about-usp-star {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
}

/* ==========================================================================
   About — services / disciplines (white background, two-column)
   ========================================================================== */
.about-services {
  --about-services-bg: var(--color-white);
  --about-services-meta-color: var(--color-black);
  --about-services-text-color: var(--color-black);
  --about-services-border-color: #e8e8e8;
  --about-services-num-color: #aba7a7;
  --about-services-left-gap: var(--spacing-xl);
  --about-services-heading-max-width: 300px;
  --about-services-item-padding-y: var(--spacing-md);
  --about-services-item-min-height: 0;
  --about-services-item-gap: var(--spacing-xl);
  --about-services-name-family: var(--type-h5g-family);
  --about-services-name-size: var(--type-h5g-size);
  --about-services-name-weight: var(--type-h5g-weight);
  --about-services-name-letter-spacing: var(--type-h5g-letter-spacing);
  --about-services-num-size: var(--type-h5g-size);
  --about-services-num-letter-spacing: -0.14px;
  background-color: var(--about-services-bg);
  padding: var(--section-padding-y) var(--pad-section-x);
}

.about-services--dark {
  --about-services-bg: var(--color-black);
  --about-services-meta-color: var(--color-white);
  --about-services-text-color: var(--color-white);
  --about-services-border-color: rgba(255, 255, 255, 0.1);
}

.about-services__inner {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-3xl);
}

.about-services__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--about-services-left-gap);
}

.about-services__eyebrow {
  color: var(--about-services-meta-color);
}

.about-services__heading {
  font-family: var(--type-h4-family);
  font-size: var(--type-h4-size);
  font-weight: var(--type-h4-weight);
  line-height: normal;
  letter-spacing: var(--type-h4-letter-spacing);
  color: var(--about-services-text-color);
  max-width: var(--about-services-heading-max-width);
}

.about-services__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.about-services__label {
  color: var(--about-services-meta-color);
  margin-bottom: 12px;
}

.about-services__list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  border-top: 1px solid var(--about-services-border-color);
}

.about-services__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--about-services-item-gap);
  align-items: center;
  min-height: var(--about-services-item-min-height);
  padding: var(--about-services-item-padding-y) 0;
  border-bottom: 1px solid var(--about-services-border-color);
}

.about-services__name {
  min-width: 0;
  font-family: var(--about-services-name-family);
  font-size: var(--about-services-name-size);
  font-weight: var(--about-services-name-weight);
  letter-spacing: var(--about-services-name-letter-spacing);
  color: var(--about-services-text-color);
}

.about-services__num {
  font-family: var(--font-aeonik-mono);
  font-size: var(--about-services-num-size);
  font-weight: 400;
  letter-spacing: var(--about-services-num-letter-spacing);
  color: var(--about-services-num-color);
  justify-self: end;
}

/* ==========================================================================
   About — photo grid section
   ========================================================================== */
.about-photos {
  background-color: var(--color-black);
  padding: var(--section-padding-y) var(--pad-section-x) 0;
}

.about-photos__header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.about-photos__eyebrow {
  color: var(--color-white);
}

.about-photos__heading {
  font-family: var(--type-h4-family);
  font-size: var(--type-h4-size);
  font-weight: var(--type-h4-weight);
  line-height: var(--type-h4-line-height);
  letter-spacing: var(--type-h4-letter-spacing);
  color: var(--color-white);
  width: 838px;
}

/* Staggered 4-column grid — absolutely positioned items */
.about-photos__grid {
  position: relative;
  width: 100%;
  height: 1217px; /* tallest column: col2 → 785 + 432 */
}

.about-photo-item {
  --ph: 432px; /* card height; updated from JS for correct image math */
  position: absolute;
  width: 24.12%;  /* ~324px of 1344px content width */
  height: 432px;
  border-radius: var(--radius-media);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
}

/* Scroll-driven vertical reveal from center — same model as .about-banner__clip */
.about-photo-item__clip {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  height: 0;
  overflow: hidden;
  border-radius: inherit;
  isolation: isolate;
  will-change: height;
}

.about-photo-item__clip img {
  position: absolute;
  left: 0;
  width: 100%;
  height: calc(var(--ph) * 1.2);
  top: 50%;
  transform: translateY(calc(-50% + var(--photo-parallax-y, 0px)));
  border-radius: inherit;
  object-fit: cover;
  display: block;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .about-photo-item__clip {
    height: 100%;
    will-change: auto;
  }
}

/* Column + row positions — mirror Figma layout offsets */
.about-photo-item--c1r1 { left: 0;      top: 121px; }
.about-photo-item--c1r2 { left: 0;      top: 569px; }
.about-photo-item--c2r1 { left: 25.29%; top: 337px; }
.about-photo-item--c2r2 { left: 25.29%; top: 785px; }
.about-photo-item--c3r1 { left: 50.59%; top: 0;     }
.about-photo-item--c3r2 { left: 50.59%; top: 448px; }
.about-photo-item--c4r1 { left: 75.88%; top: 216px; }
.about-photo-item--c4r2 { left: 75.88%; top: 664px; }

/* ==========================================================================
   About — CTA banner ("Always exploring / see the world through my lens")
   ========================================================================== */
.about-cta-banner {
  background-color: var(--color-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
  padding: var(--section-padding-y) var(--pad-section-x);
}

/* Stagger heading — two lines in the same grid cell */
.about-cta-heading {
  display: inline-grid;
  grid-template-columns: max-content;
  grid-template-rows: max-content;
  line-height: 0;
  place-items: start;
}

.about-cta-heading > * {
  grid-column: 1;
  grid-row: 1;
}

.about-cta-heading__line1,
.about-cta-heading__line2 {
  font-family: var(--type-h4-family);
  font-size: var(--type-h4-size);
  font-weight: var(--type-h4-weight);
  line-height: var(--type-h4-line-height);
  letter-spacing: var(--type-h4-letter-spacing);
  color: var(--color-white);
  white-space: nowrap;
}

.about-cta-heading__line1 {
  margin-left: 0;
  margin-top: 0;
}

.about-cta-heading__line2 {
  margin-left: 117px;
  margin-top: 42px;
}

/* Word clip-reveal — toggled by IntersectionObserver on scroll */
.about-text.is-revealed .cases__word-inner,
.about-lead.is-revealed .cases__word-inner,
.services-intro.is-revealed .cases__word-inner,
.about-cta-banner.is-revealed .cases__word-inner,
.about-services.is-revealed .cases__word-inner {
  transform: translateY(0);
}

.about-lead.is-revealed .about-lead__chat-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Subhero subtitle — same clip-reveal; toggled when .subhero gets .is-revealed (about page) */
.subhero.is-revealed .subhero__subtitle .cases__word-inner {
  transform: translateY(0);
}
