/* ==========================================================================
   Homepage (app/views/pages/home.php).
   Every selector starts with .home- so nothing here reaches other pages.
   Mobile first; breakpoints 30rem / 48rem / 64rem / 80rem.
   ========================================================================== */

/* Shared bits of this page ------------------------------------------------ */

/* Section heading on the left, a button on the right (wraps on phones). */
.home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.home-head .section-heading {
  flex: 1 1 26rem;
}
.home-head__action {
  flex: none;
}

/* Pause / play button (hero, moving strips): one icon shows at a time. */
.home-toggle .home-toggle__play,
.is-paused .home-toggle .home-toggle__pause {
  display: none;
}
.is-paused .home-toggle .home-toggle__play {
  display: block;
}

/* 1 · Hero: photo carousel ------------------------------------------------- */
.home-hero {
  padding: 0.5rem 0.75rem 4rem;
}
.home-hero__frame {
  --ring: var(--focus-ring-on-dark); /* navy surface: gold focus ring */
  /* Copy and controls line up with the page container on wide screens. */
  --hero-inset: 1.5rem;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* A minimum, so a long title from the panel grows the frame instead of being cut off. */
  min-height: 38rem;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--navy-950);
  box-shadow: var(--shadow-lift);
  touch-action: pan-y pinch-zoom; /* horizontal swipes go to home.js; scrolling and zoom stay */
}

.home-hero__copy {
  position: relative;
  z-index: 1;
  padding: 3rem var(--hero-inset) 6.5rem;
  color: var(--white);
}
.home-hero__title {
  max-width: 48rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.55rem + 3.7vw, 4.6rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.028em;
  color: var(--white);
  text-wrap: balance;
  filter: drop-shadow(0 2px 18px rgb(0 0 0 / 0.35));
}
/* Each word sits in a clipping box it rises out of. */
.home-hero__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.home-hero__word > span {
  display: inline-block;
  padding-bottom: 0.2em;
}
.home-hero__word > .home-hero__accent {
  padding-right: 0.08em;
  font-style: italic;
  font-weight: 430;
  background-image: linear-gradient(100deg, var(--gold-400), var(--gold-300) 45%, var(--gold-200));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero__lede {
  margin-top: 0.75rem;
  max-width: 36rem;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.65;
  color: rgb(255 255 255 / 0.88);
  text-shadow: 0 1px 14px rgb(5 15 42 / 0.45);
  text-wrap: pretty;
}
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

/* Slides: stacked; the active one fades in over the one it replaces. */
.home-hero__carousel {
  position: absolute;
  inset: 0;
}
.home-hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.home-hero__slide.is-active {
  z-index: 2;
  opacity: 1;
}
.home-hero__slide.is-leaving {
  z-index: 1;
  opacity: 1;
}
.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgb(5 15 42 / 0.94) 0%, rgb(5 15 42 / 0.7) 38%, rgb(5 15 42 / 0.25) 72%, rgb(5 15 42 / 0.15) 100%);
}

