/* ==========================================================================
   ElevatteLife — about.css
   About page only (loaded by about.php, scoped under body.page-about).
   Brand palette only: white, mint, deep green, a small orange accent.
   Matches the home page: same arch photo shape, spacing and reveals.
     1. Spacing system        4. How a consultation works (steps)
     2. My Story              5. What we believe (principles + callout)
     3. Pull quotes           6. Vision & Mission
   ========================================================================== */

/* --------------------------------------------------- 1. Spacing system --- */
/* Section padding: desktop 96 / tablet 72 / mobile 56. */
body.page-about {
  --section-y: 96px;
}

@media (max-width: 1024px) {
  body.page-about { --section-y: 72px; }
}

@media (max-width: 640px) {
  body.page-about { --section-y: 56px; }
}

/* Alternating bands: white, mint, white, mint, then the deep-green CTA. */
.page-about .ab-story,
.page-about .ab-beliefs {
  background: var(--surface);
}

.page-about .ab-process,
.page-about .ab-vision {
  background: var(--bg);
}

/* Slower, softer reveal on this page. */
.reveal-init .page-about [data-reveal] {
  transition-duration: 800ms;
}

/* ------------------------------------------------------------ Hero ----- */
/* The hero is the home page component (.hm-hero, home.css). Only the
   differences live here: shorter height, a leaf-shaped image, the badge. */
.page-about .ab-hero {
  --hm-header-h: 97px;   /* this page's header is taller than the home one */
  min-height: min(calc(100svh - var(--hm-header-h)), 640px);
}

.page-about .ab-hero__crumb {
  margin-bottom: 18px;
}

/* 4:5 image, max 440px wide, shrinks on short windows to stay above the fold. */
.page-about .ab-hero__frame {
  position: relative;
  z-index: 1;
  width: min(100%, 440px, calc((100svh - var(--hm-header-h, 81px) - 110px) * 4 / 5));
  min-width: 260px;
}

/* Rounded rectangle, like the original About hero frame. */
.page-about .ab-hero__leaf {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 60px -34px rgba(24, 32, 27, 0.35);
}

.page-about .ab-hero__leaf img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "Based in Pune" card: the home name card, label above the value. */
.page-about .ab-hero__badge {
  padding-left: 20px;
}

.page-about .ab-hero__badge::before {
  content: none;
}

.page-about .ab-hero__badge .hm-hero__card-role {
  font-size: 0.75rem;   /* 12px: on the type scale (was 11px) */
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .page-about .ab-hero {
    min-height: 0;
  }

  .page-about .ab-hero__crumb { order: 0; }

  .page-about .ab-hero .hm-hero__title {
    font-size: clamp(28px, 8.2vw, 36px);   /* ~32px at 390px */
  }

  /* Image max ~280px tall (224 x 280 at 4:5), centred. */
  .page-about .ab-hero__frame {
    width: 224px;
    min-width: 0;
    max-width: 100%;
  }

  .page-about .ab-hero__badge {
    left: -20px;
    right: auto;   /* the home mobile card stretches; this one hugs its text */
    bottom: 20px;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .page-about .ab-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ------------------------------------------------------- 2. My Story ----- */
/* Facts: one clean row of four under the intro (2 x 2 on mobile). */
.page-about .ab-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-block: 1px solid var(--line-brand);
}

.page-about .ab-fact {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px 24px;
  border-left: 1px solid var(--line-brand);
}

.page-about .ab-fact:first-child {
  border-left: 0;
  padding-left: 0;
}

.page-about .ab-fact dt {
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.page-about .ab-fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  color: var(--brand);
}

.page-about .ab-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 640px);
  justify-content: space-between;
  align-items: start;
  gap: 64px;
  margin-top: 64px;
}

/* Portrait: the home hero's arch (semicircle top, 24px bottom corners),
   mint-to-white gradient, transparent cutout filling it to the bottom. */
.page-about .ab-portrait {
  position: sticky;
  top: 112px;   /* under the sticky header */
  margin: 0;
}

.page-about .ab-portrait__arch {
  position: relative;
  aspect-ratio: 360 / 440;
  /* horizontal radius 50% of the width, vertical 180 / 440 of the height */
  border-radius: 50% 50% 24px 24px / 40.9% 40.9% 24px 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #D7EBDE 0%, #F4FAF6 70%, #FFFFFF 100%);
  box-shadow: 0 30px 60px -34px rgba(24, 32, 27, 0.35);
}

