/* ==================================================================
   HIS — Home page. Loads after styles.css and academics-hero.css (the
   hero is the Academics walk). The sections reuse the Academics page
   components from styles.css; this file only adds what the home page
   needs on top: the stage links, the events list and a few spacings.
   ================================================================== */

/* ---------- 1. hero: the walk is shorter, then the voyage (home-hero.js) ---------- */
.hm-hero { height: 720vh; z-index: 2; pointer-events: none; }   /* only the scene itself takes clicks */
.hm-hero .ac-stage { pointer-events: auto; }
/* the first section sits right behind the hero's last screen, so the circle that opens at the end of
   the voyage (a hole cut through the scene, home-hero.js) shows it straight away */
.hm-hero + .hm-why { margin-top: calc(-1 * max(100vh, 560px)); z-index: 1; }
.oc { position: absolute; inset: 0; z-index: 3; visibility: hidden; opacity: 0; }
.oc canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.oc-stops { position: absolute; inset: 0; will-change: transform; }
.oc-stop { position: absolute; inset: 0; pointer-events: none; }
/* each stop's line and photos are placed by the script, in perspective from the horizon */
.oc-txt, .oc-ph { position: absolute; left: 0; top: 0; visibility: hidden; opacity: 0; will-change: transform, opacity; }
.oc-txt { width: min(17em, 84vw); font-size: clamp(34px, 4.4vw, 76px); display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; transform-origin: 50% 50%; }
.oc-txt p { margin: 0; font-family: "Raleway", system-ui, sans-serif; font-weight: 300; font-size: 1em; line-height: 1.06; text-transform: uppercase; letter-spacing: -0.005em; text-shadow: 0 2px 30px rgba(15, 22, 60, 0.3); }
.oc-k { margin-bottom: 0.9em; font-family: "Poppins", system-ui, sans-serif; font-size: max(11px, 0.17em); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #f3cf7d; }
.oc-txt b { font-weight: 500; color: #f3cf7d; }
.oc-ph { width: 15vw; height: 15vw; margin: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 30px 60px -20px rgba(8, 12, 40, 0.6); }
.oc-ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.oc-ph.is-open { opacity: 0 !important; }
.oc-more { display: none; }

/* at each stop the photo grows into a square card, about a quarter of the page wide, at the same tilt,
   laid over the scene. As it grows the photo fades into one solid colour with the text on it.
   home-hero.js grows it out of the photo and back, and holds the scroll until it is closed. */
.oc-cards { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.oc-card { --s: min(clamp(300px, 26vw, 480px), 74vh); position: absolute; top: 50%; width: var(--s); height: var(--s); margin-top: calc(var(--s) / -2); overflow: hidden; border-radius: 16px; background: var(--navy); color: #fff; pointer-events: auto; box-shadow: 0 40px 90px -30px rgba(8, 12, 40, 0.7); }
.oc-card.l { left: 9vw; }
.oc-card.r { right: 9vw; }
.oc-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }   /* only seen while it grows and shrinks */
.oc-card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(24px, 2.2vw, 40px); }
.oc-more-k { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); }
.oc-card-body h3 { margin: 0 0 16px; font-family: "Raleway", system-ui, sans-serif; font-weight: 400; font-size: clamp(22px, 1.8vw, 32px); line-height: 1.15; color: #fff; }
.oc-card-body p { margin: 0; font-size: clamp(13px, 0.95vw, 16px); line-height: 1.65; color: rgba(255, 255, 255, 0.82); }
.oc-card-x { position: absolute; top: 18px; right: 18px; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(6px); color: #fff; cursor: pointer; transition: transform 0.35s var(--ease-spring), background 0.3s, color 0.3s; }
.oc-card-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.oc-card-x:hover { transform: rotate(90deg) scale(1.06); background: #fff; color: var(--navy); }
.oc-card-x:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.oc-hint { position: absolute; left: 50%; bottom: 4.5vh; z-index: 4; margin: 0; padding: 9px 18px; border-radius: 99px; background: rgba(15, 22, 60, 0.45); backdrop-filter: blur(6px); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: translate(-50%, 8px); transition: opacity 0.5s, transform 0.5s; pointer-events: none; }
.oc-hint.on { opacity: 1; transform: translate(-50%, 0); }

/* a text link in the site's uppercase style */
.hm-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 2.6vw; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); text-decoration: none; }
.hm-link i { font-style: normal; transition: transform 0.45s var(--ease-spring); }
.hm-link:hover i, .hm-link:focus-visible i { transform: translateX(6px); }
.hm-link.light { color: var(--gold-soft); align-self: flex-start; }

.hm-kicker { display: block; margin-bottom: 1.4vw; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* ---------- 2. why choose HIS: the numbered list on white ---------- */
.hm-why { position: relative; padding-bottom: 9vw; }
.hm-why .approach-body { margin-top: 0; }

/* ---------- 3. learning journey: four stage cards that link to the stage pages ---------- */
.hm-journey .bc-row { grid-template-columns: repeat(4, 1fr); margin: 3vw 9vw 0; gap: 2vw; }
.hm-journey .bc-card { display: block; color: var(--ink); text-decoration: none; }
.hm-journey .bc-card:nth-child(2), .hm-journey .bc-card:nth-child(4) { margin-top: 5vw; }
.hm-journey .reveal:nth-child(2) { transition-delay: 0.08s; }
.hm-journey .reveal:nth-child(3) { transition-delay: 0.16s; }
.hm-journey .reveal:nth-child(4) { transition-delay: 0.24s; }
.bc-label em { display: block; margin-bottom: 0.5vw; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.bc-go { display: inline-flex; align-items: center; gap: 10px; margin-top: 1vw; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); }
.bc-go i { font-style: normal; transition: transform 0.45s var(--ease-spring); }
.hm-journey .bc-card:hover .bc-go i, .hm-journey .bc-card:focus-visible .bc-go i { transform: translateX(6px); }
.hm-journey .bc-card:hover .bc-img img { transform: scale(1.05); }

/* ---------- 4. student stories: the growth band ---------- */
.growth-right .hm-link { margin-top: 3vw; }

/* ---------- 5. upcoming events: dated rows with drawn dividers, like the FAQ ---------- */
.hm-events { align-items: start; }
.hm-ev-photo { margin-top: 2.4vw; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--ph); }
.ev-list { list-style: none; }
.ev { position: relative; opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.ev.in { opacity: 1; transform: none; }
.ev::before, .ev:last-child::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(20,20,20,0.16); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out); }
.ev::before { top: 0; }
.ev:last-child::after { bottom: 0; transition-delay: 0.2s; }
.ev.in::before, .ev.in:last-child::after { transform: scaleX(1); }
.ev a { display: grid; grid-template-columns: 6vw 1fr auto; gap: 2vw; align-items: center; padding: 1.9vw 0; color: var(--ink); text-decoration: none; }
.ev time { display: flex; flex-direction: column; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey-text); }
.ev time b { font-family: "Raleway", system-ui, sans-serif; font-size: clamp(30px, 3vw, 50px); font-weight: 300; line-height: 1; letter-spacing: 0; color: var(--gold); margin-bottom: 6px; }
.ev em { display: block; margin-bottom: 0.4vw; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.ev h4 { font-size: clamp(15px, 1.25vw, 21px); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.4vw; transition: color 0.3s, transform 0.5s var(--ease-out); }
.ev p { font-size: var(--body); line-height: 1.6; color: var(--grey-text); }
.ev a > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #c9c9cf; font-style: normal; transition: background 0.4s, border-color 0.4s, color 0.4s, transform 0.5s var(--ease-spring); }
.ev a:hover h4, .ev a:focus-visible h4 { color: var(--navy); transform: translateX(6px); }
.ev a:hover > i, .ev a:focus-visible > i { background: var(--gold); border-color: var(--gold); color: #fff; transform: rotate(-45deg); }

/* ---------- 6. admissions CTA: the step cards, outlined (no drawn-line system on this page) ---------- */
.hm-cta .step-card { border: 1px solid #dcdce0; transition: color 0.5s var(--ease-out), border-color 0.5s, opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.hm-cta .step-card:hover { border-color: var(--c); }   /* the edge takes the colour that fills the card on hover, as on the academics page */
.hm-cta .cta-row .reveal:nth-child(2) { transition-delay: 0.1s; }
.hm-cta .cta-row .reveal:nth-child(3) { transition-delay: 0.2s; }

.hm a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- tablet / mobile ---------- */
/* the opening welcome: larger, on three lines (Welcome to / the school / in Dehradun) */
.ac-welcome p { max-width: none; font-size: clamp(34px, 4.4vw, 76px); line-height: 1.12; }

@media (max-width: 900px) {
  .ac-welcome p { font-size: clamp(28px, 7.4vw, 44px); }
  .hm-hero { height: 640vh; }
  .oc-txt { width: 88vw; font-size: clamp(28px, 8.6vw, 42px); }
  .oc-ph { width: 34vw; height: 34vw; }
  .oc-card { --s: min(82vw, 72vh); }
  .oc-card.l, .oc-card.r { left: 50%; right: auto; margin-left: calc(var(--s) / -2); }
  .hm-link { margin-top: 24px; }
  .hm-kicker { margin-bottom: 14px; }
  .hm-why { padding-bottom: 70px; }
  .hm-journey .bc-row { grid-template-columns: repeat(2, 1fr); margin: 20px 7vw 0; gap: 16px; }
  .hm-journey .bc-card:nth-child(2), .hm-journey .bc-card:nth-child(4) { margin-top: 0; }
  .bc-label em { margin-bottom: 6px; }
  .bc-go { margin-top: 10px; }
  .growth-right .hm-link { margin-top: 26px; }
  .hm-events .faq-head .cap-title { margin-bottom: 18px; }
  .hm-ev-photo { margin-top: 24px; }
  .ev p { font-size: 14px; }
  .ev a { grid-template-columns: 58px 1fr auto; gap: 16px; padding: 20px 0; }
  .ev em, .ev h4 { margin-bottom: 4px; }
  .ev a > i { width: 36px; height: 36px; }
}
