/* Bhavya Sai High School
   Colours are sampled from the school crest. */
:root {
  --crest-blue: #01609a;
  --crest-deep: #01436c;
  --crest-night: #012e4b;
  --sky: #3e8ecb;
  --sky-soft: #7db3de;
  --sky-pale: #c2dbf0;
  --sky-wash: #eef5fb;
  --sun: #ef7f1d;
  --sun-deep: #d86a0b;
  --ink: #0f2a40;
  --ink-soft: #3d5568;
  --line: #d5e3ee;
  --white: #ffffff;

  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-chalk: "Kalam", "Comic Sans MS", cursive;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1240px;
  --section-space: clamp(4.5rem, 9vw, 7.5rem);
  --header-h: 76px;
  --radius-photo: 14px;
  --radius-button: 999px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-stretch: 100%;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

.nowrap { white-space: nowrap; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 52px;
  padding: .8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.button--sun { background: var(--sun); color: var(--ink); }
.button--sun:hover { background: #ff9a3d; }
.button--ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.button--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); }
.button--outline { border-color: var(--crest-blue); color: var(--crest-blue); }
.button--outline:hover { background: var(--crest-blue); color: var(--white); }
.button--small { min-height: 44px; padding: .55rem 1.1rem; font-size: 1rem; }
.button--large { min-height: 60px; padding: 1rem 2rem; font-size: 1.1875rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--crest-deep);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1320px;
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.brand__crest { width: 52px; height: 52px; }
.brand__name { display: flex; flex-direction: column; line-height: 1.05; }
.brand__first { font-size: 1.0625rem; font-weight: 400; }
.brand__second { font-size: 1.375rem; font-weight: 800; font-stretch: 90%; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list a {
  text-decoration: none;
  font-weight: 500;
  padding-block: .4rem;
  border-bottom: 2px solid transparent;
}
.site-nav__list a:hover { border-bottom-color: var(--sun); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .5rem .9rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-button);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--crest-blue);
  color: var(--white);
}
.hero__orb {
  position: absolute;
  top: -38vw;
  left: -18vw;
  width: 92vw;
  max-width: 1150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--crest-deep);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem) var(--gutter);
}
.hero__title {
  font-size: clamp(3.1rem, 6.3vw, 6.4rem);
  font-weight: 800;
  font-stretch: 72%;
  line-height: .92;
  letter-spacing: -.01em;
}
.hero__lede {
  max-width: 34em;
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.25rem;
}

