/* ─────────────────────────────────────────────────────────────────────────
 * clever-prep-about.css
 * Page-scoped styles for /about/.
 *
 * Inspired by the Evermind about-b template:
 *   - Dark navy hero with parallax image grid + dot-grid backdrop
 *   - Dark statement + stats bands
 *   - Light team + timeline bands
 *
 * Brand uses --cp-navy (mid navy ~#28354A) for headlines, but for this
 * page's dark sections we use --cp-about-navy-dark (a deeper tone).
 * ─────────────────────────────────────────────────────────────────────── */

:root {
  --cp-about-navy-dark:    #131A26;   /* hero/statement/stats bg */
  --cp-about-navy-mid:     #1E2738;   /* slightly raised for image bg */
  --cp-about-on-dark:      #F4F1EB;   /* warm-white text on dark */
  --cp-about-on-dark-muted: rgba(244, 241, 235, 0.6);
}

/* ── 1. HERO ─────────────────────────────────────────────────────────── */
.cp-about-hero {
  position: relative;
  background: var(--cp-about-navy-dark);
  color: var(--cp-about-on-dark);
  min-height: 92vh;
  padding: clamp(80px, 14vw, 180px) clamp(20px, 5vw, 64px) clamp(60px, 10vw, 120px);
  overflow: hidden;
}
/* Override the .cp-r-dot-grid color for this dark section — we want pale dots */
.cp-about-hero {
  --cp-r-dot-color:   rgba(244, 241, 235, 0.55);
  --cp-r-dot-size:    24px;
  --cp-r-dot-opacity: 0.5;
}
.cp-about-hero__inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Parallax image layer fills the hero; children are absolutely positioned */
.cp-about-hero__images {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cp-about-hero__image-wrap {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  will-change: transform;
  transition: transform 0.05s linear;
}
.cp-about-hero__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
/* Position each of the 7 image slots around the heading */
.cp-about-hero__image-wrap--1 { top:  6%;  left:   8%; width: 150px; height: 130px; }
.cp-about-hero__image-wrap--2 { top: 50%;  left:   2%; width: 180px; height: 240px; transform: translateY(-50%); }
.cp-about-hero__image-wrap--3 { top: 72%;  left:  22%; width: 280px; height: 175px; }
.cp-about-hero__image-wrap--4 { top:  4%;  right:  6%; width: 240px; height: 185px; }
.cp-about-hero__image-wrap--5 { top: 38%;  right: 18%; width: 180px; height: 130px; }
.cp-about-hero__image-wrap--6 { top: 12%;  left:  32%; width: 150px; height: 130px; }
.cp-about-hero__image-wrap--7 { top: 60%;  right:  4%; width: 220px; height: 280px; }

/* Centered head — sits over the image grid */
.cp-about-hero__head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  max-width: 880px;
  padding: 0 16px;
}
.cp-about-hero__eyebrow {
  color: var(--cp-about-on-dark);
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cp-about-hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cp-orange, #EA8B3F);
}
.cp-about-hero__title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--cp-about-on-dark);
}

/* Mobile: scatter all 7 photos around the heading with side images
   bleeding off the edges, matching the Evermind about-b composition.
   Images frame the heading from all four quadrants — the title sits
   centered with z-index above so it overlaps the side images naturally. */
