/* ══════════════════════════════════════════════════
   About Page — KMC+LUCAS
   ══════════════════════════════════════════════════ */

:root {
  --ab-cream:  #f4f3ef;
  --ab-olive:  #645d45;
  --ab-red:    #c21f1f;
  --ab-dark:   #111111;
  --ab-ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --ab-dur:    0.55s;
}

/* ─── Base ─────────────────────────────────────── */
.page-about {
  background: var(--ab-cream);
  color: var(--ab-olive);
  font-family: 'Fustat', 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ──────────────────────────────────────── */
.ab-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 40px var(--gutter, clamp(24px, 4vw, 64px)) 0;
  max-height: 120px;
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  transition:
    transform 320ms var(--ab-ease),
    opacity 220ms ease;
}

.ab-nav.is-collapsed {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.ab-nav__logo,
.ab-nav__menu,
.ab-nav__links {
  pointer-events: auto;
}

.ab-nav__logo {
  flex-shrink: 0;
  line-height: 0;
}

.ab-nav__logo img {
  display: block;
  height: 17px;
  width: auto;
  opacity: 0.95;
  transition: opacity 0.25s;
}

.ab-nav__logo:hover img { opacity: 0.75; }

.ab-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.3vw, 48px);
  margin-left: auto;
}

.ab-nav__link {
  font-family: 'Fustat', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ab-olive);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.ab-nav__link:hover {
  opacity: 0.65;
}

.ab-nav__link--active {
  color: var(--ab-red);
}

.ab-nav__menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: clamp(16px, 2vw, 32px);
  mix-blend-mode: exclusion;
}

.ab-nav__menu img { display: block; filter: invert(1); opacity: 0.6; }

/* ─── Hero ──────────────────────────────────────── */
.ab-hero {
  position: relative;
  padding: clamp(100px, 12vh, 140px) clamp(48px, 5vw, 80px) clamp(60px, 8vh, 100px);
  min-height: 80vh;
}

.ab-hero__title {
  margin: 0 0 clamp(24px, 3vh, 40px);
  font-family: 'Fustat', sans-serif;
  font-size: clamp(80px, 12vw, 170px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--ab-olive);
}

.ab-hero__word { display: block; }

.ab-hero__sub {
  max-width: 460px;
  margin: 0;
  margin-left: clamp(200px, 30%, 540px);
  font-family: 'Fustat', sans-serif;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.05em;
  color: var(--ab-olive);
}

.ab-hero__talk {
  position: fixed;
  right: clamp(18px, 2.2vw, 34px);
  bottom: clamp(18px, 2.2vw, 34px);
  display: block;
  width: clamp(88px, 8.75vw, 126px);
  height: clamp(88px, 8.75vw, 126px);
  z-index: 102;
  transition: none;
}

.ab-hero__talk img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ─── Team section ──────────────────────────────── */
.ab-team {
  padding: clamp(40px, 6vh, 80px) clamp(48px, 5vw, 80px) clamp(80px, 12vh, 140px);
}

.ab-team__intro {
  display: grid;
  grid-template-columns: clamp(100px, 14%, 180px) 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  margin-bottom: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(24px, 3vh, 40px);
  border-top: 1px solid rgba(100, 93, 69, 0.2);
  padding-top: clamp(20px, 2.5vh, 32px);
}

.ab-team__heading {
  font-family: 'Fustat', sans-serif;
  font-size: clamp(14px, 1.1vw, 20px);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-transform: capitalize;
  color: var(--ab-red);
  margin: 0;
  padding-top: 6px;
}

.ab-team__body {
  font-family: 'Fustat', sans-serif;
  font-size: clamp(15px, 1.9vw, 28px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.05em;
  color: var(--ab-olive);
  margin: 0;
}

/* ─── Equation — typewriter ─────────────────────── */
.ab-equation {
  margin: 0 0 clamp(48px, 7vw, 96px);
  padding: clamp(28px, 4vh, 52px) 0;
  border-top: 1px solid rgba(100, 93, 69, 0.2);
  border-bottom: 1px solid rgba(100, 93, 69, 0.2);
  /* Collapses itself away after the line finishes typing (see .is-collapsed) */
  overflow: hidden;
  max-height: 600px;
  transition:
    max-height 0.6s var(--ease-std, cubic-bezier(0.16, 1, 0.3, 1)),
    padding 0.6s var(--ease-std, cubic-bezier(0.16, 1, 0.3, 1)),
    margin 0.6s var(--ease-std, cubic-bezier(0.16, 1, 0.3, 1)),
    border-color 0.45s ease,
    opacity 0.45s ease;
}

.ab-equation.is-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  border-color: transparent;
  opacity: 0;
}

/* The line is sized by a hidden full-text "sizer" so the box holds its final
   (wrapped) height from the start — the typed text overlays it absolutely,
   so revealing characters never reflows the page. */
.ab-equation__line {
  position: relative;
  margin: 0;
  font-family: 'Space Mono', ui-monospace, 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: clamp(22px, 3vw, 46px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ab-olive);
}

.ab-equation__op,
.ab-equation__eq {
  font-weight: 700;
}

.ab-equation__result {
  font-weight: 700;
}

.ab-equation__sizer {
  visibility: hidden;
}

.ab-equation__typed {
  position: absolute;
  inset: 0;
}