/* Stacked photo collage, bleeding off the right edge */
.collage {
  position: relative;
  height: clamp(430px, 44vw, 600px);
}
.collage__card {
  position: absolute;
  box-shadow: 0 24px 50px -20px rgba(1, 30, 50, .55);
}
.collage__photo { overflow: hidden; border-radius: var(--radius-photo) 0 0 var(--radius-photo); }
.collage__photo img { width: 100%; height: 100%; object-fit: cover; }
.collage__photo--teachers {
  top: 13%;
  right: 0;
  width: 74%;
  height: 50%;
  z-index: 1;
}
.collage__photo--teachers img { object-position: 50% 70%; }
.collage__photo--campus {
  bottom: 0;
  right: 0;
  width: 92%;
  height: 52%;
  z-index: 2;
}
.collage__photo--campus img { object-position: 50% 40%; }
.collage__notice {
  top: 0;
  right: clamp(1.5rem, 4vw, 3rem);
  z-index: 3;
  width: min(58%, 340px);
  padding: 1.25rem 1.4rem 1.3rem;
  background: var(--white);
  color: var(--ink);
  border-radius: 12px;
  border-top: 6px solid var(--sun);
}
.collage__notice-title {
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1.05;
}
.collage__notice-text {
  margin-top: .5rem;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.collage__notice-link {
  display: inline-block;
  margin-top: .65rem;
  font-weight: 700;
  color: var(--crest-blue);
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* One orchestrated entrance on load */
@media (prefers-reduced-motion: no-preference) {
  .hero__title,
  .hero__lede,
  .hero__actions,
  .collage__card {
    animation: rise .8s cubic-bezier(.2, .7, .2, 1) both;
  }
  .hero__lede { animation-delay: .08s; }
  .hero__actions { animation-delay: .16s; }
  .collage__photo--campus { animation-delay: .22s; }
  .collage__photo--teachers { animation-delay: .34s; }
  .collage__notice { animation-delay: .5s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Vision (LEAD) ---------- */
.vision {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(rgba(1, 46, 75, .88), rgba(1, 46, 75, .9)),
    url("../assets/teachers-plantation.jpg") center 60% / cover no-repeat;
}
.vision__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  row-gap: clamp(.5rem, 2vw, 1.5rem);
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3.5rem, 7vw, 6rem) var(--gutter);
}
.vision__letter {
  font-size: clamp(7rem, 21vw, 17.5rem);
  font-weight: 800;
  font-stretch: 115%;
  line-height: .8;
  user-select: none;
}
.vision__text {
  max-width: 22rem;
  justify-self: center;
}
.vision__title {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1.1;
  color: var(--sun);
}
.vision__text p {
  margin-top: .75rem;
  color: rgba(255, 255, 255, .88);
}
/* The sun sits on the baseline of A and D, like the crest's sunrise */
.vision__sun {
  align-self: end;
  width: clamp(7rem, 18vw, 14rem);
  margin-bottom: -2px;
  color: var(--sun);
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-space); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-title {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1;
  letter-spacing: -.005em;
  color: var(--crest-deep);
}
.section-lede {
  margin-top: 1rem;
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about__copy p {
  max-width: 36em;
  margin-top: 1.25rem;
  font-size: 1.125rem;
}
.about__copy .section-title + p { margin-top: 1.75rem; }

.facts {
  margin: 0;
  padding: .5rem 1.75rem;
  background: var(--sky-wash);
  border-radius: 16px;
}
.facts__row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.facts__row:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; color: var(--crest-deep); }

/* Classes */
.classes { background: var(--sky-wash); }

.steps {
  --step-gap: 6px;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  align-items: end;
  gap: var(--step-gap);
  height: clamp(220px, 26vw, 320px);
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 3px solid var(--crest-deep);
}
.step {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: calc(16% + var(--i) * 7%);
  padding: 0 2px .6rem;
  border-radius: 8px 8px 0 0;
  font-size: .9375rem;
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.1;
  text-align: center;
}
.step__word { display: none; }
.step--pre { background: var(--sky-pale); color: var(--ink); }
.step--primary { background: var(--sky-soft); color: var(--ink); }
.step--high { background: var(--crest-blue); color: var(--white); }
.step--top { background: var(--sun); color: var(--ink); }

.stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.stage {
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--white);
  border-radius: 12px;
  border-top: 8px solid var(--stage-colour);
}
.stage--pre { --stage-colour: var(--sky-pale); }
.stage--primary { --stage-colour: var(--sky-soft); }
.stage--high { --stage-colour: var(--crest-blue); }
.stage__title {
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 85%;
  color: var(--crest-deep);
}
.stage__range {
  margin-top: .15rem;
  font-weight: 600;
  color: var(--crest-blue);
}
.stage p:last-child { margin-top: .75rem; color: var(--ink-soft); }

/* Campus life */
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-photo);
}
/* 31:15 keeps the wide photo level with the 4:3 photo beside it */
.gallery__item--wide img { aspect-ratio: 31 / 15; }
.gallery__item figcaption {
  margin-top: .75rem;
  font-size: .9375rem;
  color: var(--ink-soft);
}

.video {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.video__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1.05;
  color: var(--crest-deep);
}
.video__copy p { margin-top: .75rem; margin-bottom: 1.5rem; color: var(--ink-soft); }
.video__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-photo);
  background: var(--crest-night);
}
.video__frame iframe { width: 100%; height: 100%; border: 0; }