@media (max-width: 768px) {
  .cp-about-hero {
    min-height: 0;
    padding: clamp(70px, 14vw, 110px) 0 clamp(60px, 12vw, 100px);
  }
  .cp-about-hero__inner {
    min-height: clamp(760px, 150vw, 1000px);
    height: clamp(760px, 150vw, 1000px);
  }
  .cp-about-hero__images { opacity: 1; }

  /* ── Top quadrant ─────────────────────────────────────────── */
  /* Top-left: smaller square, slight left bleed */
  .cp-about-hero__image-wrap--1 { top:  4%; left:  -4%; width: 120px; height: 110px; transform: none; }
  /* Top-right: wider landscape */
  .cp-about-hero__image-wrap--4 { top:  6%; right: -3%; width: 150px; height: 110px; transform: none; }

  /* ── Heading band (sides) — these overlap the title via z-index ─── */
  /* Mid-left: tall portrait, bleeds off left edge */
  .cp-about-hero__image-wrap--2 { top: 32%; left:  -8%; width: 110px; height: 145px; transform: none; }
  /* Mid-right: landscape, bleeds off right edge */
  .cp-about-hero__image-wrap--5 { top: 36%; right: -6%; width: 130px; height: 100px; transform: none; }

  /* ── Bottom quadrant ──────────────────────────────────────── */
  /* Bottom-left: wide landscape */
  .cp-about-hero__image-wrap--3 { top: 70%; left:   6%; width: 160px; height: 100px; transform: none; }
  /* Bottom-center: small square accent */
  .cp-about-hero__image-wrap--6 { top: 86%; left:  42%; width:  72px; height:  90px; transform: none; }
  /* Bottom-right: portrait */
  .cp-about-hero__image-wrap--7 { top: 74%; right:  4%; width: 110px; height: 130px; transform: none; }

  /* Heading sits centered over the image scatter. Z-index from the
     desktop rule already puts it above the images. Constrain width
     so the side images are visible flanking the title. */
  .cp-about-hero__head {
    width: 100%;
    max-width: min(80%, 320px);
    margin: 0 auto;
    padding: 0 8px;
  }
  .cp-about-hero__title {
    font-size: clamp(34px, 9vw, 48px);
    letter-spacing: -0.02em;
  }
}
@media (max-width: 420px) {
  /* Very small phones — pull bleeds tighter and shrink slightly */
  .cp-about-hero__image-wrap--1 { width: 102px; height:  96px; left:  -6%; }
  .cp-about-hero__image-wrap--2 { width:  96px; height: 128px; left: -10%; }
  .cp-about-hero__image-wrap--3 { width: 140px; height:  88px; }
  .cp-about-hero__image-wrap--4 { width: 128px; height:  96px; right: -5%; }
  .cp-about-hero__image-wrap--5 { width: 112px; height:  88px; right: -8%; }
  .cp-about-hero__image-wrap--6 { width:  62px; height:  78px; left: 44%; }
  .cp-about-hero__image-wrap--7 { width:  96px; height: 114px; }
  .cp-about-hero__title { font-size: clamp(30px, 8.5vw, 40px); }
  .cp-about-hero__head { max-width: min(78%, 280px); }
}

/* ── 2. STATEMENT ──────────────────────────────────────────────────────── */
.cp-about-statement {
  background: var(--cp-about-navy-dark);
  color: var(--cp-about-on-dark);
  padding: clamp(60px, 10vw, 140px) clamp(20px, 5vw, 64px);
}
.cp-about-statement__inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.cp-about-statement__text {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--cp-about-on-dark);
}

/* ── 3. STATS (dark variant) ───────────────────────────────────────────── */
.cp-about-stats {
  background: var(--cp-about-navy-dark);
  color: var(--cp-about-on-dark);
  padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 64px) clamp(100px, 14vw, 180px);
}
.cp-about-stats__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}
.cp-about-stats__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  max-width: 720px;
}
.cp-about-stats__eyebrow {
  color: var(--cp-about-on-dark);
  opacity: 0.6;
}
.cp-about-stats__title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  margin: 0;
  color: var(--cp-about-on-dark);
  letter-spacing: -0.02em;
}
/* Force the stats recipe to render in on-dark colors when inside this section */
.cp-about-stats .cp-r-stats { padding: 0; }
.cp-about-stats .cp-r-stats__value { color: var(--cp-about-on-dark); }
.cp-about-stats .cp-r-stats__label { color: var(--cp-about-on-dark-muted); }

/* ── 4. TEAM (light) ───────────────────────────────────────────────────── */
.cp-about-team {
  background: #fff;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 64px);
}
.cp-about-team__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 56px);
}
.cp-about-team__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  max-width: 720px;
}
.cp-about-team__eyebrow { opacity: 0.6; }
.cp-about-team__title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin: 0;
  color: var(--cp-text-headline, #28354A);
  letter-spacing: -0.02em;
}
.cp-about-team__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.cp-about-team__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* The frame holds the aspect ratio + rounded corners; the photo fills it
   and gets the duotone SVG filter applied. The frame's ::after paints
   the halftone stipple on top via mix-blend-mode. */