/* Controls: pause/play, one button per photo (a bar that fills), previous/next. */
.home-hero__controls {
  position: absolute;
  z-index: 2;
  left: var(--hero-inset);
  right: var(--hero-inset);
  bottom: 1.25rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.home-hero__controls[hidden] {
  display: none;
}
.home-hero__btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.32);
  border-radius: 999px;
  background: rgb(5 15 42 / 0.35);
  color: var(--white);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    background-color 0.25s,
    border-color 0.25s;
}
.home-hero__btn:hover {
  border-color: rgb(255 255 255 / 0.7);
  background: rgb(255 255 255 / 0.16);
}
.home-hero__btn .icon {
  width: 1.1rem;
  height: 1.1rem;
}
.home-hero__btn .home-toggle__pause,
.home-hero__btn .home-toggle__play {
  width: 0.95rem;
  height: 0.95rem;
}
.home-hero__btn .home-toggle__play {
  fill: currentColor;
}
.home-hero__dots {
  display: flex;
  flex: 1;
  gap: 0.4rem;
  min-width: 0;
  margin: 0 0.35rem;
}
.home-hero__dots li {
  flex: 1;
  min-width: 0;
}
.home-hero__dot {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0 1.25rem;
  border: 0;
  border-radius: 0.35rem;
  background: none;
  color: rgb(255 255 255 / 0.62);
  text-align: left;
}
.home-hero__dot:hover,
.home-hero__dot.is-active {
  color: var(--white);
}
.home-hero__dot-label {
  display: none;
  overflow: hidden;
  margin-bottom: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s;
}
.home-hero__track {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.3);
}
.home-hero__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: left center;
}
.home-hero__dot.is-done .home-hero__fill,
.home-hero__dot.is-active .home-hero__fill {
  transform: scaleX(1);
}
/* While rotating, the active bar fills over 6 s; when it ends home.js moves on. */
.home-hero.is-rotating .home-hero__dot.is-active .home-hero__fill {
  animation: home-hero-progress 6s linear both;
}
.home-hero.is-paused .home-hero__dot.is-active .home-hero__fill,
.home-hero.is-held .home-hero__dot.is-active .home-hero__fill {
  animation-play-state: paused;
}
@keyframes home-hero-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Headline words rise in turn; the lede and buttons follow. */
  .home-hero__word > span {
    animation: home-rise 1s var(--ease-out) backwards;
    animation-delay: calc(0.15s + var(--i, 0) * 0.07s);
  }
  .home-hero__lede {
    animation: home-fade-up 0.9s var(--ease-out) 0.6s backwards;
  }
  .home-hero__actions {
    animation: home-fade-up 0.9s var(--ease-out) 0.75s backwards;
  }
  /* A slow zoom on the photo in view (and the one fading out under it). */
  html.js .home-hero__slide.is-active .home-hero__img,
  html.js .home-hero__slide.is-leaving .home-hero__img {
    animation: home-hero-zoom 7.2s linear both;
  }
  .home-hero.is-paused .home-hero__img,
  .home-hero.is-held .home-hero__img {
    animation-play-state: paused;
  }
}
@keyframes home-rise {
  from {
    transform: translateY(110%);
  }
}
@keyframes home-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes home-hero-zoom {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

@media (min-width: 30rem) {
  .home-hero {
    padding-inline: 1rem;
  }
  .home-hero__frame {
    --hero-inset: 2.25rem;
  }
}
@media (min-width: 48rem) {
  .home-hero {
    padding-bottom: 6rem;
  }
  .home-hero__frame {
    --hero-inset: 3.5rem;
    min-height: 44rem;
    min-height: clamp(32rem, 82svh, 44rem);
    border-radius: var(--radius-2xl);
  }
  .home-hero__copy {
    padding-bottom: 8rem;
  }
  .home-hero__shade {
    background:
      linear-gradient(0deg, rgb(5 15 42 / 0.55) 0%, transparent 32%),
      linear-gradient(32deg, rgb(5 15 42 / 0.92) 0%, rgb(5 15 42 / 0.6) 38%, rgb(5 15 42 / 0.12) 72%, transparent 100%);
  }
  .home-hero__controls {
    bottom: 2rem;
    gap: 0.6rem;
  }
  .home-hero__dots {
    gap: 0.9rem;
    margin-inline: 0.75rem;
  }
  .home-hero__dot {
    padding-bottom: 1.2rem;
  }
  .home-hero__dot-label {
    display: block;
  }
}
@media (min-width: 64rem) {
  .home-hero__frame {
    --hero-inset: 4rem;
  }
}
@media (min-width: 80rem) {
  .home-hero {
    padding-inline: 1.5rem;
  }
  .home-hero__frame {
    --hero-inset: max(4rem, calc(50% - var(--container) / 2 + var(--gutter)));
  }
}

/* 2 · Stats: large serif numbers, divided by small compass stars ---------- */
.home-stats {
  padding-bottom: 1rem;
}
.home-stats__list {
  display: grid;
  grid-template-columns: repeat(var(--n-sm, 2), minmax(0, 1fr));
  row-gap: 2.5rem;
}
.home-stats__item {
  position: relative;
  padding-inline: 0.75rem;
  text-align: center;
}
.home-stats__star {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--gold-500);
  opacity: 0.8;
  transform: translate(-50%, -50%);
}
.home-stats__item--row-start .home-stats__star {
  display: none;
}
.home-stats__value {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.9rem + 2.8vw, 3.9rem);
  font-weight: 320;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.home-stats__label {
  max-width: 15rem;
  margin: 0.85rem auto 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--gold-700);
}
.home-stats__rule {
  max-width: 48rem;
  height: 1px;
  margin: 3rem auto 0;
  background: linear-gradient(90deg, transparent, var(--sand) 20%, var(--sand) 80%, transparent);
}
@media (min-width: 48rem) {
  .home-stats {
    padding-bottom: 1.5rem;
  }
  .home-stats__list {
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  }
  .home-stats__item--row-start .home-stats__star {
    display: block;
  }
  .home-stats__rule {
    margin-top: 3.75rem;
  }
}

