/* ============================================================
   SDM School — About
   Figma: SDM School Website Final / ABOUT DESIGN (1440 × 7189)
   Shared tokens, header, pills, CTA and footer live in styles.css.
   ============================================================ */

.page-about {
  --caveat: 'Caveat', 'Comic Sans MS', cursive;
  --nav-ink: #3934c9;   /* the About frame sets its menu in blue */
}

/* The photo, waves and timeline art run past the frame edges on
   purpose; clip them so the page never scrolls sideways. */
.page-about main { overflow-x: clip; }

/* ============================================================
   Philosophy — handwritten note on paper, the campus beneath
   ============================================================ */
.philosophy {
  position: relative;
  isolation: isolate;
  padding-top: calc(var(--hero-gap) + clamp(28px, 2.8vw, 40px));   /* header, then a little room above the quote */
}

/* Paper texture fades in and out at its top and bottom edges. */
.paper {
  position: absolute;
  inset: 40px 0 auto;
  height: 1304px;
  z-index: -1;
  background: url('../assets/figma/about/paper-texture.png') center / cover no-repeat;
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 76%, transparent 90%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 76%, transparent 90%);
}

.philosophy-copy {
  max-width: 928px;
  padding-inline: 20px;
  text-align: center;
}

.philosophy-quote p {
  font-size: clamp(24px, 3.06vw, 44px);
  font-weight: 700;
  line-height: 1.22;
  color: var(--navy);
}

.philosophy-note {
  margin-top: clamp(40px, 4.9vw, 70px);
  font-family: var(--caveat);
  font-size: clamp(24px, 2.78vw, 40px);
  line-height: 1.23;
  color: var(--grey-dark);
}
.philosophy-note p + p { margin-top: 1.23em; }

/* The scan has a white ground; multiply drops it so only the ink
   sits on the paper texture. */
.philosophy-signature {
  width: min(466px, 70%);
  height: auto;
  margin: clamp(12px, 2vw, 28px) auto 0;
  mix-blend-mode: multiply;
}

/* The aerial photo is masked to fade up into the paper and curve
   away at its foot, like the design's vector mask. */
.campus-photo {
  position: relative;
  width: 107.85%;
  margin: clamp(60px, 9vw, 130px) 0 0 -5.97%;
  aspect-ratio: 1553 / 917;
  background: url('../assets/sdm-school-building.jpg') 55.9% 31.3% / 108.2% auto no-repeat;
  /* Inlined (from assets/figma/about/school-mask.svg): browsers refuse
     an external SVG mask from another origin, including file://. */
  --school-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1553 917.251' preserveAspectRatio='none'><defs><linearGradient id='g' x1='777' y1='27.5' x2='777' y2='357' gradientUnits='userSpaceOnUse'><stop stop-color='%23000' stop-opacity='0'/><stop offset='1' stop-color='%23000'/></linearGradient></defs><path fill='url(%23g)' d='M5.78 839.46C5.78 839.46-7.22 0 5.78 0S110.16 0 725.26 0C1195.77 0 1519.78 0 1542.78 0S1542.78 839.46 1542.78 839.46C1323.81 903.98 964.2 917.25 738.5 917.25S228.28 894.34 5.78 839.46Z'/></svg>");
  -webkit-mask: var(--school-mask) 0 0 / 100% 100% no-repeat;
          mask: var(--school-mask) 0 0 / 100% 100% no-repeat;
}

/* ============================================================
   Our journey — a sideways timeline driven by page scroll
   ============================================================ */
.journey { margin-top: 110px; }

.journey-title {
  padding-left: 123px;
  font-size: var(--fs-title);
  line-height: 0.98;
  color: var(--blue);
}

.journey-viewport {
  position: relative;
  margin-top: -37px;
  overflow: hidden;
}

/* Pinned mode (set by about.js above phone width): the section is
   stretched to 100vh + the sideways distance, and its contents stick
   to the screen while the page scroll drives the track. */
.journey.is-pinned .journey-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;           /* clears the slim sticky header */
  overflow: hidden;
}
.journey.is-pinned .journey-viewport { margin-top: 12px; flex: none; }
.journey.is-pinned .journey-track { transform-origin: 0 0; }
.journey-viewport:focus-visible { outline-offset: -3px; }

.journey-track {
  position: relative;
  width: 2880px;
  height: 660px;
  margin-left: max(0px, calc((100vw - var(--frame)) / 2));
  list-style: none;
  will-change: transform;
}

.journey-art { position: absolute; inset: 0; pointer-events: none; }
.journey-line {
  position: absolute;
  left: -5px;
  top: 139px;
  width: 2863px;
  max-width: none;
  height: 313px;
}
.journey-shape {
  position: absolute;
  max-width: none;
  height: auto;
}

.milestone-year {
  position: absolute;
  left: var(--x);
  top: var(--year);
  transform: translateY(-50%);
  font-size: 74.7px;
  font-weight: 700;
  line-height: 1;
  color: #e34c39;
  white-space: nowrap;
}
.milestone--today .milestone-year { color: var(--pink); }

