/* ==========================================================
   Academics page
   Loads after style.css and reuses its colour and type tokens
   ========================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.ac-hero {
  position: relative;
  min-height: min(72vh, 660px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--forest);
  color: #fff;
}

.ac-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
  /* favour the smart board side */
  background: #E9E3D8;
}

@media (min-width: 1200px) {

  /* Shape the hero instead of filling screen height, so the photo
     is barely cropped on a large monitor. */
  .ac-hero {
    min-height: 0;
    aspect-ratio: 21 / 9;
    max-height: 700px;
  }
}

.ac-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(20, 19, 17, .88) 0%, rgba(20, 19, 17, .55) 45%, rgba(20, 19, 17, .2) 100%),
    linear-gradient(to top, rgba(20, 19, 17, .75) 0%, rgba(20, 19, 17, .2) 55%, rgba(20, 19, 17, .1) 100%);
}

.ac-hero-text {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-bottom: clamp(40px, 7vw, 80px);
}

.ac-hero h1 {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 700;
  margin-bottom: 10px;
}

.ac-hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: #EBDDBF;
  margin: 0;
  max-width: 680px;
}

.crumb {
  font-size: 14px;
  color: #CFC6B4;
  margin-bottom: 14px;
}

.crumb a {
  color: var(--gold);
  text-decoration: none;
}

.crumb a:hover {
  color: #fff;
}

/* ---------- Highlights ---------- */
.highlights {
  padding-block: var(--space);
}

/* The 15:1 ratio is the one big number on the page */
.ratio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.ratio-num {
  margin: 0;
  font: 700 clamp(88px, 14vw, 168px)/0.9 var(--serif);
  color: var(--gold-deep);
}

.ratio h3 {
  font-size: clamp(28px, 3vw, 36px);
}

.ratio p {
  color: var(--muted);
  max-width: 520px;
  margin: 0;
}

.hl-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
}

.hl-grid li {
  border-top: 2px solid var(--gold);
  padding-top: 20px;
}

.hl-grid h3 {
  font-size: 26px;
}

.hl-grid p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Chromebooks ---------- */
.cb {
  background: #F1ECE1;
  padding-block: var(--space);
  scroll-margin-top: 72px;
}

.cb-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  margin-bottom: 48px;
}

.cb-classes {
  margin: 0;
  font: 700 clamp(44px, 7vw, 92px)/0.95 var(--serif);
  color: var(--gold-deep);
}

.cb-head h2 {
  margin-bottom: 12px;
}

.cb-head .lead {
  font-family: var(--serif);
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.45;
  max-width: 640px;
  margin: 0;
}

.cb-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.cb-body img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #E9E3D8;
}

.cb-access {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.cb-access h3 {
  font-size: 26px;
  margin-bottom: 12px;
}

.cb-access ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cb-access li {
  padding: 10px 0 10px 30px;
  border-top: 1px solid var(--line);
  position: relative;
}

.cb-access li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--forest);
  font-weight: 700;
}

.cb-blocked li {
  color: var(--muted);
}

.cb-blocked li::before {
  content: "\2715";
  color: #9A3B2E;
}

.cb-note {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 18px 22px;
  background: #fff;
  border-left: 3px solid var(--gold);
  border-radius: 2px;
  font: italic 20px/1.4 var(--serif);
}

/* ---------- AI learning ---------- */
.ac-ai {
  background: var(--ink);
  color: #E8E1D3;
  padding-block: var(--space);
}

.ac-ai-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.ac-ai h2 {
  color: #fff;
}

.ac-ai p {
  font-family: var(--serif);
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.45;
  color: #EBDDBF;
}

.ac-ai img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: #2A2926;
}

/* ---------- Subjects ---------- */
.subjects {
  padding-block: var(--space);
}

.subjects-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.subjects-head p {
  color: var(--muted);
  font-size: 18px;
}

.subject {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  grid-template-areas: "head gallery" "text gallery";
  gap: 16px clamp(32px, 6vw, 72px);
  align-items: start;
  padding-block: 48px;
  border-top: 1px solid var(--line);
}

.subject-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 16px;
}

.subject-head h3 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 40px);
}

.subject-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.subject>p {
  grid-area: text;
  color: var(--muted);
  margin: 0;
}

/* Swipeable photo strip: no JavaScript needed */
.gallery {
  grid-area: gallery;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-color: var(--gold) transparent;
}

.gallery:has(> img:only-child) {
  grid-auto-columns: 100%;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #E9E3D8;
  scroll-snap-align: start;
  background: #E9E3D8;
}

/* ---------- Closing quote ---------- */
.ac-quote {
  background: var(--forest);
  color: #EFE7D6;
  padding-block: var(--space);
  text-align: center;
}

.ac-quote .narrow {
  margin-inline: auto;
}

.ac-quote-label {
  font-size: 15px;
  color: #BFB49D;
}

.ac-quote blockquote {
  margin: 0;
}

.ac-quote blockquote p {
  font: 600 clamp(28px, 3.6vw, 44px)/1.3 var(--serif);
  color: #fff;
}

.ac-quote cite {
  font-style: normal;
  font-size: 15px;
  color: #D9B56A;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 40px;
}

.btn-ghost {
  background: transparent;
  color: #F4E9D2;
}

.btn-ghost:hover {
  background: var(--gold);
  color: var(--ink);
}

/* keep the last line clear of the floating WhatsApp / Call buttons */
.ac-quote {
  padding-bottom: calc(var(--space) + 72px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {

  .ac-ai-inner,
  .cb-body {
    grid-template-columns: 1fr;
  }

  .ac-hero::after {
    background: linear-gradient(to top, rgba(20, 19, 17, .88) 0%, rgba(20, 19, 17, .45) 60%, rgba(20, 19, 17, .3) 100%);
  }

  .subject {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "text" "gallery";
  }
}

@media (max-width: 560px) {
  .hl-grid {
    grid-template-columns: 1fr;
  }

  .ratio,
  .cb-head,
  .cb-access {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}