/* 3 · Ethos: about text, the meaning of "Disha", three promises ----------- */
.home-ethos__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.home-ethos__action {
  margin-top: 2.25rem;
}

.home-meaning {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow: hidden;
  padding: clamp(2rem, 1.4rem + 2.5vw, 3.25rem);
  border-radius: var(--radius-xl);
  background: radial-gradient(120% 120% at 0% 0%, var(--navy-700) 0%, var(--navy-900) 52%, var(--navy-950) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lift);
}
.home-meaning__rays {
  position: absolute;
  right: -15rem;
  bottom: -15rem;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  color: var(--gold-500);
  opacity: 0.2;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.8) 35%, rgb(0 0 0 / 0.35) 70%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.8) 35%, rgb(0 0 0 / 0.35) 70%, transparent 100%);
}
.home-meaning__rays .rays {
  width: 100%;
  height: 100%;
}
.home-meaning__word {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.1rem;
  line-height: 1;
}
.home-meaning__latin {
  padding-right: 0.06em;
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 2.6rem + 4.6vw, 6rem);
  font-style: italic;
  font-weight: 430;
  letter-spacing: -0.03em;
  background-image: linear-gradient(100deg, var(--gold-400), var(--gold-300) 50%, var(--gold-200));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Bengali: Manrope has no Bengali letters, so the system's Bengali font is used. */
.home-meaning__bn {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  font-weight: 600;
  color: rgb(255 255 255 / 0.72);
}
.home-meaning__line {
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.12rem + 0.75vw, 1.7rem);
  font-weight: 360;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.92);
  text-wrap: pretty;
}

.home-ethos__highlights {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3.5rem, 2.5rem + 3vw, 5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--sand);
}
.home-highlight {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 1rem;
}
.home-highlight__icon {
  grid-row: span 2;
  align-self: start;
}
.home-highlight__title {
  font-size: 1.3rem;
  font-weight: 560;
}
.home-highlight__body {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}
@media (min-width: 48rem) {
  .home-ethos__highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
  .home-highlight {
    align-items: start;
    padding-inline: 1.75rem;
  }
  .home-highlight:first-child {
    padding-left: 0;
  }
  .home-highlight:last-child {
    padding-right: 0;
  }
  .home-highlight + .home-highlight {
    border-left: 1px solid var(--sand);
  }
  .home-highlight__title {
    padding-top: 0.6rem;
  }
}
@media (min-width: 64rem) {
  .home-ethos__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 5rem;
  }
  .home-highlight {
    padding-inline: 2.25rem;
  }
}

/* 4 · Campus life: activity photos, a drifting strip, the gallery ---------- */
.home-life {
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(3rem, 2rem + 3vw, 4rem);
}
.home-life__rays {
  position: absolute;
  top: -27rem;
  left: 50%;
  z-index: -1;
  width: 54rem;
  height: 54rem;
  color: var(--gold-500);
  opacity: 0.1;
  pointer-events: none;
  transform: translateX(-50%);
  -webkit-mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.85) 30%, rgb(0 0 0 / 0.45) 62%, rgb(0 0 0 / 0.15) 84%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 0%, rgb(0 0 0 / 0.85) 30%, rgb(0 0 0 / 0.45) 62%, rgb(0 0 0 / 0.15) 84%, transparent 100%);
}
.home-life__rays .rays {
  width: 100%;
  height: 100%;
}

