/* ==========================================================================
   About page (app/views/pages/about.php)
   Story + collage, mission & vision, the name, the principal's message,
   leadership, facilities. Everything is scoped with an .about- prefix;
   shared classes come from site.css.
   ========================================================================== */

/* Sections the About menu links to (#story, #mission, …). html already has
   scroll-padding-top for the sticky header; this adds a little air above. */
.about-anchor {
  scroll-margin-top: 1rem;
}

/* The last section before the closing band: its own bottom padding plus the
   band's would leave too wide a gap. */
.about-before-cta {
  padding-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.about-nowrap {
  white-space: nowrap;
}

/* Story ------------------------------------------------------------------- */
.about-story__grid {
  display: grid;
  gap: 3.5rem;
}
.about-story__copy {
  margin-top: 1.75rem;
}
.about-story__copy > * + * {
  margin-top: 1.1rem;
}
.about-story__lead {
  font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.25rem);
  line-height: 1.7;
  color: var(--ink);
  text-wrap: pretty;
}
.about-story__para {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.about-story__facts {
  margin-top: 2.5rem;
}

/* Photo collage: wide photo, two squares, a panorama */
.about-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.about-collage__item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  box-shadow: var(--shadow-soft);
}
.about-collage__item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-lift);
}
.about-collage__item--pano {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 1;
}
.about-collage__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.about-collage__item:hover img {
  transform: scale(1.04);
}

@media (min-width: 64rem) {
  .about-story__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3.5rem, 6vw, 6rem);
    align-items: start;
  }
  .about-collage {
    position: sticky;
    top: 7rem;
    gap: 1rem;
  }
  .about-collage__item {
    border-radius: var(--radius-xl);
  }
}

/* Mission & vision ------------------------------------------------------ */
.about-ideals__grid {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.about-ideal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  padding: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}
.about-ideal:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
/* Rays in the top-right corner, fading out towards the card. */
.about-ideal__rays {
  position: absolute;
  top: -7rem;
  right: -7rem;
  z-index: -1;
  width: 17rem;
  max-width: none;
  height: 17rem;
  color: var(--gold-500);
  opacity: 0.14;
  -webkit-mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.6) 45%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.6) 45%, transparent 100%);
  animation: turn 120s linear infinite;
  transition: opacity 0.5s;
}
.about-ideal:hover .about-ideal__rays {
  opacity: 0.3;
}
.about-ideal__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.about-ideal__icon {
  margin-top: 1.4rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1.1rem;
}
.about-ideal__title {
  margin-top: 1.4rem;
  font-size: clamp(1.55rem, 1.35rem + 0.7vw, 1.95rem);
  font-weight: 520;
}
.about-ideal__body {
  margin-top: 0.9rem;
  line-height: 1.75;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.about-ideal__list {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

@media (min-width: 48rem) {
  .about-ideals__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-ideals__grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (min-width: 64rem) {
  .about-ideals__grid {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }
  .about-ideals__grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* What "Disha" means (navy band) ----------------------------------------- */
.about-name {
  overflow: hidden;
  isolation: isolate;
}
.about-name__glow {
  position: absolute;
  right: -30rem;
  bottom: -30rem;
  z-index: -1;
  width: 60rem;
  max-width: none; /* site.css caps svg at 100% */
  height: 60rem;
  color: var(--gold-500);
  opacity: 0.1;
  -webkit-mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.5) 40%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.5) 40%, transparent 100%);
  animation: turn 200s linear infinite;
}
.about-name__grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}
.about-name__statement {
  margin-top: 1.75rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.6rem);
  font-weight: 420;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--white);
  text-wrap: balance;
}
.about-name__statement em {
  font-style: italic;
  font-weight: 480;
  color: var(--gold-400);
}
.about-name__word {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 2rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.about-name__word::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--gold-500);
}
.about-name__bn {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
}
.about-name__emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: min(17rem, 62vw);
  aspect-ratio: 1;
  margin-inline: auto;
}
.about-name__rays {
  position: absolute;
  top: -24%;
  left: -24%;
  width: 148%;
  max-width: none; /* site.css caps svg at 100%, which pulled the rays off-centre */
  height: 148%;
  color: var(--gold-500);
  opacity: 0.32;
  -webkit-mask-image: radial-gradient(circle closest-side, black 30%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 30%, transparent 100%);
  animation: turn 120s linear infinite;
}
.about-name__disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--navy-600), var(--navy-800) 55%, var(--navy-900));
  box-shadow:
    0 0 0 1px rgb(240 180 0 / 0.45),
    0 0 0 0.9rem rgb(255 255 255 / 0.04),
    0 30px 70px -25px rgb(240 180 0 / 0.55);
}
.about-name__star {
  width: 58%;
  height: 58%;
  color: var(--gold-400);
  filter: drop-shadow(0 6px 18px rgb(240 180 0 / 0.45));
}

