/* ==========================================================================
   Casa Alba — About Me (#about)
   Full-width 50/50 split, 90vh tall, stacks on mobile.
   Left: parallax image filling the whole column.
   Right: #D9D8D0 panel; eyebrow pinned top, heading+paragraph pinned bottom.
   Fade-in timing lives in scripts/sections/about.js (CSS vars below are the
   tunable hooks it sets).
   ========================================================================== */

.about {
  position: relative;
  z-index: 1;                 /* scrolls over the pinned hero */
  width: 100%;
  height: 90vh;
  display: flex;

  /* Tunable hooks (defaults; about.js overrides from its CONFIG). */
  --about-parallax: 150px;    /* vertical parallax travel of the image      */
  --about-fade-dur: 800ms;    /* per-element fade-in duration               */
  --about-delay-1: 0ms;       /* label    */
  --about-delay-2: 200ms;     /* heading   */
  --about-delay-3: 400ms;     /* paragraph */
}

/* --- Left: parallax media ------------------------------------------------- */
.about__media {
  position: relative;
  width: 50%;
  overflow: hidden;           /* clip the over-tall image as it drifts */
}

/* Image is taller than the column by --about-parallax so it can drift
   vertically without ever revealing a gap above or below, at any width. */
.about__media-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + var(--about-parallax));
  object-fit: cover;
  object-position: center 70%;  /* weight the lower part of the image */
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* --- Right: content panel ------------------------------------------------- */
.about__content {
  width: 50%;
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* eyebrow top, block bottom */
  padding: clamp(2.25rem, 6vh, 4.5rem) clamp(2rem, 4vw, 4rem);
  padding-left: clamp(2.5rem, 5vw, 5rem);  /* sit away from the image */
}

.about__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-sm);
  color: var(--color-text-body);
}

/* Heading + paragraph stay one connected block, pinned to the bottom. */
.about__block {
  max-width: 40rem;
}

.about__heading {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

.about__para {
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
}

/* --- Staggered fade-in (triggered by .is-visible) ------------------------- */
.about__eyebrow,
.about__heading,
.about__para {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--about-fade-dur) ease,
    transform var(--about-fade-dur) ease;
}

.about.is-visible .about__eyebrow {
  opacity: 1;
  transform: none;
  transition-delay: var(--about-delay-1);
}
.about.is-visible .about__heading {
  opacity: 1;
  transform: none;
  transition-delay: var(--about-delay-2);
}
.about.is-visible .about__para {
  opacity: 1;
  transform: none;
  transition-delay: var(--about-delay-3);
}

/* --- Mobile: stack -------------------------------------------------------- */
@media (max-width: 768px) {
  .about {
    flex-direction: column;
    height: auto;
  }
  .about__media {
    width: 100%;
    height: 55vh;
  }
  .about__content {
    width: 100%;
    gap: var(--space-5);
    padding: clamp(2rem, 8vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about__eyebrow,
  .about__heading,
  .about__para {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