.home-life__grid {
  display: grid;
  gap: 0.75rem;
  margin-top: clamp(2.75rem, 2rem + 2.5vw, 3.75rem);
}
.home-act {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}
.home-act__media {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
}
.home-act__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.home-act__title {
  font-size: 1.15rem;
  font-weight: 540;
  line-height: 1.2;
  color: var(--white);
}
.home-act__body {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.74);
  text-wrap: pretty;
}

/* Photo over the whole card, text on a dark fade (featured; all photo cards from 48rem). */
.home-act--featured {
  aspect-ratio: 4 / 3;
}
.home-act--featured .home-act__media {
  position: absolute;
  inset: 0;
}
.home-act--featured .home-act__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(5 15 42 / 0.94) 0%, rgb(5 15 42 / 0.45) 45%, transparent 75%);
}
.home-act--featured .home-act__text {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4rem 1.5rem;
}
.home-act--featured .home-act__title {
  font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.home-act--featured .home-act__body {
  max-width: 30rem;
  font-size: 0.95rem;
}

/* Phones: a compact row with a square thumbnail. */
.home-act--photo {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem 0.6rem 0.6rem;
}
.home-act--photo .home-act__media {
  aspect-ratio: 1;
  border-radius: 1rem;
}

/* An activity without a photo: gold rays rise from the corner instead. */
.home-act--plain {
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background:
    radial-gradient(90% 120% at 100% 0%, rgb(240 180 0 / 0.12), transparent 60%),
    rgb(255 255 255 / 0.05);
}
.home-act__rays {
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  z-index: -1;
  width: 14rem;
  height: 14rem;
  color: var(--gold-500);
  opacity: 0.14;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle closest-side, black 15%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 15%, transparent 100%);
}

@media (min-width: 48rem) {
  .home-life__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 15.5rem;
    gap: 1rem;
  }
  .home-act--featured {
    grid-row: span 2;
    grid-column: span 2;
    aspect-ratio: auto;
  }
  .home-act--featured .home-act__text {
    padding: 2rem 2.25rem;
  }
  .home-act--photo {
    display: block;
    padding: 0;
  }
  .home-act--photo .home-act__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border-radius: 0;
  }
  .home-act--photo .home-act__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgb(5 15 42 / 0.94) 0%, rgb(5 15 42 / 0.55) 48%, transparent 80%);
  }
  .home-act--photo .home-act__text {
    position: absolute;
    inset: auto 0 0;
    padding: 1.25rem 1.4rem;
  }
  .home-act--plain {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.4rem;
  }
  .home-act__rays {
    right: -7rem;
    bottom: -11rem;
    width: 24rem;
    height: 24rem;
  }
  .home-act--wide {
    grid-column: span 2;
  }
  .home-act--wide .home-act__rays {
    right: -13rem;
    bottom: -17rem;
    width: 32rem;
    height: 32rem;
  }
  .home-act--wide .home-act__text {
    max-width: 26rem;
  }
  .home-act:hover .home-act__media img {
    transform: scale(1.04);
  }
}
@media (min-width: 64rem) {
  .home-life__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* Endless strip (campus photos, teachers) ---------------------------------
   Without JavaScript, and for reduced motion, it is a still row that scrolls
   sideways. home.js copies the items once and sets .is-moving: the track
   then drifts left by half its width, forever; hover or the pause button
   stops it. */
.home-marquee__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 0.25) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent);
}
.home-marquee__track {
  display: flex;
  width: max-content;
  /* The still row starts in line with the page container (clear of the edge fade). */
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
}
/* The still row can take keyboard focus to scroll; the edge-fade mask clips
   anything outside the box, so the focus ring sits inside it. */