@media (min-width: 64rem) {
  .about-name__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
    gap: 4rem;
  }
  .about-name__emblem {
    width: min(19rem, 100%);
  }
}

/* Principal's message ------------------------------------------------------ */
/* Phones: heading, portrait, then the letter. Large screens: the portrait
   in the left column, beside the heading and the letter. */
.about-principal__grid {
  display: grid;
  align-items: start;
}
/* Clears the badge that hangs below the portrait. */
.about-principal__text {
  margin-top: 3.25rem;
}
.about-principal__text > :first-child {
  margin-top: 0;
}

/* Arched portrait with a gold outline set behind it. */
.about-portrait {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 21rem;
  margin: 2.5rem auto 0;
}
.about-portrait::before {
  content: "";
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  z-index: -1;
  border: 2px solid rgb(240 180 0 / 0.6);
  border-radius: 50% 50% var(--radius-xl) var(--radius-xl) / 40% 40% var(--radius-xl) var(--radius-xl);
}
.about-portrait__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 6px solid var(--white);
  border-radius: 50% 50% var(--radius-xl) var(--radius-xl) / 40% 40% var(--radius-xl) var(--radius-xl);
  background: linear-gradient(165deg, var(--navy-500), var(--navy-800) 70%, var(--navy-900));
  box-shadow: var(--shadow-lift);
}
/* The photo covers the initials; if it fails to load, its alt text is
   hidden and the initials show instead. */
.about-portrait__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  color: transparent;
  font-size: 0;
}
.about-portrait__initials {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 4vw, 6rem);
  font-weight: 500;
  color: rgb(255 255 255 / 0.92);
}
.about-portrait__badge {
  position: absolute;
  right: -0.5rem;
  bottom: -1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-lift);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
}
.about-portrait__star {
  width: 1rem;
  height: 1rem;
  color: var(--gold-500);
}

.about-quote {
  position: relative;
  margin-top: 2rem;
  padding: 1.4rem 1.5rem 1.4rem 4rem;
  border: 1px solid rgb(232 224 207 / 0.95);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.about-quote__mark {
  position: absolute;
  top: 1.45rem;
  left: 1.4rem;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gold-500);
}
.about-quote blockquote {
  margin: 0;
}
.about-quote blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  font-style: italic;
  font-weight: 440;
  line-height: 1.45;
  color: var(--navy-800);
  text-wrap: pretty;
}
.about-quote figcaption {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.about-letter {
  margin-top: 2.25rem;
}
.about-letter > * + * {
  margin-top: 1.15rem;
}
.about-letter__greeting {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--navy-700);
}
.about-letter__opening {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.12rem + 0.75vw, 1.7rem);
  font-weight: 450;
  line-height: 1.38;
  color: var(--ink);
  text-wrap: pretty;
}
.about-letter__para {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.about-letter__sign {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand);
}
.about-letter__signoff {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.about-letter__name {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.35rem + 0.5vw, 1.8rem);
  font-style: italic;
  font-weight: 480;
  line-height: 1.2;
  color: var(--ink);
}
.about-letter__post {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

@media (min-width: 64rem) {
  .about-principal__grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "portrait head"
      "portrait text";
    column-gap: clamp(4rem, 7vw, 6.5rem);
  }
  .about-principal__head {
    grid-area: head;
  }
  .about-principal__text {
    grid-area: text;
    margin-top: 2rem;
  }
  .about-portrait {
    grid-area: portrait;
    position: sticky;
    top: 7.5rem;
    max-width: 24rem;
    margin-top: 0;
  }
}