.ab-equation__op,
.ab-equation__eq {
  color: var(--ab-red);
}

/* Result phrase after = — the "answer", in brand red */
.ab-equation__result {
  color: var(--ab-red);
}

/* Blinking caret that trails the typed text */
.ab-equation__caret {
  display: inline-block;
  width: 0.07em;
  height: 0.86em;
  margin-left: 0.04em;
  background: var(--ab-red);
  vertical-align: -0.06em;
  animation: ab-caret-blink 0.9s steps(1) infinite;
}

@keyframes ab-caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ab-equation__caret { animation: none; opacity: 0; }
}

/* ─── Team grid ─────────────────────────────────── */
.ab-team__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.4vw, 40px);
  align-items: start;
}

@media (max-width: 900px) {
  .ab-team__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(20px, 4vw, 40px);
  }
}

/* ─── Member card ───────────────────────────────── */
.ab-member {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Lucas: pushed down */
.ab-member--offset {
  margin-top: clamp(40px, 5vw, 80px);
}

/* Lin: pulled up slightly */
.ab-member--up {
  margin-top: clamp(-20px, -2vw, -10px);
}

.ab-member__img-wrap {
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.ab-member__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(100%);
  transform: scale(1);
  transition:
    filter var(--ab-dur) var(--ab-ease),
    transform var(--ab-dur) var(--ab-ease);
}

/* Lucas portrait: the source photo has dead black space above the head, so
   centering sits him low. Anchor to the bottom + zoom slightly to lift him up
   and let the figure fill ~2/3 of the frame. */
.ab-member:nth-child(2) .ab-member__img {
  object-position: center bottom;
  transform: scale(1.28);
  transform-origin: center bottom;
}
.ab-member:nth-child(2):hover .ab-member__img {
  transform: scale(1.31);
}

/* Eason portrait: seated pose, focus upper body */
.ab-member:nth-child(4) .ab-member__img {
  object-position: center 15%;
}

.ab-member:hover .ab-member__img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.ab-member__info { padding: 0; }

.ab-member__role {
  font-family: 'Fustat', sans-serif;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-transform: capitalize;
  color: var(--ab-olive);
  margin: 0 0 4px;
}

.ab-member__name {
  font-family: 'Fustat', sans-serif;
  font-size: clamp(20px, 2vw, 34px);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-transform: capitalize;
  color: var(--ab-red);
  margin: 0 0 8px;
}

.ab-member__cn {
  font-weight: 600;
}

.ab-member__desc {
  font-family: 'Fustat', sans-serif;
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.04em;
  color: var(--ab-red);
  margin: 0;
  max-width: 260px;
}

/* ─── Bottom CTA ─────────────────────────────────── */
.ab-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(60px, 8vh, 100px);
}

.ab-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.ab-cta__svg {
  display: block;
  width: clamp(80px, 8vw, 120px);
  transition: transform 0.4s var(--ab-ease);
}

.ab-cta:hover .ab-cta__svg {
  transform: rotate(10deg) scale(1.08);
}

.ab-cta__label {
  font-family: 'Fustat', sans-serif;
  font-size: clamp(20px, 2.5vw, 45px);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-transform: capitalize;
  color: var(--ab-red);
}

/* ─── Scroll reveal ──────────────────────────────── */
[data-ab-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.72s var(--ab-ease),
    transform 0.72s var(--ab-ease);
}

[data-ab-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.ab-member:nth-child(1)[data-ab-reveal] { transition-delay: 0s; }
.ab-member:nth-child(2)[data-ab-reveal] { transition-delay: 0.1s; }
.ab-member:nth-child(3)[data-ab-reveal] { transition-delay: 0.2s; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 960px) {
  .ab-team__intro {
    grid-template-columns: 1fr;
  }
  .ab-team__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ab-member--offset { margin-top: clamp(24px, 4vw, 48px); }
  .ab-member--up { margin-top: 0; }
  .ab-member:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 380px;
  }
}

@media (max-width: 1023px) {
  .ab-nav {
    padding-top: 24px;
  }
  .ab-nav__links { display: none; }
  .ab-nav__menu { margin-left: auto; }
}

@media (max-width: 600px) {
  /* Drop the 80vh reservation so the founding-team section follows the intro
     copy directly instead of leaving a tall empty gap. */
  .ab-hero {
    min-height: auto;
    padding-bottom: clamp(32px, 6vh, 56px);
  }
  .ab-hero__sub { margin-left: 0; }
  .ab-hero__talk {
    right: 14px;
    bottom: 14px;
    width: 88px;
    height: 88px;
  }
  .ab-team__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .ab-member--offset,
  .ab-member--up { margin-top: 0; }
  .ab-member:nth-child(3) { max-width: 100%; }

  /* Phones: portraits always show in full colour, and tapping does nothing
     (no grayscale toggle, no zoom) — removes the sticky tap-to-recolour. */
  .ab-member__img,
  .ab-member:hover .ab-member__img {
    filter: none;
  }
  .ab-member:hover .ab-member__img {
    transform: none;
  }
  .ab-member:nth-child(2) .ab-member__img,
  .ab-member:nth-child(2):hover .ab-member__img {
    transform: scale(1.28);
    transform-origin: center bottom;
  }
}