.home-marquee__viewport:focus-visible {
  outline-offset: -3px;
  /* The edge fade would hide the ring's sides: drop it while focused. */
  -webkit-mask-image: none;
  mask-image: none;
}
.home-marquee:not(.is-moving) .is-clone {
  display: none;
}
.home-marquee.is-moving .home-marquee__viewport {
  overflow: hidden;
}
.home-marquee.is-moving .home-marquee__track {
  padding-inline: 0;
  animation: home-marquee var(--marquee-duration, 60s) linear infinite;
}
.home-marquee.is-moving .home-marquee__viewport:hover .home-marquee__track,
.home-marquee.is-paused .home-marquee__track {
  animation-play-state: paused;
}
@keyframes home-marquee {
  to {
    transform: translateX(-50%);
  }
}
.home-marquee__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 2.25rem;
}
.home-marquee__bar--end {
  justify-content: flex-end;
  margin-top: 1.25rem;
}
.home-marquee__toggle {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  color: var(--white);
  transform: translateY(-50%);
  transition:
    background-color 0.25s,
    border-color 0.25s;
}
.home-marquee__toggle:hover {
  border-color: rgb(255 255 255 / 0.7);
  background: rgb(255 255 255 / 0.14);
}
.home-marquee__toggle .icon {
  width: 0.95rem;
  height: 0.95rem;
}
.home-marquee__toggle .home-toggle__play {
  fill: currentColor;
}
.home-marquee__bar--end .home-marquee__toggle {
  position: static;
  transform: none;
}
/* Holds only the pause button, which exists only while the strip moves. */
.home-marquee:not(.is-moving) .home-marquee__bar--end {
  display: none;
}
.home-marquee--light .home-marquee__viewport {
  scrollbar-color: rgb(13 26 54 / 0.2) transparent;
}
.home-marquee--light .home-marquee__toggle {
  border-color: rgb(13 26 54 / 0.16);
  background: rgb(255 255 255 / 0.7);
  color: var(--ink);
}
.home-marquee--light .home-marquee__toggle:hover {
  border-color: rgb(10 50 144 / 0.45);
  background: var(--white);
}

/* The photo strip */
.home-strip {
  margin-top: clamp(3.5rem, 2.5rem + 3vw, 5rem);
}
.home-strip__item {
  position: relative;
  flex: none;
  height: 11rem;
  aspect-ratio: var(--ratio, 4 / 3);
  margin-inline-end: 1rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
}
.home-strip__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  pointer-events: none;
}
.home-strip__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-strip__label {
  position: absolute;
  inset: auto 0 0;
  padding: 2.5rem 0.95rem 0.8rem;
  background: linear-gradient(0deg, rgb(5 15 42 / 0.8), transparent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
@media (min-width: 48rem) {
  .home-strip__item {
    height: 15rem;
    margin-inline-end: 1.25rem;
  }
}

/* 5 · Principal ----------------------------------------------------------- */
.home-principal {
  overflow: hidden;
}
.home-principal__grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}
.home-principal__portrait {
  position: relative;
  width: 100%;
  max-width: 21rem;
  margin-inline: auto;
}
.home-principal__rays {
  position: absolute;
  inset: -32%;
  color: var(--gold-500);
  opacity: 0.22;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, black 25%, transparent 70%);
  mask-image: radial-gradient(circle, black 25%, transparent 70%);
}
.home-principal__rays .rays {
  width: 100%;
  height: 100%;
}
/* An arch: round top, softly rounded bottom corners. */
.home-principal__frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  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(180deg, var(--navy-500) 0%, var(--navy-700) 55%, var(--navy-900) 100%);
  box-shadow: var(--shadow-lift);
}
/* The initials sit underneath the photo: they show when there is no photo,
   or when it fails to load (home.js hides a broken one). */
.home-principal__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  color: transparent;
}
.home-principal__initials {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 3.5rem + 4vw, 6.5rem);
  font-weight: 500;
  color: rgb(255 255 255 / 0.92);
}
.home-principal__badge {
  position: absolute;
  right: 0;
  bottom: -1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-lift);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
}
.home-principal__badge-star {
  width: 1rem;
  height: 1rem;
  color: var(--gold-500);
}
.home-principal__quote {
  margin: 1.75rem 0 0;
}
.home-principal__quote p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.08rem + 1.3vw, 2.15rem);
  font-weight: 340;
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: pretty;
}
.home-principal__mark {
  color: var(--gold-500);
  font-weight: 500;
}
.home-principal__mark:first-child {
  margin-right: 0.08em;
}
.home-principal__mark:last-child {
  margin-left: 0.04em;
}
.home-principal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand);
}
.home-principal__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}
.home-principal__post {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
@media (min-width: 48rem) {
  .home-principal__badge {
    right: -2rem;
  }
}
@media (min-width: 64rem) {
  .home-principal__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 6rem;
  }
  .home-principal__portrait {
    max-width: 23rem;
  }
}