/* Admissions */
.admissions { background: var(--sky-wash); }
.admissions__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.chalkboard {
  position: relative;
  container-type: inline-size;
  transform: rotate(-1.2deg);
  filter: drop-shadow(0 18px 28px rgba(1, 46, 75, .28));
}
.chalkboard img { width: 100%; }
/* Writing sits inside the blank board area of the chalkboard image */
.chalkboard__text {
  position: absolute;
  inset: 21% 13% 19%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1em;
  font-family: var(--font-chalk);
  font-weight: 700;
  font-size: 1.5rem;
  font-size: 6.4cqi;
  line-height: 1.05;
  text-align: center;
  color: #f4f4ec;
  text-shadow: 0 0 1px rgba(255, 255, 255, .5);
}
.chalkboard__big { color: #ffd84d; }
.chalkboard__small { font-size: .62em; color: #bfe3ff; margin-top: .25em; }
.admissions__copy p {
  max-width: 32em;
  margin-top: 1.25rem;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: stretch;
}
.contact__list {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 2.25rem;
  padding: 0;
  list-style: none;
}
.contact__list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact__icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: .65rem;
  border-radius: 50%;
  background: var(--sky-wash);
  color: var(--crest-blue);
}
.contact__label { font-size: .9375rem; color: var(--ink-soft); }
.contact__value {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--crest-deep);
  line-height: 1.4;
}
a.contact__value { text-decoration-color: var(--sun); text-underline-offset: 3px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.contact__map {
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius-photo);
  background: var(--sky-wash);
}
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--crest-night); color: rgba(255, 255, 255, .82); }
.site-footer__banner {
  background: #fdf1ea;
  padding: clamp(.75rem, 2vw, 1.25rem) var(--gutter);
}
.site-footer__banner img { width: 100%; max-width: 1100px; margin-inline: auto; }
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 2rem 3rem;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter);
}
.site-footer__brand { display: flex; gap: 1rem; align-items: center; }
.site-footer__brand img { width: 64px; height: 64px; }
.site-footer__name { font-size: 1.25rem; font-weight: 800; color: var(--white); }
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: center;
}
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--sun); }
.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9375rem;
}

/* Mobile call bar (hidden on larger screens) */
.call-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--crest-deep);
    border-top: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 20px 30px -10px rgba(1, 30, 50, .5);
  }
  .site-nav.is-open { display: flex; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a {
    display: block;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .site-nav__list a:hover { border-bottom-color: rgba(255, 255, 255, .1); color: #ffc58f; }
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    padding-right: var(--gutter);
  }
  .collage {
    height: auto;
    display: grid;
    margin-right: calc(-1 * var(--gutter));
  }
  .collage__card { position: relative; inset: auto; }
  .collage__photo--teachers { display: none; }
  .collage__photo--campus { order: 1; width: 100%; height: auto; aspect-ratio: 16 / 10; }
  /* Notice card overlaps the bottom of the campus photo */
  .collage__notice {
    order: 2;
    width: auto;
    max-width: 360px;
    margin: -3rem var(--gutter) 0 1rem;
    justify-self: start;
  }

  .about__grid,
  .admissions__grid,
  .contact__grid,
  .video,
  .gallery { grid-template-columns: minmax(0, 1fr); }

  .stages { grid-template-columns: minmax(0, 1fr); }
  .gallery__item--wide img { aspect-ratio: 16 / 9; }

  .vision__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vision__text { grid-column: 1 / -1; grid-row: 3; max-width: 30rem; margin-top: 1rem; text-align: center; }
  .vision__sun { display: none; }
  .vision__letter { font-size: clamp(6.5rem, 34vw, 13rem); }

  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .brand__crest { width: 44px; height: 44px; }
  .brand__first { font-size: .9375rem; }
  .brand__second { font-size: 1.1875rem; }
  .menu-toggle__label { display: none; }

  .hero__actions .button { flex: 1 1 100%; }
  /* The fixed call bar is the call button on phones */
  .hero__actions .button--sun,
  .collage__notice-link { display: none; }

  /* Staircase turns sideways: each class is a bar that grows wider */
  .steps {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    gap: 5px;
    border-bottom: 0;
    border-left: 3px solid var(--crest-deep);
  }
  .step {
    justify-content: flex-start;
    width: calc(34% + var(--i) * 5.5%);
    height: 2.4rem;
    align-items: center;
    padding: 0 .9rem;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
  }
  .step__word { display: inline; white-space: pre; }

  .facts { padding-inline: 1.25rem; }
  .facts__row { grid-template-columns: minmax(0, 1fr); gap: .1rem; }

  .contact__actions .button { flex: 1 1 100%; }
  .contact__map, .contact__map iframe { min-height: 320px; }

  .call-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: block;
    padding: .65rem var(--gutter) calc(.65rem + env(safe-area-inset-bottom));
    background: rgba(1, 46, 75, .96);
  }
  .call-bar__button { width: 100%; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