.page-about .ab-portrait__arch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.page-about .ab-portrait__id {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  text-align: center;
}

.page-about .ab-portrait__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--brand);
}

.page-about .ab-portrait__role {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Story: short chapters, 17px / 1.7, ~640px measure. */
.page-about .ab-chapters {
  max-width: 640px;
}

.page-about .ab-chapter + .ab-chapter {
  margin-top: 48px;
}

.page-about .ab-chapter h3 {
  margin: 0 0 16px;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  color: var(--brand);
}

.page-about .ab-chapter p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.page-about .ab-chapter p + p {
  margin-top: 16px;
}

/* ----------------------------------------------------- 3. Pull quotes ---- */
.page-about .ab-quote {
  margin: 28px 0;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
}

.page-about .ab-chapter .ab-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  color: var(--brand);
}

.page-about .ab-chapter .ab-quote:last-child {
  margin-bottom: 0;
}

/* ------------------------------------ 4. How a consultation works -------- */
.page-about .ab-steps {
  --dot: 56px;
  --gap: 32px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

/* Connecting line through the step dots; draws left to right on reveal. */
.page-about .ab-steps::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2 - 1px);
  left: calc(var(--dot) / 2);
  /* ends at the last dot's centre: one column + gap from the right edge,
     plus the dot's half width */
  right: calc((100% - 3 * var(--gap)) / 4 - var(--dot) / 2);
  height: 2px;
  background: var(--brand-mid);
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1600ms var(--ease-out) 300ms;
}

.page-about .ab-steps.is-visible::before,
html:not(.reveal-init) .page-about .ab-steps::before {
  transform: scaleX(1);
}

.page-about .ab-step {
  position: relative;
}

.page-about .ab-step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border: 2px solid var(--brand-mid);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
}

.page-about .ab-step__dot svg {
  width: 22px;
  height: 22px;
}

.page-about .ab-step__num {
  display: block;
  margin-top: 20px;
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  color: var(--accent);
}

.page-about .ab-step__title {
  margin: 4px 0 8px;
  font-size: 1.375rem;
  color: var(--brand);
}

.page-about .ab-step__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Steps arrive one after another once the row is visible. */
.reveal-init .page-about .ab-steps .ab-step {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out);
}

.reveal-init .page-about .ab-steps.is-visible .ab-step {
  opacity: 1;
  translate: 0 0;
}

.reveal-init .page-about .ab-steps .ab-step:nth-child(2) { transition-delay: 350ms; }
.reveal-init .page-about .ab-steps .ab-step:nth-child(3) { transition-delay: 700ms; }
.reveal-init .page-about .ab-steps .ab-step:nth-child(4) { transition-delay: 1050ms; }

/* ------------------------------------------- 5. What we believe ---------- */
.page-about .ab-principles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.page-about .ab-principle {
  padding: 24px 20px;
  border: 1px solid var(--line-brand);
  border-radius: 16px;
  background: var(--surface);
}

.page-about .ab-principle__num {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
  color: var(--brand-mid);
}

.page-about .ab-principle__title {
  margin: 12px 0 8px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: var(--fw-semibold);
  color: var(--brand);
}

.page-about .ab-principle__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* The one highlighted note. */
.page-about .ab-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--brand);
  color: rgba(255, 255, 255, 0.86);
}

.page-about .ab-callout p {
  margin: 0;
  max-width: 80ch;
  line-height: 1.65;
}

.page-about .ab-callout strong {
  color: #fff;
}

.page-about .ab-callout__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.page-about .ab-callout__icon svg {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------ 6. Vision & Mission ---------- */
.page-about .ab-vision__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;   /* equal height */
}

.page-about .ab-vcard {
  display: flex;
  flex-direction: column;
  padding: 36px;
  border: 1px solid var(--line-brand);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-about .ab-vcard__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--brand);
}

.page-about .ab-vcard__icon svg {
  width: 22px;
  height: 22px;
}