/* Leadership --------------------------------------------------------------- */
.about-leaders__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.about-leaders__head--center {
  justify-content: center;
}
.about-leaders__body {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.about-leaders__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.about-leaders__grid > li {
  flex: 0 1 100%;
}
.about-leaders__grid .person-card {
  height: 100%;
}
/* No leaders besides the principal: the empty state (and, in development,
   the sample banner above it) in one narrow centred column. */
.about-leaders__body--narrow {
  max-width: 40rem;
  margin-inline: auto;
}
@media (min-width: 30rem) {
  .about-leaders__grid > li {
    flex-basis: calc(50% - 0.625rem);
  }
}
@media (min-width: 64rem) {
  .about-leaders__grid > li {
    flex-basis: calc((100% - 2.5rem) / 3);
  }
}

/* Facilities (bento) ------------------------------------------------------- */
.about-facilities__grid {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.about-facility {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 13rem;
  padding: clamp(1.5rem, 1.3rem + 0.6vw, 1.85rem);
  border: 1px solid rgb(232 224 207 / 0.95);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out),
    border-color 0.5s;
}
.about-facility:hover {
  transform: translateY(-4px);
  border-color: rgb(240 180 0 / 0.45);
  box-shadow: var(--shadow-lift);
}
.about-facility__icon {
  transition: transform 0.5s var(--ease-out);
}
.about-facility:hover .about-facility__icon {
  transform: rotate(-6deg);
}
/* Large faint copy of the icon in the corner (decorative). */
.about-facility__watermark {
  position: absolute;
  right: -1.4rem;
  bottom: -1.4rem;
  z-index: -1;
  width: 8.5rem;
  height: 8.5rem;
  color: var(--navy-50);
  stroke-width: 1.2;
  transition:
    color 0.5s,
    transform 0.8s var(--ease-out);
}
.about-facility:hover .about-facility__watermark {
  color: var(--gold-100);
  transform: rotate(-8deg);
}
.about-facility__title {
  margin-top: auto;
  padding-top: 1.75rem;
  font-size: 1.4rem;
  font-weight: 540;
}
.about-facility__body {
  margin-top: 0.5rem;
  max-width: 36ch;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* The featured facility: a photo with the text over a navy fade. */
.about-facility--photo {
  min-height: 22rem;
  padding: 0;
  border: 0;
  background: var(--navy-950);
}
.about-facility--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgb(5 15 42 / 0.94) 0%, rgb(5 15 42 / 0.55) 42%, rgb(5 15 42 / 0) 72%);
}
/* Zoomed in a little, so a collage's white outer border never shows at the edges. */
.about-facility__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.2s var(--ease-out);
}
.about-facility--photo:hover .about-facility__img {
  transform: scale(1.08);
}
.about-facility__overlay {
  margin-top: auto;
  padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
}
.about-facility--photo .about-facility__title {
  padding-top: 1.1rem;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  color: var(--white);
}
.about-facility--photo .about-facility__body {
  font-size: 1rem;
  color: rgb(255 255 255 / 0.86);
}

@media (min-width: 48rem) {
  .about-facilities__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-facility--photo,
  .about-facility--span {
    grid-column: 1 / -1;
  }
}
@media (min-width: 64rem) {
  .about-facilities__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(15rem, auto);
    gap: 1.25rem;
  }
  .about-facility--photo {
    grid-column: span 2;
    grid-row: span 2;
  }
  .about-facility--span {
    grid-column: auto;
  }
}

/* Reduced motion: no turning rays or hover movement. */
@media (prefers-reduced-motion: reduce) {
  .about-ideal__rays,
  .about-name__glow,
  .about-name__rays {
    animation: none;
  }
  .about-ideal:hover,
  .about-facility:hover,
  .about-facility:hover .about-facility__icon,
  .about-facility:hover .about-facility__watermark,
  .about-collage__item:hover img {
    transform: none;
  }
  .about-facility--photo:hover .about-facility__img {
    transform: scale(1.04);
  }
}
