/* =========================================================
   Sanskarshala — Our Programme page
   (header, menu, hero leaves: style.css · container, reveal,
    eyebrow, section-title, cta, footer: home.css ·
    page headline, section bar, about-sec: about.css)
   ========================================================= */

.prog-hero__sub {
  max-width: 36em;
  margin: clamp(1.25rem, 2.4vw, 1.875rem) auto 0;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.6;
  color: rgba(246, 241, 230, 0.75);
}

/* numbered lists here draw their own numbers */
.themes,
.steps,
.grades,
.delivery {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* section heading block */
.prog-head {
  max-width: 47.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.375rem);
}

.prog-head__text {
  margin: 1.375rem 0 0;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
}

.prog-head__text--light {
  color: rgba(246, 241, 230, 0.78);
}

/* ============ WHAT WE TEACH ============ */

.prog-teach {
  background: var(--cream);
}

.themes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
  counter-reset: none;
}

/* each card appears a moment after the one before it (--i = its place in the list) */
.themes .theme:nth-child(1) { --i: 0; }
.themes .theme:nth-child(2) { --i: 1; }
.themes .theme:nth-child(3) { --i: 2; }
.themes .theme:nth-child(4) { --i: 3; }
.themes .theme:nth-child(5) { --i: 4; }
.themes .theme:nth-child(6) { --i: 5; }
.themes .theme:nth-child(7) { --i: 6; }
.themes .theme:nth-child(8) { --i: 7; }
.themes .theme:nth-child(9) { --i: 8; }
.themes .theme:nth-child(10) { --i: 9; }
.themes .theme:nth-child(11) { --i: 10; }
.themes .theme:nth-child(12) { --i: 11; }
.themes .theme:nth-child(13) { --i: 12; }
.themes .theme:nth-child(14) { --i: 13; }

.theme {
  --c: var(--orange);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 11.875rem;
  padding: 1.375rem 1.25rem 1.25rem;
  border-radius: 1.25rem;
  background: var(--card);
  border-top: 0.3125rem solid var(--c);
  box-shadow: 0 0.875rem 1.875rem rgba(30, 43, 34, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme:hover {
  transform: translateY(-0.375rem);
  box-shadow: 0 1.375rem 2.5rem rgba(30, 43, 34, 0.14);
}

/* scroll-in: the cards slide in from the left, one after another (01 → 10).
   The list is the .reveal element (about.js adds .is-visible); it stays put itself. */
.themes.reveal {
  opacity: 1;
  transform: none;
}

.themes.reveal:not(.is-visible) .theme {
  opacity: 0;
}

.themes.is-visible .theme {
  animation: theme-in 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i) * 160ms);
}

@keyframes theme-in {
  from {
    opacity: 0;
    transform: translateX(-5.625rem);
  }
}


.theme__num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--c);
}

.theme h3 {
  margin: 1rem 0 1.125rem;
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.theme__tag {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.3125rem 0.6875rem;
  border-radius: 62.4375rem;
  background: rgba(0, 0, 0, 0.06);                            /* browsers without color-mix() */
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ============ HOW WE TEACH ============ */

.prog-how {
  background:
    radial-gradient(ellipse 50% 70% at 90% 10%, rgba(185, 226, 140, 0.12), transparent 70%),
    var(--menu-green);
  color: var(--cream);
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.875rem, 2vw, 1.75rem);
}

/* dotted path joining the steps */
.steps::before {
  content: "";
  position: absolute;
  top: 2.125rem;
  left: 8%;
  right: 8%;
  border-top: 2px dashed rgba(185, 226, 140, 0.45);
}

.step {
  position: relative;
  text-align: center;
}

.step__icon {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--menu-green);
  box-shadow: 0 0 0 0.5rem var(--menu-green);
  transition: transform 0.3s var(--ease-out-back);
}

.step:hover .step__icon {
  transform: scale(1.1) rotate(-6deg);
}

.step__icon svg {
  width: 1.875rem;
  height: 1.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--lime);
}

.step p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(246, 241, 230, 0.8);
}

/* ============ CURRICULUM COMPATIBILITY ============ */

.prog-fit {
  background: var(--card);
}