.milestone-copy {
  position: absolute;
  left: calc(var(--x) + 4px);
  top: var(--text);
  width: 255px;
  transform: translateY(-50%);
  color: var(--grey-dark);
}
.milestone-copy--wide { width: 300px; }
.milestone-copy strong {
  display: block;
  font-size: var(--fs-h5);
  line-height: 1.22;
}
.milestone-copy p {
  margin-top: 29px;
  font-size: var(--fs-body);
  line-height: 1.22;
}

/* ============================================================
   A trusted name — headline numbers
   ============================================================ */
.trust { margin-top: 182px; }

.trust-title {
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: 20px;
  font-size: var(--fs-title);
  line-height: 1;
  color: var(--pink);
  text-align: center;
}

.trust-stats {
  display: grid;
  grid-template-columns: 211px 311px 366px auto;
  margin: 57px 0 0 175px;
}
.trust-stats li { display: flex; flex-direction: column; }

.trust-num {
  font-size: clamp(44px, 4.45vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.trust-label {
  margin-top: 11px;
  font-size: var(--fs-lede);
  line-height: 1.22;
  color: var(--grey-dark);
}

/* ============================================================
   What guides us — on a tilted pink wave
   ============================================================ */
.guides {
  position: relative;
  isolation: isolate;
  margin-top: 40px;
}

.guides-wave {
  position: absolute;
  left: -23.1%;
  top: -168px;
  width: 133.7%;
  z-index: -1;
  transform: rotate(-6.64deg);
  pointer-events: none;
}
.guides-wave img { width: 100%; height: auto; }

.guides-inner { min-height: 580px; }

.guides-character {
  position: absolute;
  left: 16px;
  top: 107px;
  width: clamp(260px, 38vw, 548px);
  height: auto;
}

.guides-star {
  position: absolute;
  left: 1220px;
  top: 102px;
  width: 121px;
  opacity: 0.11;
  transform: rotate(26deg);
}

.guides-copy {
  position: relative;
  padding: 202px 20px 60px 551px;
}

.guides-title {
  font-size: var(--fs-title);
  line-height: 1.15;
  color: var(--navy);
}

.guides-cols {
  display: grid;
  grid-template-columns: 298px 240px;
  column-gap: 75px;
  margin-top: 25px;
}
.guides-cols h3 {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.2;
  color: #e34c39;
}
.guides-cols p {
  margin-top: 14px;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  line-height: 1.22;
  color: var(--grey);
}

/* ============================================================
   The SDM way — Play, Peak, Pivot
   ============================================================ */
.way { margin-top: 0; }

.way-inner { padding-top: 37px; }

.way-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.way-confetti img { position: absolute; height: auto; }

.way-title {
  font-size: var(--fs-title);
  line-height: 1.2;
  color: var(--blue);
  text-align: center;
}

.way-board {
  position: relative;
  margin-top: 86px;
  min-height: 866px;
}

.way-blob {
  position: absolute;
  left: 859px;
  top: 0;
  width: 481px;
  height: auto;
  z-index: -1;
}

.way-list {
  position: relative;
  padding-top: 26px;
}

.way-row {
  display: grid;
  grid-template-columns: 1fr 572px;
  column-gap: 114px;
  align-items: center;
  min-height: 227px;
}

.way-text {
  justify-self: end;
  max-width: 476px;
}
.way-text h3 {
  font-size: var(--fs-h2);
  line-height: 1.4;
  color: var(--caption);
  transition: color 0.6s var(--ease);
}
.way-text p {
  margin-top: 4px;
  max-width: 346px;
  font-size: var(--fs-small);
  line-height: 1.22;
  color: rgba(96, 96, 96, 0.5);
  transition: color 0.6s var(--ease);
}
.way-row--pivot .way-text p { max-width: 476px; }

.way-word {
  font-size: clamp(88px, 11.1vw, 160px);
  line-height: 1;
  color: var(--word);
  transform-origin: left center;
  transition: transform 0.7s var(--ease-out);
}

.way-row--play  { --word: #e44c39; --caption: rgba(236, 111, 45, 0.5); --caption-on: #ec6f2d; }
.way-row--peak  { --word: #3a34d2; --caption: rgba(228, 76, 57, 0.5);  --caption-on: #e44c39; }
.way-row--pivot { --word: #e2567f; --caption: rgba(57, 52, 201, 0.5);  --caption-on: #3934c9; }

/* The row in the middle of the screen (or under the pointer) lights up. */
.way-row.is-active .way-text h3,
.way-row:hover .way-text h3 { color: var(--caption-on); }
.way-row.is-active .way-text p,
.way-row:hover .way-text p { color: var(--grey-dark); }
.way-row.is-active .way-word,
.way-row:hover .way-word { transform: scale(1.04); }

.motto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  padding-inline: 20px;
}
.motto-sanskrit { width: min(425px, 80%); }
.motto-english { width: min(624px, 100%); }

/* ============================================================
   Guardians of SDM
   ============================================================ */
.guardians { margin-top: 237px; }

.guardians-title {
  font-size: var(--fs-title);
  line-height: 1.2;
  color: var(--blue);
  text-align: center;
}

.guardian-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 166px;
  row-gap: 65px;
  margin-top: 63px;
  padding-inline: 20px;
}
.guardian-list > .guardian { margin-inline: 39px; }   /* two rows of two */
.guardian-break { flex-basis: 100%; height: 0; }

.guardian {
  width: 253px;
  text-align: center;
}
.guardian img {
  width: 253px;
  height: 246px;
  object-fit: cover;
  border-radius: 40px;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.guardian:hover img {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -24px rgba(55, 76, 159, 0.55);
}
.guardian-name {
  margin-top: 15px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: 1.22;
  color: #e34c39;
  white-space: nowrap;
}
.guardian-role {
  font-size: var(--fs-body-sm);
  line-height: 1.22;
  color: var(--grey-dark);
}
.guardian-role--light { font-weight: 300; }

/* ============================================================
   Call to action (extends .join from styles.css)
   ============================================================ */
.join--about {
  margin-top: 139px;
  padding: 176px 20px 109px;
}
.join--about::before {
  left: -22.6%;
  width: 172.8%;
  --join-wave: url('../assets/figma/about/cta-wave.svg');
}
.join--about .join-title { max-width: 1065px; margin-inline: auto; }
.join--about .join-copyright { top: 111px; }

.join-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 31px;
}
.join-btn {
  min-width: 221px;
  min-height: 53px;
  padding: 12px 22px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1380px) {
  .way-confetti,
  .guides-star { display: none; }

  .guides-character { width: clamp(240px, 30vw, 420px); top: 140px; }
  .guides-copy { padding-left: max(38%, 300px); }
  .guides-cols { grid-template-columns: repeat(2, minmax(0, 298px)); column-gap: 40px; }

  .way-row { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .way-blob { left: 50%; width: clamp(300px, 33vw, 481px); }

  .trust-stats {
    grid-template-columns: repeat(4, auto);
    justify-content: space-around;
    margin-left: 0;
    padding-inline: 20px;
  }

  .guardian-list { column-gap: 60px; }
  .guardian-list > .guardian { margin-inline: 0; }
}

/* Without scroll-driven motion the timeline is a native sideways
   scroller. */
.journey-viewport.is-native {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .journey-title { padding-left: 24px; }

  .trust-stats { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }

  /* Character above, copy below. */
  .guides-inner { min-height: 0; padding-top: 40px; }
  .guides-character { position: static; width: 240px; margin: 0 auto; }
  .guides-copy { padding: 16px 24px 80px; text-align: center; }
  .guides-cols { grid-template-columns: 1fr; row-gap: 28px; max-width: 420px; margin-inline: auto; }
  .guides-wave { top: 0; left: -40%; width: 180%; }

  .way-board { min-height: 0; margin-top: 40px; }
  .way-blob { left: 52%; top: 20px; width: 260px; }
  .way-list { padding: 0 24px; }
  .way-row { grid-template-columns: 1fr; row-gap: 4px; min-height: 0; padding-block: 24px; text-align: center; }
  .way-text { justify-self: center; order: 2; }
  .way-text p { margin-inline: auto; }
  .way-word { order: 1; transform-origin: center; }
  .motto { margin-top: 48px; }

  .guardians { margin-top: 120px; }
  .guardian-list { column-gap: 32px; row-gap: 40px; }
  .guardian-break { display: none; }
}

/* Phones: the timeline becomes a simple vertical list. */
@media (max-width: 640px) {
  .journey-viewport { margin-top: 24px; overflow: visible; }
  .journey-track {
    width: auto;
    height: auto;
    margin-left: 0;
    padding: 0 24px;
    transform: none !important;
    border-left: 3px solid rgba(236, 111, 45, 0.22);
    margin-inline: 24px;
  }
  .journey-art { display: none; }
  .milestone { position: relative; padding: 0 0 36px 20px; }
  .milestone::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 14px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--tangerine);
  }
  .milestone-year,
  .milestone-copy { position: static; transform: none; width: auto; }
  .milestone-year { font-size: 44px; }
  .milestone-copy { margin-top: 10px; }
  .milestone-copy strong { font-size: var(--fs-h5); }
  .milestone-copy p { margin-top: 10px; font-size: var(--fs-body); }

  .trust { margin-top: 96px; }
  .trust-stats { column-gap: 16px; }
  .trust-num { font-size: 34px; }

  .philosophy-quote br { display: none; }

  /* The tilted wave only clips a thin band at phone width; give the
     whole section the wave's pink instead, with a soft curved top. */
  .guides-wave { display: none; }
  .guides {
    background: #f7d3ce;
    border-radius: 60px 60px 0 0 / 36px 36px 0 0;
  }
  .way-word { font-size: 84px; }
  .guardian { width: 220px; }
  .guardian img { width: 220px; height: 214px; }
  .guardian-name { white-space: normal; }
}
