/* home.css — Stage J "Global Campus" rewrite (PUBLIC_UI_DESIGN.md).
   Token-driven; the hero recipe lives in site.css (.sj-hero). Section map:
   welcome band → principal → motto → campus cards → stat band → What's
   Unique → contact. The updates carousel / ticker / marks marquee /
   testimonials keep their own partial sheets. */

html { overflow-x: hidden; }

/* ---------- welcome band ---------- */
.home-text {
  background: var(--sj-grad-brand);
  text-align: center;
  padding: clamp(44px, 6vw, 72px) 16px;
  word-spacing: 6px;
}
.home-text h2 {
  font-family: var(--sj-font-head);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 400;
  color: #fff;
  margin: 0;
}
.home-text span {
  font-family: var(--sj-font-head);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 400;
  color: var(--sj-gold);
}

/* ---------- principal welcome ---------- */
.containers {
  width: min(1200px, 92%);
  margin: auto;
  padding: clamp(40px, 6vw, 72px) 0;
}
.about-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: clamp(20px, 3vw, 36px);
  background: var(--sj-grad-brand);
  color: #fff;
  border-radius: var(--sj-r-card);
  box-shadow: var(--sj-shadow-2);
}
.about-image { flex: 1 1 34%; max-width: 34%; }
.about-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
}
.about-content { flex: 1 1 66%; max-width: 66%; padding: 10px 10px 10px 36px; }
.about-content h3 {
  font-family: var(--sj-font-body);
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--sj-gold);
  margin: 0 0 8px;
}
.about-content h2 {
  font-family: var(--sj-font-head);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 38px);
  margin: 0 0 14px;
}
.about-content p {
  font-family: var(--sj-font-body);
  font-size: 15.5px; line-height: 1.75;
  color: rgba(255, 255, 255, .88);
}
.about-content .sj-btn { margin-top: 14px; }
.about-content .download-btn { color: #fff; text-decoration: underline; }
.about-content .download-btn:hover { color: var(--sj-gold); }
@media (max-width: 768px) {
  .about-section { flex-direction: column; text-align: center; }
  .about-image, .about-content { max-width: 100%; flex-basis: 100%; padding: 0; }
  .about-image { width: min(320px, 80%); margin-bottom: 18px; }
  .about-content p { text-align: justify; }
}

/* ---------- motto ---------- */
.motto {
  margin: 0 auto;
  width: min(1200px, 92%);
  text-align: center;
  border-radius: var(--sj-r-card);
  padding: clamp(36px, 5vw, 64px);
  background: linear-gradient(rgba(26, 53, 93, .92), rgba(26, 53, 93, .92)),
    url("/media/static/schname.jpg") center/cover; /* N5 optimized copy */
  box-shadow: var(--sj-shadow-2);
}
.motto h1 {
  font-family: var(--sj-font-head);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 400;
  color: #fff;
}
.motto h1::after {
  content: ""; display: block;
  width: 44px; height: 4px; border-radius: 2px;
  background: var(--sj-gold); margin: 14px auto 0;
}
.motto > p {
  font-family: var(--sj-font-body);
  color: var(--sj-gold);
  margin-top: 12px;
}
.motto-row { margin-top: 4%; display: flex; justify-content: space-between; gap: 22px; }
.motto-col {
  flex-basis: 50%;
  background: #fff;
  border-radius: 12px;
  padding: 26px 22px;
  box-sizing: border-box;
  transition: transform var(--sj-t-med) var(--sj-ease), box-shadow var(--sj-t-med) var(--sj-ease);
}
.motto-col:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.motto-col h2 {
  font-family: var(--sj-font-head);
  text-align: center; font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  margin: 6px 0 10px;
  color: var(--sj-navy-dark);
}
.motto-col p {
  font-family: var(--sj-font-body);
  color: var(--sj-ink-soft);
  line-height: 1.7;
  padding: 0 6px;
  text-align: justify; /* K7: body copy justifies site-wide */
}
@media (max-width: 800px) { .motto-row { flex-direction: column; } }

/* ---------- campus cards ---------- */
.products {
  width: 100%;
  background: linear-gradient(rgba(43, 75, 138, .78), rgba(26, 53, 93, .85)),
    url("/media/static/asemb1.jpg") center/cover; /* F2 recompression */
  text-align: center;
  padding: var(--sj-sec-pad) 0;
  margin-top: clamp(40px, 6vw, 72px);
}
.products h1 {
  color: var(--sj-gold);
  font-family: var(--sj-font-head);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 400;
}
.products h1::after {
  content: ""; display: block;
  width: 44px; height: 4px; border-radius: 2px;
  background: var(--sj-gold); margin: 14px auto 0;
}
.products > p {
  font-family: var(--sj-font-body);
  color: rgba(255, 255, 255, .88);
  font-size: 16px; line-height: 1.75;
  max-width: 72ch;
  margin: 0 auto;
  padding: 20px;
  text-align: justify; /* K7 */
}
.card-deck {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 24px clamp(16px, 4vw, 48px) 0;
  max-width: 1400px;
  margin: 0 auto;
}
.card1, .card2, .card3 {
  width: 30%;
  position: relative;
  overflow: hidden;
  border-radius: var(--sj-r-card);
  box-shadow: var(--sj-shadow-2);
}
.card-img-top {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--sj-t-med) var(--sj-ease), filter var(--sj-t-med) var(--sj-ease);
  border-radius: var(--sj-r-card);
}
.card-deck .card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 70px 0 26px;
  background: linear-gradient(to top, rgba(26, 53, 93, .85), rgba(26, 53, 93, 0));
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--sj-t-med) var(--sj-ease), opacity var(--sj-t-med) var(--sj-ease);
}
.card1:hover .card-body, .card2:hover .card-body, .card3:hover .card-body {
  transform: translateY(0); opacity: 1;
}
.card1:hover .card-img-top, .card2:hover .card-img-top, .card3:hover .card-img-top {
  transform: scale(1.07);
}
@media (hover: none) { /* touch: the CTA must not hide behind a hover */
  .card-deck .card-body { transform: none; opacity: 1; }
}
.btn-dark {
  font-family: var(--sj-font-body);
  font-size: 15px; font-weight: 700;
  padding: 12px 26px;
  background: var(--sj-gold) !important;
  color: var(--sj-navy-dark) !important;
  border: none !important;
  cursor: pointer;
  border-radius: var(--sj-r-btn);
  box-shadow: var(--sj-shadow-1);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background var(--sj-t-fast) ease, transform var(--sj-t-fast) ease;
}
.btn-dark:hover { background: #f2cc00 !important; transform: translateY(-2px); }
.btn-dark:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
@media (max-width: 1200px) { .card1, .card2, .card3 { width: 45%; } }
@media (max-width: 768px) {
  .card-deck { flex-direction: column; align-items: center; }
  .card1, .card2, .card3 { width: 80%; margin-bottom: 20px; }
}
@media (max-width: 576px) {
  .card1, .card2, .card3 { width: 100%; }
  .products > p { font-size: 13.5px; text-align: justify; }
}

/* ---------- stat counter band ---------- */
.fun-facts {
  background: var(--sj-navy-dark);
  border-top: 4px solid var(--sj-gold);
  position: relative;
  padding: clamp(48px, 6vw, 76px) 0;
}
.fun-facts .container {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  flex-wrap: wrap;
}
.fun-facts .single-fact {
  text-align: center;
  margin: 10px;
  min-width: 170px;
  transition: transform var(--sj-t-fast) ease;
}
.fun-facts .single-fact:hover { transform: translateY(-8px); }
.fun-facts .single-fact i {
  font-size: 30px;
  color: var(--sj-gold);
  margin-bottom: 18px;
}
.fun-facts .single-fact .number {
  font-family: var(--sj-font-head);
  color: #fff;
  font-weight: 400;
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 8px;
  display: block;
}
.fun-facts .single-fact p {
  font-family: var(--sj-font-body);
  color: rgba(255, 255, 255, .75);
  font-size: 15px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
}

/* ---------- What's Unique ---------- */
.newtemp-body {
  background: linear-gradient(rgba(26, 53, 93, .9), rgba(26, 53, 93, .9)),
    url("/media/static/schname.jpg") center/cover; /* N5 optimized copy */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: var(--sj-sec-pad) 0;
}
.new-temp-text h2 {
  font-family: var(--sj-font-head);
  color: #fff;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 400;
  margin-bottom: 10px;
}
.new-temp-text h2::after {
  content: ""; display: block;
  width: 44px; height: 4px; border-radius: 2px;
  background: var(--sj-gold); margin: 14px auto 28px;
}
.newtemp-about-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  width: min(1200px, 92%);
  margin: 10px;
}
.newtemp-about-section {
  display: flex;
  flex-direction: row;
  background-color: #fff;
  border-radius: var(--sj-r-card);
  box-shadow: var(--sj-shadow-2);
  overflow: hidden;
}
.newtemp-about-image { width: 50%; object-fit: cover; }
.newtemp-about-content {
  padding: clamp(22px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.newtemp-about-content h2 {
  font-family: var(--sj-font-head);
  color: var(--sj-navy-dark);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 400;
  margin: 0 0 6px;
}
.newtemp-about-content h2::after {
  content: ""; display: block;
  width: 36px; height: 3px; border-radius: 2px;
  background: var(--sj-gold); margin-top: 10px;
}
.newtemp-about-content p {
  font-family: var(--sj-font-body);
  font-size: 15.5px; line-height: 1.75;
  color: var(--sj-ink-soft);
  margin: 14px 0 0;
  text-align: justify;
}
.newtemp-about-content span { font-family: var(--sj-font-head); font-size: 17px; }
@media (max-width: 768px) {
  .newtemp-about-section { flex-direction: column; }
  .newtemp-about-image { width: 100%; }
}

/* ---------- contact ---------- */
.contact-section { margin: 0; padding: 0; box-sizing: border-box; }
.contactus {
  background: var(--sj-paper);
  position: relative;
  width: 100%;
  padding: var(--sj-sec-pad) clamp(16px, 6vw, 100px);
}
.contactus .title { display: flex; justify-content: center; align-items: center; }
.contactus .title h2 {
  font-family: var(--sj-font-head);
  color: var(--sj-navy-dark);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 400;
  padding-bottom: 6px;
}
.contactus .title h2::after {
  content: ""; display: block;
  width: 44px; height: 4px; border-radius: 2px;
  background: var(--sj-gold); margin: 14px auto 0;
}
.form *, .info *, .map * { font-family: var(--sj-font-body); }
.form h3, .info h3 { font-family: var(--sj-font-head); font-weight: 400; }
.form { grid-area: form; }
.info { grid-area: info; }
.map { grid-area: map; }
.contact {
  padding: clamp(24px, 3vw, 40px);
  background: #fff;
  border: 1px solid var(--sj-line-cool);
  border-radius: var(--sj-r-card);
  box-shadow: var(--sj-shadow-1);
}
.box {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 5fr 4fr;
  grid-template-areas:
    "form info"
    "form map";
  grid-gap: 20px;
  margin-top: 26px;
}
.contact h3 { color: var(--sj-navy-dark); font-size: 1.4em; margin-bottom: 12px; }
.formbox { position: relative; width: 100%; }
.formbox .row50 { display: flex; gap: 20px; }
.inputBox { display: flex; flex-direction: column; margin-bottom: 10px; width: 50%; }
.formbox .row100 .inputBox { width: 100%; }
.inputBox span { color: var(--sj-ink-soft); margin: 10px 0 5px; font-weight: 600; font-size: 13.5px; }
.inputBox input, .inputBox textarea {
  padding: 11px 12px;
  font-size: 1em;
  outline: none;
  border: 1.5px solid var(--sj-line-cool);
  border-radius: 8px;
  transition: border-color var(--sj-t-fast) ease, box-shadow var(--sj-t-fast) ease;
}
.inputBox input:focus, .inputBox textarea:focus {
  border-color: var(--sj-navy);
  box-shadow: 0 0 0 3px rgba(43, 75, 138, .15);
}
.inputBox textarea { resize: none; min-height: 220px; margin-bottom: 10px; }
.inputBox input[type="submit"] {
  color: #fff;
  background: var(--sj-grad-brand);
  border: 0;
  font-size: 1.05em;
  max-width: 140px;
  font-weight: 600;
  cursor: pointer;
  padding: 14px 15px;
  border-radius: var(--sj-r-btn);
  transition: filter var(--sj-t-fast) ease, transform var(--sj-t-fast) ease;
}
.inputBox input[type="submit"]:hover { filter: brightness(1.12); transform: translateY(-2px); }
/* K15: "Sending…" state. Authenticated SMTP takes a few seconds, so the button
   must visibly acknowledge the click — otherwise it reads as broken and people
   click again (duplicate enquiries, and the 5/hour limit burned). The button is
   disabled for the duration; the spinner is a sibling ::after on .inputBox
   because <input> is a replaced element and cannot host pseudo-elements. */
.inputBox input[type="submit"]:disabled {
  cursor: wait;
  opacity: .75;
  filter: none;
  transform: none;
}
/* .inputBox is flex-direction:column (it stacks the label above the field), so
   the row direction MUST be restated here or the spinner drops below the
   button and the box grows ~50px, making the page jump mid-send. */
.inputBox.is-sending { display: flex; flex-direction: row; align-items: center; gap: 12px; }
/* The button is width:100% on phones; as a flex item that would leave no room
   for the spinner, so while sending it becomes shrinkable instead. */
.inputBox.is-sending input[type="submit"] { flex: 1 1 auto; min-width: 0; }
/* A real element rather than a ::after — an <input> cannot host pseudo-elements,
   and a pseudo-element on the wrapper does not reliably take flex space here. */
.sj-sending-spinner {
  display: block;
  width: 20px; height: 20px;
  flex: 0 0 20px;
  box-sizing: border-box;
  border: 2.5px solid rgba(43, 75, 138, .25);
  border-top-color: var(--sj-navy);
  border-radius: 50%;
  animation: sj-spin .7s linear infinite;
}
@keyframes sj-spin { to { transform: rotate(360deg); } }
.inputBox ::placeholder { color: #9aa3b2; }
.info { background: var(--sj-grad-brand); border: 0; }
.info h3 { color: var(--sj-gold); margin: 10px 0 15px; }
.info .infoBox div { display: flex; align-items: center; margin-bottom: 10px; }
.info .infoBox div span {
  min-width: 40px; height: 40px;
  color: var(--sj-navy-dark);
  background: var(--sj-gold);
  display: flex; justify-content: center; align-items: center;
  font-size: 1.3em; border-radius: 50%;
  margin-right: 15px; margin-top: 15px;
}
.info .infoBox div p { color: #fff; font-size: 1.05em; margin-top: 20px; }
.info .infoBox div a { color: #fff; text-decoration: none; font-size: 1.05em; margin-top: 10px; }
.sci { display: flex; justify-content: flex-start; margin: 15px 15px 0 0; padding-left: 0; }
.sci li { list-style: none; margin: 0 17px 0 5px; }
.sci li a { color: var(--sj-gold); font-size: 1.7em; }
.sci li a:hover { color: #fff; }
.map { padding: 0; overflow: hidden; border-radius: var(--sj-r-card); }
.map iframe { width: 100%; height: 100%; }
@media (max-width: 991px) {
  .contactus { padding: 40px 20px; }
  .box {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: "form" "info" "map";
  }
  .formbox .row50 { flex-direction: column; gap: 0; }
  .inputBox { width: 100%; }
  .map { min-height: 300px; }
}

/* ===== K13 mobile (Home) — phone-tier rules; ≥992px untouched ===== */
@media (max-width: 991px) {
  /* FAB "Admissions" jump lands with the section title clear of the fixed nav */
  #contact { scroll-margin-top: calc(var(--sj-nav-h) + 12px); }
  /* Campus cards: one shared photo box. 3:4 ≈ the photos' natural 657×900,
     and height:auto simultaneously defeats the desktop height:100% (indefinite
     parent) and the legacy width=200/height=500 attr ratio — zero CLS.
     Scoped under .card-deck: bare .card1/2/3 also match testimonial cards. */
  .card-deck .card-img-top { aspect-ratio: 3 / 4; height: auto; }
  /* Stat band (had no mobile rules): equal 2×2 cells with hairline dividers —
     also fixes the 3+1 flex wrap the 720px container produced at 769–800. */
  .fun-facts .container { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .fun-facts .single-fact { margin: 0; min-width: 0; padding: 22px 10px; }
  .fun-facts .single-fact:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .fun-facts .single-fact:nth-child(odd)  { border-right:  1px solid rgba(255, 255, 255, .14); }
}
@media (max-width: 768px) {
  .home-text { padding: 40px 18px; word-spacing: 2px; }
  .home-text h2, .home-text span { font-size: clamp(22px, 5.5vw, 28px); line-height: 1.35; }
  .about-content h2 { font-size: clamp(24px, 6vw, 30px); }
  /* mobile type ramp — maxes equal the shipped floors, so no jump at 769px */
  .motto h1, .products h1, .contactus .title h2 { font-size: clamp(24px, 4.5vw, 30px); }
  .motto-row { margin-top: 22px; }
  .card-deck .card1, .card-deck .card2, .card-deck .card3 { width: min(420px, 100%); }
  .products > p { font-size: 14.5px; padding: 16px; }
  .fun-facts .single-fact i { font-size: 24px; margin-bottom: 10px; }
  .fun-facts .single-fact .number { font-size: clamp(30px, 5.5vw, 34px); }
  .fun-facts .single-fact p { font-size: 12.5px; letter-spacing: .5px; }
  .new-temp-text h2 { font-size: clamp(24px, 4.5vw, 30px); }
  /* What's-Unique: image ALWAYS above text when stacked. The DOM alternates
     image/content per row (admin-editing contract — untouched); order:-1 must
     also hit the <picture> wrapper non-legacy uploads render as. 4:3 = the
     feature_4x3 preset, so pipeline images crop zero. */
  .newtemp-about-section > .newtemp-about-image,
  .newtemp-about-section > picture { order: -1; width: 100%; }
  .newtemp-about-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; height: auto; }
  .newtemp-about-content h2 { font-size: clamp(20px, 5.2vw, 24px); }
}
@media (max-width: 576px) {
  body.index { --sj-sec-pad: clamp(44px, 11vw, 64px); } /* home-only rhythm tighten */
  .containers { padding: 36px 0; }
  .about-section .about-image { width: min(280px, 76%); }
  .motto { padding: 30px 18px; }
  .motto-col { padding: 22px 18px; }
  .inputBox input, .inputBox textarea { padding: 12px; }
  .inputBox textarea { min-height: 160px; }
  .inputBox input[type="submit"] { width: 100%; max-width: none; min-height: 48px; }
  .contactus { padding-left: 14px; padding-right: 14px; }
  /* transforms don't shrink layout boxes: the scale(.77) widget still occupied
     304px and overflowed narrow cards — pin the box to the visual (304×.77). */
  .contactus .g-recaptcha { width: 234px; height: 60px; }
}
@media (max-width: 400px) {
  .contactus .contact { padding: 20px 14px; } /* 320px viewports: inner ≥ the 234px widget */
}