.prog-fit__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6.25rem);
  align-items: start;   /* the heading at the top, so it is on the first screen of short laptops too */
}

.prog-fit .prog-head {
  margin-bottom: 0;
}

.badges {
  display: grid;
  gap: 1rem;
}

.badge {
  display: flex;
  align-items: center;
  gap: 1.375rem;
  padding: 1.375rem 1.625rem;
  border-radius: 1.25rem;
  background: var(--cream);
  border: 1.5px solid rgba(4, 82, 29, 0.1);
}

.badge__mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 4.875rem;
  height: 4.875rem;
  border-radius: 50%;
  background: var(--menu-green);
  color: var(--yellow);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* logo pictures: white circle, each picture zoomed onto its logo part
   (--w = picture width, --x / --y = offset, all as % of the circle) */
.badge__mark:has(img) {
  background: #fff;
}

/* green ring drawn over the picture */
.badge__mark:has(img)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--menu-green);
}

.badge__mark img {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--w);
  max-width: none;
  height: auto;
}

.badge__mark--nep  { --w: 320%; --x: -57%;  --y: -75%;  }  /* "NEP 2020" hub of the wheel */
.badge__mark--ncf  { --w: 330%; --x: 12%;   --y: 7%; }     /* sun-and-book mark */
.badge__mark--seed { --w: 128%; --x: -14%;  --y: 4%; }     /* rosette icon */

.badge h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--menu-green);
}

.badge p {
  margin: 0;
  line-height: 1.5;
  color: var(--muted);
}

/* ============ WHAT SCHOOLS GET ============ */

.prog-kit {
  background: var(--cream);
}

.kit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.kit__item {
  --c: var(--orange);
  padding: clamp(1.625rem, 2.6vw, 2.25rem);
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow: 0 0.875rem 1.875rem rgba(30, 43, 34, 0.08);
  transition: transform 0.3s ease;
}

.kit__item:hover {
  transform: translateY(-0.375rem);
}

.kit__item--green  { --c: #3fae49; }
.kit__item--blue   { --c: #2f9fd0; }
.kit__item--yellow { --c: #e9b21c; }

.kit__icon {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  margin-bottom: 1.375rem;
  border-radius: 1.125rem;
  background: var(--c);
  color: #fff;
}

.kit__icon svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kit__item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kit__item p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

/* ============ FOR WHICH GRADES? ============ */

.prog-grades {
  background: linear-gradient(180deg, #d9effa 0%, var(--cream) 100%);
}

.prog-grades__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6.25rem);
  align-items: center;
}

.prog-grades .prog-head {
  margin-bottom: 0;
}

.prog-grades__notes {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.75rem;
}

.prog-grades__notes li {
  position: relative;
  padding-left: 1.625rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.prog-grades__notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--orange);
}

/* a staircase of grade blocks */
.grades {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.375rem, 1vw, 0.75rem);
  height: clamp(15rem, 26vw, 22.5rem);
}

/* each bar knows its step (height and timing come from --g) */
.grades li:nth-child(1) { --g: 0; }
.grades li:nth-child(2) { --g: 1; }
.grades li:nth-child(3) { --g: 2; }
.grades li:nth-child(4) { --g: 3; }
.grades li:nth-child(5) { --g: 4; }
.grades li:nth-child(6) { --g: 5; }
.grades li:nth-child(7) { --g: 6; }
.grades li:nth-child(8) { --g: 7; }

.grades li {
  display: grid;
  place-items: start center;
  flex: 1;
  max-width: 4.75rem;
  height: calc(24% + var(--g) * 10.8%);   /* 8 steps, the last one full height */
  padding-top: 0.75rem;
  border-radius: 0.875rem 0.875rem 0.375rem 0.375rem;
  background: linear-gradient(180deg, #3fae49, var(--menu-green));
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  box-shadow: 0 0.625rem 1.25rem rgba(4, 82, 29, 0.2);
}

.grades li:nth-child(even) {
  background: linear-gradient(180deg, #f7b23b, var(--orange));
}

/* scroll-in: the blocks rise from the bottom one after another, grade 1 → grade 8
   (revealed from below rather than stretched, so the numbers keep their shape) */
.grades.reveal {
  opacity: 1;
  transform: none;
}

.grades.reveal:not(.is-visible) li {
  clip-path: inset(100% 0 0 0);
}

.grades.is-visible li {
  animation: grade-up 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--g) * 220ms);
}