/* 6 · Notice board -------------------------------------------------------- */
.home-notices__body {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.home-notices__grid {
  display: grid;
  gap: 1.25rem;
}
.home-notices__list {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}
.home-notice {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  min-height: 18rem;
  overflow: hidden;
  padding: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  border-radius: var(--radius-xl);
  background: radial-gradient(130% 120% at 100% 100%, var(--navy-600) 0%, var(--navy-800) 42%, var(--navy-950) 100%);
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-lift);
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}
.home-notice:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgb(13 26 54 / 0.05), 0 32px 60px -22px rgb(5 15 42 / 0.45);
}
.home-notice__rays {
  position: absolute;
  right: -16rem;
  bottom: -16rem;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  color: var(--gold-400);
  opacity: 0.18;
  pointer-events: none;
  transition: opacity 0.7s;
  -webkit-mask-image: radial-gradient(closest-side, black 25%, transparent);
  mask-image: radial-gradient(closest-side, black 25%, transparent);
}
.home-notice:hover .home-notice__rays {
  opacity: 0.28;
}
.home-notice__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.home-notice__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.home-notice__arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-800);
  transition: transform 0.5s var(--ease-out);
}
.home-notice:hover .home-notice__arrow {
  transform: rotate(45deg);
}
.home-notice__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-300);
}
.home-notice__badge {
  background: rgb(255 255 255 / 0.14);
  color: var(--white);
}
.home-notice__title {
  margin-top: 0.75rem;
  font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem);
  font-weight: 520;
  line-height: 1.15;
  color: var(--white);
  text-wrap: balance;
}
@media (min-width: 64rem) {
  .home-notices__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  }
  .home-notices__grid--single {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-notice {
    min-height: 20rem;
  }
}