.cp-about-team__photo-frame {
  width: 100%;
  aspect-ratio: 5 / 6;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cp-about-navy-dark, #131A26);
}
.cp-about-team__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-about-team__name {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin: 8px 0 0;
  color: var(--cp-text-headline, #28354A);
}
.cp-about-team__role {
  font-size: 14px;
  line-height: 1.4;
  color: var(--cp-text-secondary, #555);
  margin: 0;
}
@media (max-width: 1024px) { .cp-about-team__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .cp-about-team__grid { grid-template-columns: 1fr; } }

/* ── 5. TIMELINE (light) ───────────────────────────────────────────────── */
.cp-about-timeline {
  background: var(--cp-cream-bg, #f7f4ed);
  padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 64px);
}
.cp-about-timeline__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.cp-about-timeline__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  position: sticky;
  top: 100px;
}
.cp-about-timeline__eyebrow { opacity: 0.6; }
.cp-about-timeline__title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin: 0;
  color: var(--cp-text-headline, #28354A);
  letter-spacing: -0.02em;
}
/* Scroll-driven progress timeline:
 *  - The list itself draws ONE continuous gray rail (::before) and ONE
 *    orange progress fill (::after) whose height is set by JS via the
 *    --cp-tl-fill-px custom property.
 *  - Each row contributes only its dot (no per-row connecting line).
 *  - Rows past the scroll-trigger get .is-passed, which flips their dot
 *    from gray to orange in step with the fill. */
.cp-about-timeline__list {
  position: relative;
  display: flex;
  flex-direction: column;
}
.cp-about-timeline__list::before,
.cp-about-timeline__list::after {
  content: '';
  position: absolute;
  left: 120px;       /* aligns with the center of the __rail grid column */
  width: 2px;
  top: 36px;         /* start at first dot */
  pointer-events: none;
}
.cp-about-timeline__list::before {
  /* Gray base rail — runs the full list */
  bottom: 36px;
  background: rgba(40, 53, 74, 0.15);
}
.cp-about-timeline__list::after {
  /* Orange progress fill — height controlled by JS */
  height: var(--cp-tl-fill-px, 0px);
  max-height: calc(100% - 72px);
  background: var(--cp-orange, #EA8B3F);
  transition: height 0.12s linear;
}
.cp-about-timeline__row {
  display: grid;
  grid-template-columns: 80px 24px 1fr;
  gap: 28px;
  align-items: start;
  padding: 28px 0;
}
.cp-about-timeline__year {
  font-size: 13px;
  color: var(--cp-text-secondary, #555);
  padding-top: 4px;
  transition: color 0.4s ease;
}
.cp-about-timeline__row.is-passed .cp-about-timeline__year {
  color: var(--cp-text-headline, #28354A);
}
.cp-about-timeline__rail {
  position: relative;
  width: 24px;
  align-self: stretch;
  z-index: 1;
}
.cp-about-timeline__rail::before {
  /* The dot — gray by default, orange when row is .is-passed */
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(40, 53, 74, 0.2);
  transition: background 0.4s ease, transform 0.4s ease;
}
.cp-about-timeline__row.is-passed .cp-about-timeline__rail::before {
  background: var(--cp-orange, #EA8B3F);
  transform: translateX(-50%) scale(1.15);
}
.cp-about-timeline__row-title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--cp-text-headline, #28354A);
}
.cp-about-timeline__row-body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--cp-text-secondary, #555);
  margin: 0;
  max-width: 640px;
}
@media (max-width: 1024px) {
  .cp-about-timeline__inner { grid-template-columns: 1fr; }
  .cp-about-timeline__head { position: static; }
}

/* Mobile timeline: rail stays on the far left, content stacks (year on top,
   then title, then body) in a single column to the right. Replaces the
   desktop 3-col grid which crashed at narrow widths. */
@media (max-width: 600px) {
  .cp-about-timeline__list::before,
  .cp-about-timeline__list::after {
    left: 11px;          /* center of the 22px rail column on mobile */
    top: 28px;
  }
  .cp-about-timeline__list::before { bottom: 28px; }

  .cp-about-timeline__row {
    grid-template-columns: 22px minmax(0, 1fr);   /* minmax(0, 1fr) lets body text wrap */
    grid-template-areas:
      "rail year"
      "rail title"
      "rail body";
    gap: 4px 16px;
    padding: 22px 0;
  }
  .cp-about-timeline__rail {
    grid-area: rail;
    width: 22px;
    align-self: stretch;
  }
  .cp-about-timeline__year {
    grid-area: year;
    padding-top: 0;
    margin-bottom: 2px;
  }
  /* The Python builder wraps title + body in a __content div. Span both rows. */
  .cp-about-timeline__content {
    grid-area: title / title / body / body;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .cp-about-timeline__row-title { font-size: 20px; }
  .cp-about-timeline__row-body { font-size: 15px; max-width: none; }
}

/* ─── Final CTA — constrained card with dot-grid backdrop ───────────────── */
.cp-about-final-cta {
  /* Dot tuning — bright white dots on the orange band */
  --cp-r-dot-color: #ffffff;
  --cp-r-dot-size: 22px;     /* spacing between dots */
  --cp-r-dot-opacity: 0.35;
  /* Constrain card so the orange band isn't edge-to-edge */
  max-width: 1120px;
  margin: clamp(48px, 8vw, 96px) auto;
  overflow: hidden;
}
/* Make the ::before respect the rounded corners and sit ABOVE the orange bg
   but BELOW the content (which gets z-index: 1 from the dot-grid utility). */
.cp-about-final-cta.cp-r-dot-grid::before {
  border-radius: inherit;
  /* Bigger, softer dots for visibility on the warm background */
  background-image: radial-gradient(circle,
    var(--cp-r-dot-color) 1.6px,
    transparent 2.2px);
}