@keyframes grade-up {
  from { clip-path: inset(100% 0 0 0 round 0.875rem 0.875rem 0.375rem 0.375rem); }
  to   { clip-path: inset(0 0 0 0 round 0.875rem 0.875rem 0.375rem 0.375rem); }
}

@media (prefers-reduced-motion: reduce) {
  .themes.is-visible .theme,
  .grades.is-visible li {
    animation: none;
  }
}

/* ============ IN-SCHOOL DELIVERY ============ */

.prog-delivery {
  background: var(--bg);
  color: var(--cream);
}

.delivery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.delivery__item {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 1.5rem;
  background: rgba(246, 241, 230, 0.06);
  border: 1px solid rgba(185, 226, 140, 0.18);
}

.delivery__num {
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  margin-bottom: 1.375rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
}

.delivery__item h3 {
  margin: 0 0 0.625rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--lime);
}

.delivery__item p {
  margin: 0;
  line-height: 1.6;
  color: rgba(246, 241, 230, 0.8);
}

/* ============ THE SMALLER PROGRAMME PAGES (pages/programme/*.html) ============ */

/* a shorter headline than on the Our programme page */
.about-hero--short {
  min-height: 62vh;
  min-height: 62svh;
}

/* the bar linking the six pages (sticky, the same look as the section bar, .subnav in about.css) */
.prog-pages__list {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  max-width: 87.5rem;
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.prog-pages__list::-webkit-scrollbar {
  display: none;
}

.prog-pages__list a {
  display: block;
  padding: 0.625rem 1rem;
  border-radius: 62.4375rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.prog-pages__list a:hover,
.prog-pages__list a:focus-visible {
  background: rgba(4, 82, 29, 0.08);
  outline: none;
}

.prog-pages__list a[aria-current="page"] {
  background: var(--menu-green);
  color: var(--cream);
}

/* "Learn more" under a section heading on the Our programme page */
.prog-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.375rem;
  padding-bottom: 0.1875rem;
  border-bottom: 2px solid currentColor;
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s ease;
}

/* touch screens: a taller invisible area to tap (the underline stays where it is) */
@media (pointer: coarse) {
  .prog-more {
    position: relative;
  }

  .prog-more::before {
    content: "";
    position: absolute;
    inset: -0.5rem 0;
  }
}

.prog-more:hover,
.prog-more:focus-visible {
  gap: 0.75rem;
  outline: none;
}

.prog-more svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* back to Our programme / next page, at the bottom of a smaller page */
.prog-pager {
  background: var(--cream);
}

.prog-pager__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.875rem;
  max-width: 87.5rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3rem) var(--gutter);
}

.prog-pager a {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.375rem;
  border: 1px solid rgba(4, 82, 29, 0.18);
  border-radius: 62.4375rem;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.prog-pager a:hover,
.prog-pager a:focus-visible {
  background: var(--menu-green);
  border-color: var(--menu-green);
  color: var(--cream);
  outline: none;
}

.prog-pager svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1100px) {
  /* 10 values: 2 per row, so none is left alone on the last row */
  .themes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 2.75rem;
  }

  .steps::before {
    display: none;
  }
}

@media (max-width: 900px) {
  .prog-fit__grid,
  .prog-grades__grid {
    grid-template-columns: 1fr;
  }

  .kit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* the 3 delivery steps side by side (2 columns would leave the third alone) */
  .delivery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .prog-pages__list {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .prog-pager__inner {
    flex-direction: column;
  }

  .prog-pager a {
    justify-content: center;
  }

  .themes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme {
    min-height: 10rem;
    padding: 1.125rem 1rem 1rem;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kit,
  .delivery {
    grid-template-columns: 1fr;
  }

  .badge {
    padding: 1.125rem;
    gap: 1rem;
  }

  .badge__mark {
    width: 4rem;
    height: 4rem;
    font-size: 0.82rem;
  }
}