/* 7 · Facilities ---------------------------------------------------------- */
.home-facilities__grid {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.75rem, 2rem + 2.5vw, 3.75rem);
}
.home-facility {
  position: relative;
  padding: 1.75rem 1.6rem 1.9rem;
}
.home-facility__num {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--gold-700);
}
.home-facility__title {
  margin-top: 1.4rem;
  font-size: 1.35rem;
  font-weight: 560;
}
.home-facility__body {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.home-facilities__more {
  display: flex;
  justify-content: center;
  margin-top: 2.75rem;
}
@media (min-width: 48rem) {
  .home-facilities__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (min-width: 64rem) {
  .home-facilities__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-facility {
    padding: 2rem 1.9rem 2.2rem;
  }
}

/* 8 · Faculty ------------------------------------------------------------- */
.home-faculty {
  overflow: hidden;
}
.home-faculty__note {
  margin-top: 2rem;
}
.home-faculty__note .sample-banner {
  margin-bottom: 0;
}
.home-faculty__grid {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.home-faculty__marquee {
  margin-top: clamp(1rem, 0.5rem + 2vw, 2rem);
}
/* Room for the cards' shadows inside the fading mask. */
.home-faculty__marquee .home-marquee__viewport {
  padding-block: 1.5rem 2rem;
}
.home-faculty__item {
  display: flex;
  flex: none;
  width: 15rem;
  margin-inline-end: 1.25rem;
}
.home-faculty__item .person-card {
  width: 100%;
}
.home-faculty__grid .person-card {
  height: 100%;
}

/* 9 · Admission ----------------------------------------------------------- */
.home-admit {
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem);
}
/* No teachers to show: the facilities section's own bottom space is enough. */
.home-facilities + .home-admit {
  padding-top: 0;
}
.home-admit__panel {
  --ring: var(--focus-ring-on-dark); /* navy surface: gold focus ring */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.25rem, 2.2rem + 4.5vw, 6rem) clamp(1.25rem, 0.4rem + 4.4vw, 4rem);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(90% 70% at 50% 125%, rgb(240 180 0 / 0.38) 0%, rgb(240 180 0 / 0.08) 45%, transparent 65%),
    linear-gradient(160deg, var(--navy-700) 0%, var(--navy-900) 48%, var(--navy-950) 100%);
  color: var(--white);
  box-shadow: 0 30px 80px -34px rgb(5 15 42 / 0.65);
}
.home-admit__rays {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 80rem;
  height: 80rem;
  color: var(--gold-300);
  opacity: 0.1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(circle closest-side, black 20%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 20%, transparent 100%);
}
.home-admit__rays .rays {
  width: 100%;
  height: 100%;
}
.home-admit__intro {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.home-admit__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.home-admit__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--gold-400);
}
.home-admit__pill:not(.is-open) .home-admit__dot {
  background: rgb(255 255 255 / 0.55);
}
@media (prefers-reduced-motion: no-preference) {
  /* A few pulses, then still (nothing keeps blinking). */
  .home-admit__pill.is-open .home-admit__dot {
    animation: home-pulse 1.6s ease-in-out 3;
  }
}
@keyframes home-pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}
.home-admit__title {
  margin-top: 1.5rem;
  font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.9rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--white);
}
.home-admit__title em {
  font-style: italic;
  font-weight: 440;
  color: var(--gold-300);
}
.home-admit__body {
  max-width: 36rem;
  margin: 1.4rem auto 0;
  font-size: clamp(1.02rem, 0.97rem + 0.25vw, 1.15rem);
  line-height: 1.7;
  color: rgb(255 255 255 / 0.8);
  text-wrap: pretty;
}
.home-admit__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.home-admit__deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-200);
}
.home-admit__steps {
  display: grid;
  gap: 1rem;
  max-width: 64rem;
  margin: clamp(3rem, 2.2rem + 3vw, 4.25rem) auto 0;
}
.home-admit__step {
  padding: 1.5rem;
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.home-admit__step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.home-admit__step-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy-700);
}
.home-admit__step-icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}
.home-admit__step-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold-300);
}
.home-admit__step-title {
  margin-top: 1rem;
  font-size: 1.3rem;
  font-weight: 540;
  color: var(--white);
}
.home-admit__step-body {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.76);
}
@media (min-width: 48rem) {
  .home-admit__steps {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* 10 · Visit: contact details and the map --------------------------------- */
.home-visit__grid {
  display: grid;
  gap: 3.5rem;
}
.home-visit__list {
  display: grid;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.home-visit__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem 1rem 1rem;
  border: 1px solid rgb(255 255 255 / 0.85);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.home-visit__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: linear-gradient(140deg, var(--gold-300), var(--gold-500));
  color: var(--navy-950);
  box-shadow: 0 12px 28px -14px rgb(240 180 0 / 0.9);
}
.home-visit__text {
  min-width: 0;
}
.home-visit__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.home-visit__value {
  margin-top: 0.25rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.home-visit__value a {
  color: var(--navy-700);
  text-decoration: none;
}
.home-visit__value a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 2px;
}
.home-visit__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
}
.home-visit__links a {
  display: inline-block;
  padding-block: 0.15rem;
  white-space: nowrap;
}
.home-visit__hint {
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.home-visit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.home-visit__map {
  position: relative;
  isolation: isolate;
}
/* A tilted gold-to-blue card behind the map. */
.home-visit__map::before {
  content: "";
  position: absolute;
  inset: -0.6rem;
  z-index: -1;
  border-radius: calc(var(--radius-xl) + 0.6rem);
  background: linear-gradient(135deg, var(--gold-200), rgb(240 180 0 / 0.35) 50%, var(--navy-100));
  transform: rotate(1.5deg);
}
.home-visit__frame {
  position: relative;
  height: 100%;
  min-height: 22rem;
  aspect-ratio: auto;
  border: 4px solid var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
}
.home-visit__frame iframe {
  position: absolute;
  inset: 0;
  filter: saturate(0.85) sepia(0.12);
}
@media (min-width: 64rem) {
  .home-visit__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 4rem;
  }
  .home-visit__frame {
    min-height: 28rem;
  }
}
