/* ============================================================
   About page — additive layer on top of styles.css.
   Sections:
     1. Page-level overrides (allow scrolling)
     2. Background image + scrim
     3. Hero (portrait + bio)
     4. Clients ("Proud to Partner With" + logos)
     5. Active-nav indicator
   ============================================================ */


/* -------------------------------------------------------
   1. Page-level overrides
   styles.css locks the homepage at 100vh / overflow hidden.
   The about page needs to scroll, so re-enable that here.
   ------------------------------------------------------- */
/* Allow the document to scroll naturally on these pages — base
   styles.css locks html/body to 100vh/overflow:hidden for the
   homepage, so we override with overflow:visible here. Nested
   overflow:auto on both html and body confuses iOS Safari and
   can leave scroll completely stuck. */
html {
  height: auto;
  width: auto;
  overflow: visible;
}
body {
  height: auto;
  min-height: 100vh;
  width: auto;
  overflow-x: hidden;
  overflow-y: visible;
}


/* -------------------------------------------------------
   2. Background image + scrim
   ------------------------------------------------------- */
.about-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.about-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('../images/about/20190427-200456-A9108811.jpg');
  background-size: cover;
  background-position: center;
}
.about-bg-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.42) 0%, rgba(10, 9, 8, 0.62) 100%);
}


/* -------------------------------------------------------
   3. Hero — portrait + bio
   ------------------------------------------------------- */
.about-page {
  position: relative;
  z-index: 5;
  padding: 140px 8vw 60px;
  min-height: 100vh;
}

.about-hero {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 0 100px;
}

.about-portrait {
  position: relative;
  overflow: hidden;       /* clip the scaled image to the original frame */
  cursor: pointer;
}
.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.15) contrast(1.05);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.about-portrait:hover img {
  transform: scale(1.06);
}

.about-bio h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--fg);
  margin-bottom: 32px;
}
.about-bio h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
}

.about-bio p {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(236, 230, 217, 0.82);
  margin-bottom: 18px;
  max-width: 60ch;
}


/* -------------------------------------------------------
   4. Clients — "Proud to Partner With" + logos
   ------------------------------------------------------- */
.clients {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 0 64px;
  text-align: center;
}

.clients-heading {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 32px;
  display: inline-block;
}

.client-logos {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.logo-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.logo-row img {
  height: 60px;
  max-width: 150px;
  object-fit: contain;
  /* Knock everything to a uniform white silhouette so the row reads as a
     coherent set rather than 16 different brand colors. */
  filter: brightness(0) invert(1);
  opacity: 0.6;
  transition: opacity 0.35s ease;
}
.logo-row img:hover {
  opacity: 1;
}


/* -------------------------------------------------------
   5. Fade-up entrance animation
   Each .fade-up element starts hidden and offset down a touch; when
   IntersectionObserver adds .is-in (in about.js), it transitions to its
   final state. Per-element stagger via the `--fade-delay` CSS variable.
   ------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease var(--fade-delay, 0s),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--fade-delay, 0s);
}
.fade-up.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* -------------------------------------------------------
   6. Active-nav indicator
   Highlights the current page in the desktop topnav.
   ------------------------------------------------------- */
.topnav a.is-current {
  color: #fff;
}
.topnav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left center;
}


/* -------------------------------------------------------
   Responsive
   ------------------------------------------------------- */
@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 320px 1fr;
    gap: 48px;
  }
  .logo-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .logo-row img {
    height: 48px;
    max-width: 120px;
  }
}

@media (max-width: 640px) {
  .about-page {
    padding: 110px 6vw 40px;
  }
  .about-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 0 40px;
    text-align: center;
  }
  .about-portrait {
    max-width: 320px;
    margin: 0 auto;
  }
  .about-bio p {
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
    max-width: 320px;
    text-align: left;
  }
  .clients {
    padding: 28px 0 90px;
  }
  .clients-heading {
    margin-bottom: 24px;
    font-size: 10px;
    letter-spacing: 0.24em;
  }
  /* On mobile, flatten the two .logo-row rows into one 2-column grid of
     all 16 logos so they tile uniformly instead of wrapping unevenly. */
  .client-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 18px;
    align-items: center;
    justify-items: center;
  }
  .logo-row {
    display: contents;
  }
  .logo-row img {
    height: 40px;
    max-width: 100px;
  }
}