.page-about .ab-vcard__label {
  margin: 20px 0 0;
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-about .ab-vcard__title {
  margin: 8px 0 12px;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.3;
  color: var(--brand);
}

.page-about .ab-vcard p:not(.ab-vcard__label) {
  margin: 0;
  line-height: 1.7;
  color: var(--ink-2);
}

.page-about .ab-vcard .arrow-link {
  margin-top: auto;
  padding-top: 24px;
}

/* -------------------------------------------------------- Responsive ----- */
@media (max-width: 1100px) {
  .page-about .ab-principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-about .ab-story__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    margin-top: 48px;
  }

  .page-about .ab-portrait {
    position: static;
    width: 280px;
    max-width: 100%;
    margin-inline: auto;
  }

  .page-about .ab-chapters {
    max-width: 62ch;   /* readable measure on tablets too (was full width, ~90 chars) */
  }

  /* Steps stacked, the line running down through the dots. */
  .page-about .ab-steps {
    --dot: 48px;
    --gap: 28px;
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stacked: one connector per step, from its dot down to the next dot,
     so the line never runs past the last step. */
  .page-about .ab-steps::before {
    content: none;
  }

  .page-about .ab-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: var(--dot);
    bottom: calc(var(--gap) * -1);
    left: calc(var(--dot) / 2 - 1px);
    width: 2px;
    background: var(--brand-mid);
    opacity: 0.35;
    transform: scaleY(0);
    transform-origin: center top;
    transition: transform 600ms var(--ease-out) 300ms;
  }

  .page-about .ab-steps.is-visible .ab-step::after,
  html:not(.reveal-init) .page-about .ab-step::after {
    transform: scaleY(1);
  }

  .page-about .ab-steps .ab-step:nth-child(2)::after { transition-delay: 650ms; }
  .page-about .ab-steps .ab-step:nth-child(3)::after { transition-delay: 1000ms; }

  .page-about .ab-step {
    display: grid;
    grid-template-columns: var(--dot) minmax(0, 1fr);
    column-gap: 20px;
  }

  .page-about .ab-step__dot {
    grid-row: span 3;
  }

  .page-about .ab-step__num {
    margin-top: 2px;
  }

  .page-about .ab-step__dot svg {
    width: 20px;
    height: 20px;
  }

  .page-about .ab-vision__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .page-about .ab-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-about .ab-fact,
  .page-about .ab-fact:first-child {
    padding: 16px 12px 16px 0;
    border-left: 0;
  }

  .page-about .ab-fact:nth-child(even) {
    padding-left: 16px;
    border-left: 1px solid var(--line-brand);
  }

  .page-about .ab-fact:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-brand);
  }

  .page-about .ab-fact dd {
    font-size: 1.0625rem;
  }

  .page-about .ab-principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .page-about .ab-principle {
    padding: 20px;
  }

  .page-about .ab-callout {
    flex-direction: column;
    padding: 22px;
  }

  .page-about .ab-vcard {
    padding: 26px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-about .ab-step::after,
  .page-about .ab-steps::before {
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------- Usability audit fixes ---- */
/* 1. Type scale: 10 sizes (12/13/15/16/17/20/24/32/40/64). One-off sizes
      snapped to their neighbours. */
.page-about .ab-portrait__role { font-size: 0.8125rem; }   /* 14 -> 13 */
.page-about .ab-fact dd { font-size: 1.25rem; }             /* 19 -> 20 */
.page-about .ab-step__title,
.page-about .ab-chapter h3,
.page-about .ab-vcard__title { font-size: 1.5rem; }         /* 22/26 -> 24 */
.page-about .ab-chapter .ab-quote p { font-size: 2rem; }    /* clamp -> 32 */

@media (min-width: 641px) {
  .page-about .hm-hero__lead { font-size: 1.0625rem; }      /* ~19 -> 17 */
}

@media (max-width: 640px) {
  .page-about .ab-step__title,
  .page-about .ab-chapter h3,
  .page-about .ab-vcard__title { font-size: 1.25rem; }      /* 20 on phones */
  .page-about .ab-chapter .ab-quote p { font-size: 1.5rem; } /* 24 on phones */
}

/* 2. Radii: cards and badges share 18px (--r-media); small icon tiles use
      the 10px control radius (was 14 / 16 / 18 / 20). */
.page-about .ab-hero__badge,
.page-about .ab-principle,
.page-about .ab-callout,
.page-about .ab-vcard { border-radius: var(--r-media); }
.page-about .ab-vcard__icon { border-radius: var(--r-sm); }

/* 4. Story text: comfortable 45-75 character measure. */
.page-about .ab-chapters { max-width: 62ch; }

/* 5. Sequence numbers: one style in both lists (deep green, display face,
      20px semibold) instead of small orange caps vs green numerals. */
.page-about .ab-step__num,
.page-about .ab-principle__num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
  color: var(--brand-mid);
}
