/* =========================================================
   Sanskarshala — Hero page
   ========================================================= */

/* ============ SITE FONT: Pulp Display (FONT folder) ============ */

@font-face {
  font-family: "Pulp Display";
  src: url("../fonts/PulpDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pulp Display";
  src: url("../fonts/PulpDisplay-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pulp Display";
  src: url("../fonts/PulpDisplay-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pulp Display";
  src: url("../fonts/PulpDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pulp Display";
  src: url("../fonts/PulpDisplay-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1e2b22;          /* hero background */
  --leaf-1: #1a261e;      /* far layer   */
  --leaf-2: #17221b;      /* middle layer */
  --leaf-3: #141e17;      /* near layer  */
  --menu-green: #04521d;  /* dropdown panel + tab */
  --menu-deep: #003d12;   /* search field */
  --lime: #b9e28c;        /* light green accents in the menu */
  --cream: #f6f1e6;
  --card: #fbf8f1;
  --orange: #f07c1b;
  --yellow: #f7d23e;
  --ink: #1d1d1b;

  --font-sans: "Pulp Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: var(--font-sans);   /* accent words use the same font, set apart by colour */

  --gutter: clamp(1rem, 4.2vw, 5rem);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

/* smooth cross-page change (index → home) in browsers that support it */
@view-transition {
  navigation: auto;
}

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

html {
  scroll-behavior: smooth;
}

/* big screens (large monitors, TVs, projectors in 4K): the sizes of the whole website are in rem
   (1rem = 16px), so from 1920px wide everything grows with the screen. A 2560 or 3840 (4K) screen then
   shows the same layout as a 1920 × 1080 one, only bigger. The height counts too, so a very wide but
   short screen (e.g. 3440 × 1440) is not filled with text that is too tall for it. */
@media (min-width: 1921px) {
  html {
    font-size: max(100%, min(100vw / 120, 100vh / 67.5));
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

.sr-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.75rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  border-radius: 0.625rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

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

/* ============ HEADER ============ */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.125rem, 3.2vw, 3.125rem) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

/* the Sanskar Shala logo (white lettering, for dark / green backgrounds) */
.brand__logo {
  display: block;
  width: auto;
  height: clamp(3rem, 5vw, 4.625rem);
}

/* yellow CTA (like the "Donate" button) */
.btn-enroll {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.95em 1.9em;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 500;
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  text-decoration: none;
  border-radius: 0.1875rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-enroll:hover {
  background: #ffdf5c;
  transform: translateY(-1px);
}

.btn-enroll:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 0.1875rem;
}

.btn-enroll__icon {
  width: 1.3em;
  height: 1.3em;
}

.btn-enroll__short {
  display: none;
}

/* header version: fully transparent pill with a gold outline;
   fills with gold on hover */
.site-header .btn-enroll {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  gap: 0.75rem;
  padding: 0.45em 1.5em 0.45em 0.45em;
  border: 1.5px solid var(--yellow);
  border-radius: 62.4375rem;
  background: transparent;
  color: var(--cream);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.25s var(--ease-out-back);
}

/* gold fill that sweeps in from the icon on hover */
.site-header .btn-enroll::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, #ffe066 0%, #f7c531 50%, #f39a1e 100%);
  clip-path: circle(0% at 1.5rem 50%);
  transition: clip-path 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

/* icon in a gold badge */
.site-header .btn-enroll__icon {
  box-sizing: content-box;
  flex-shrink: 0;
  width: 1.15em;
  height: 1.15em;
  padding: 0.5em;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe066, #f39a1e);
  color: #173d1f;
  transition: transform 0.35s var(--ease-out-back), background 0.35s ease, color 0.35s ease;
}

.site-header .btn-enroll:hover,
.site-header .btn-enroll:focus-visible {
  background: transparent;
  color: #173d1f;
  border-color: #f7c531;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 0.3125rem rgba(247, 210, 62, 0.15),
    0 0.75rem 1.875rem -0.375rem rgba(243, 154, 30, 0.6);
}

.site-header .btn-enroll:hover::before,
.site-header .btn-enroll:focus-visible::before {
  clip-path: circle(150% at 1.5rem 50%);
}

.site-header .btn-enroll:hover .btn-enroll__icon,
.site-header .btn-enroll:focus-visible .btn-enroll__icon {
  background: var(--menu-green);
  color: var(--yellow);
  transform: rotate(-10deg) scale(1.08);
}

.site-header .btn-enroll:active {
  transform: translateY(0);
}

.site-header .btn-enroll:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 0.25rem;
}

/* the header buttons side by side (index.html: Download APK + Enroll) */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 1rem);
}

/* "Download APK": forest green pill, gold outline and gold Android badge;
   a gold shine sweeps across on hover */
.btn-app {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  overflow: hidden;
  isolation: isolate;
  padding: 0.45em 1.15em 0.45em 0.45em;
  border: 1.5px solid rgba(247, 210, 62, 0.75);
  border-radius: 62.4375rem;
  background: linear-gradient(135deg, #0b6b2c 0%, var(--menu-green) 55%, var(--menu-deep) 100%);
  color: var(--cream);
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0.375rem 1.125rem -0.5rem rgba(0, 0, 0, 0.55);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s var(--ease-out-back), background-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

/* the shine */
.btn-app::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 224, 102, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn-app__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.05em;
  height: 2.05em;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe066, #f7c531 55%, #f39a1e);
  color: var(--menu-deep);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.4s var(--ease-out-back), background 0.3s ease, color 0.3s ease;
}

.btn-app__icon svg {
  width: 1.2em;
  height: 1.2em;
}

.btn-app__arrow {
  width: 1.05em;
  height: 1.05em;
  color: var(--yellow);
  transition: transform 0.3s var(--ease-out-back);
}

.btn-app__short {
  display: none;
}

.btn-app:hover,
.btn-app:focus-visible {
  border-color: var(--yellow);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 0.3125rem rgba(247, 210, 62, 0.14),
    0 0.875rem 1.875rem -0.5rem rgba(4, 82, 29, 0.85),
    0 0.375rem 1.125rem -0.375rem rgba(243, 154, 30, 0.45);
}

.btn-app:hover::after,
.btn-app:focus-visible::after {
  transform: translateX(120%);
}

.btn-app:hover .btn-app__icon,
.btn-app:focus-visible .btn-app__icon {
  transform: rotate(-12deg) scale(1.08);
}

.btn-app:hover .btn-app__arrow,
.btn-app:focus-visible .btn-app__arrow {
  transform: translateY(2px);
}

.btn-app:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 0 0 0.1875rem rgba(247, 210, 62, 0.2), 0 0.25rem 0.75rem -0.375rem rgba(0, 0, 0, 0.6);
  transition-duration: 0.08s;
}

.btn-app:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .btn-app,
  .btn-app::after,
  .btn-app__icon,
  .btn-app__arrow {
    transition: none;
  }
}

/* ============ DROPDOWN MENU ============ */

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(8, 14, 10, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.menu-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* The whole menu (panel + hanging tab) slides as one piece.
   Closed: pushed up by its own height, so only the tab shows. */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transform: translateY(-100%);
  transition: transform 0.7s var(--ease-in-out);
}

.menu.is-open {
  transform: translateY(0);
}

.menu__panel {
  max-height: calc(100vh - 5rem);
  max-height: calc(100svh - 5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--menu-green);
  color: var(--cream);
  visibility: hidden;                      /* once it has slid away */
  transition: visibility 0s linear 0.7s;
}

.menu.is-open .menu__panel {
  visibility: visible;
  transition-delay: 0s;
}

.menu__inner {
  max-width: 110rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18.75rem, 29.375rem);
  gap: clamp(2rem, 4vw, 5rem);
  padding: clamp(1.5rem, 3vw, 3rem) var(--gutter) clamp(3.5rem, 6vw, 6.875rem);
}

.menu__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 1.9rem);
  letter-spacing: 0.01em;
  color: var(--lime);
  text-decoration: none;
}

.menu__nav,
.menu__bottom {
  margin-left: clamp(0px, 7.6vw, 9.0625rem);
}

/* main view + sub-menus sit on top of each other in the same spot,
   so the panel keeps its height when switching */
.menu__nav {
  display: grid;
  margin-top: clamp(2.5rem, 5vw, 4.75rem);
}

.menu__view {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateX(1.75rem);
  transition: opacity 0.35s ease, transform 0.45s ease, visibility 0s linear 0.45s;
}

.menu__view[data-view="main"] {
  transform: translateX(-1.75rem);
}

.menu__view.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s ease 0.1s, transform 0.45s ease 0.1s, visibility 0s;
}

.menu__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: clamp(0.875rem, 2.2vw, 1.875rem) 2.5rem;
}

.menu__links a {
  position: relative;
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: clamp(1.35rem, 1.85vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease;
}

/* underline that grows from the left */
.menu__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.menu__links a:hover,
.menu__links a:focus-visible {
  color: var(--lime);
  transform: translateX(0.375rem);
  outline: none;
}

.menu__links a:hover::after,
.menu__links a:focus-visible::after {
  transform: scaleX(1);
}

.menu__links a[aria-current="page"] {
  color: var(--lime);
}

.menu__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem clamp(2.5rem, 8vw, 8.5rem);
  margin-top: clamp(2.5rem, 5.5vw, 5.625rem);
  padding-top: clamp(1.75rem, 2.6vw, 2.625rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- search --- */










/* results pop up above the field */







/* --- small links + socials --- */

.menu__meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Instagram, YouTube, WhatsApp: big round buttons */
.menu__social {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.625rem, 1.2vw, 1rem);
}

.menu__social a {
  display: grid;
  place-items: center;
  width: clamp(3.25rem, 4.4vw, 3.875rem);
  height: clamp(3.25rem, 4.4vw, 3.875rem);
  border: 2px solid var(--lime);
  border-radius: 50%;
  color: var(--lime);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu__social svg {
  width: 58%;
  height: 58%;
}

.menu__social a:hover,
.menu__social a:focus-visible {
  background: var(--lime);
  color: var(--menu-green);
  transform: translateY(-2px);
  outline: none;
}

/* --- enroll card --- */

.menu-card {
  position: relative;
  align-self: start;
  margin-top: clamp(1.25rem, 4vw, 4rem);
  padding: 8.125rem clamp(1.75rem, 3.4vw, 4rem) 6.875rem;
  background: var(--card);
  color: var(--ink);
  text-align: center;
}

/* inner hairline border */
.menu-card::before {
  content: "";
  position: absolute;
  inset: 0.6875rem;
  border: 1.5px solid #e4dece;
  pointer-events: none;
}

.menu-card__leaves {
  position: absolute;
  top: -2.125rem;
  left: 50%;
  width: 12.5rem;
  height: 6.875rem;
  transform: translateX(-50%);
}

.menu-card__title {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 2.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--menu-green);
}

.menu-card__text {
  max-width: 21em;
  margin: 0 auto 2.25rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.menu-card .btn-enroll {
  position: relative;
}

/* --- hanging tab: a banyan leaf on a golden thread --- */

.menu-tab {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 13rem;
  height: 3.625rem;
  margin-left: -6.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  cursor: pointer;
  transform-origin: top center;     /* phones: the whole tab is made smaller from its top edge */
  -webkit-tap-highlight-color: transparent;
}

/* the green curve: it starts 2 px above the panel's bottom line, so the two never show a gap */
.menu-tab__shape {
  position: absolute;
  top: -2px;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: calc(100% + 2px);
  overflow: visible;
}

.menu-tab__body {
  fill: var(--menu-green);
}

/* the outline of the curve: only shown for keyboard focus */
.menu-tab__edge {
  fill: none;
  stroke: transparent;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.2s ease;
}

/* the three lines (as in the design: 40 px wide, from 17 px down) */
.menu-tab__bars {
  position: absolute;
  top: 1.0625rem;
  left: 50%;
  z-index: 2;
  width: 2.5rem;
  height: 1.25rem;
  margin-left: -1.25rem;
}

.menu-tab__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
}

.menu-tab__bars span:nth-child(1) { top: 0; }
.menu-tab__bars span:nth-child(2) { top: 0.5625rem; }
.menu-tab__bars span:nth-child(3) { top: 1.125rem; }

/* open: the three lines turn into a cross */
.menu.is-open .menu-tab__bars span { background: var(--yellow); }
.menu.is-open .menu-tab__bars span:nth-child(1) { transform: translateY(0.5625rem) rotate(45deg); }
.menu.is-open .menu-tab__bars span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu.is-open .menu-tab__bars span:nth-child(3) { transform: translateY(-0.5625rem) rotate(-45deg); }

/* "Menu" / "Close" for screen readers only */
.menu-tab__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* the garland: leaves and flowers around the curve */
.menu-tab__burst {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* where each leaf of the garland sits (place --x/--y, turn --r, size --s, colour --c, timing group --i);
   the leaves themselves are in the HTML (.menu-tab__burst) */
.menu-tab__burst .burst:nth-child(1) { --i:4; --x:-7.375rem; --y:1.0625rem; --r:-49deg; --s:2.125rem; --c:#49b6d6; }
.menu-tab__burst .burst:nth-child(2) { --i:4; --x:-8.5625rem; --y:2.125rem; --r:80deg; --s:1.875rem; --c:#b9e28c; }
.menu-tab__burst .burst:nth-child(3) { --i:3; --x:-6.9375rem; --y:3.875rem; --r:10deg; --s:3.375rem; --c:#0b4f23; }
.menu-tab__burst .burst:nth-child(4) { --i:2; --x:-4.875rem; --y:2.75rem; --r:-59deg; --s:2.625rem; --c:#f07c1b; }
.menu-tab__burst .burst:nth-child(5) { --i:1; --x:-3.5625rem; --y:5.4375rem; --r:-12deg; --s:2.75rem; --c:#3fae49; }
.menu-tab__burst .burst:nth-child(6) { --i:0; --x:-0.625rem; --y:5.1875rem; --r:45deg; --s:2.125rem; --c:#f7c531; }
.menu-tab__burst .burst:nth-child(7) { --i:0; --x:1.6875rem; --y:5.625rem; --r:13deg; --s:3.75rem; --c:#49b6d6; }
.menu-tab__burst .burst:nth-child(8) { --i:1; --x:3.75rem; --y:3.625rem; --r:135deg; --s:2rem; --c:#f07c1b; }
.menu-tab__burst .burst:nth-child(9) { --i:1; --x:3.6875rem; --y:5.3125rem; --r:-20deg; --s:1.375rem; --c:#0b4f23; }
.menu-tab__burst .burst:nth-child(10) { --i:2; --x:4.625rem; --y:5.875rem; --r:-12deg; --s:1.5rem; --c:#0b4f23; }
.menu-tab__burst .burst:nth-child(11) { --i:2; --x:6.25rem; --y:3rem; --r:-15deg; --s:4.5rem; --c:#3fae49; }
.menu-tab__burst .burst:nth-child(12) { --i:4; --x:8.125rem; --y:0.75rem; --r:70deg; --s:1.875rem; --c:#b9e28c; }
.menu-tab__burst .burst:nth-child(13) { --i:4; --x:8.5625rem; --y:2.0625rem; --r:115deg; --s:2.125rem; --c:#f7c531; }

.burst {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  fill: var(--c);
  overflow: visible;
  opacity: 0;
  /* hidden: small, in the middle of the curve */
  transform: translate(0, 1.875rem) rotate(0deg) scale(0.2);
  transition:
    transform 0.55s var(--ease-out-back) calc(var(--i) * 40ms),
    opacity 0.25s ease calc(var(--i) * 40ms);
}

/* hover (mouse only), keyboard focus, or menu open: the garland comes out around the curve */
.menu-tab:focus-visible .burst,
.menu.is-open .burst {
  opacity: 1;
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
}

.menu-tab:focus-visible {
  outline: none;
}

.menu-tab:focus-visible .menu-tab__edge {
  stroke: var(--yellow);
}

@media (hover: hover) {
  .menu-tab:hover .burst {
    opacity: 1;
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
  }

  /* when open, hovering nudges the leaves a little further out */
  .menu.is-open .menu-tab:hover .burst {
    transform: translate(calc(var(--x) * 1.06), calc(var(--y) * 1.06)) rotate(calc(var(--r) + 8deg)) scale(1.05);
  }
}

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 8.75rem var(--gutter) 9.375rem;
  overflow: hidden;
  /* green, same on every page: soft lighter glow in the middle, darker edges */
  background: radial-gradient(ellipse 60% 55% at 50% 52%, #41633d 0%, #2c4a2f 45%, #1a2c1e 100%);
  isolation: isolate;
}

/* leaf pattern layers (filled by script.js) */
.leaves {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.leaves__layer {
  position: absolute;
  inset: -4.375rem;                  /* bleed so moving layers never show an edge */
  will-change: transform;
}

.leaves__layer svg {
  position: absolute;
  overflow: visible;
}

/* see-through dark green, so the leaves show on the green hero */
.leaves__layer:nth-child(1) { fill: rgba(10, 22, 12, 0.18); color: rgba(10, 22, 12, 0.18); }
.leaves__layer:nth-child(2) { fill: rgba(10, 22, 12, 0.22); color: rgba(10, 22, 12, 0.22); }
.leaves__layer:nth-child(3) { fill: rgba(10, 22, 12, 0.26); color: rgba(10, 22, 12, 0.26); }

.hero__content {
  max-width: 60rem;
  text-align: center;
}

.hero__title {
  margin: 0 auto;
  max-width: 13.5em;
  font-weight: 500;
  font-size: clamp(2.35rem, 4.2vw + 1rem, 5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--cream);
  text-wrap: balance;
}

/* a number in a heading, set a size larger (e.g. "10" Value themes, "40+" schools) */
.big-num {
  font-size: 1.35em;
  line-height: 0.9;
}

.accent {
  font-family: var(--font-serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.01em;
  color: var(--orange);
  white-space: nowrap;
}

.hero__sub {
  margin: clamp(1.25rem, 2.4vw, 2rem) auto 0;
  max-width: 34em;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.55;
  color: rgba(246, 241, 230, 0.72);
}

/* round scroll button */
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: clamp(2.25rem, 7vh, 4.125rem);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 3.375rem;
  height: 3.375rem;
  border-radius: 50%;
  background: #f3ecdc;
  color: var(--orange);
  transition: background 0.2s ease;
  animation: nudge 2.4s ease-in-out infinite;
}

/* short screens (small phones, phones turned sideways): a smaller arrow, lower down, clear of the text */
@media (max-height: 600px) {
  .scroll-down {
    width: 2.75rem;
    height: 2.75rem;
    bottom: 1rem;
  }
}

.scroll-down svg {
  width: 1.25rem;
  height: 1.25rem;
}

.scroll-down:hover {
  background: #fff;
}

.scroll-down:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 0.25rem;
}

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 0.375rem); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

  .menu-card {
    max-width: 35rem;
    width: 100%;
    margin: 3.5rem auto 0;
    padding: 6.25rem 2rem 4rem;
  }
}

/* the intro page has two header buttons (App + Enroll): on screens too narrow for their long labels
   beside the hanging menu tab in the middle (tablets, phones turned sideways), the short labels are used,
   stacked below 760px */
@media (min-width: 641px) and (max-width: 1120px) {
  .site-header__actions .btn-app__long,
  .site-header__actions .btn-app__arrow,
  .site-header__actions .btn-enroll__long {
    display: none;
  }

  .site-header__actions .btn-app__short,
  .site-header__actions .btn-enroll__short {
    display: inline;
  }
}

/* every page: just above phone width, "Enroll Your School" would touch the menu tab → "Enroll" */
@media (min-width: 641px) and (max-width: 700px) {
  .site-header .btn-enroll__long {
    display: none;
  }

  .site-header .btn-enroll__short {
    display: inline;
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  .site-header__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 3.5rem;           /* keep clear of the menu tab */
  }

  .brand__logo {
    height: 2.5rem;
  }

  .btn-enroll {
    padding: 0.7em 1.1em;
    gap: 0.4375rem;
  }

  .site-header .btn-enroll {
    padding: 0.35em 1em 0.35em 0.35em;
    gap: 0.5rem;
  }

  .site-header .btn-enroll__icon {
    padding: 0.4em;
  }

  .btn-enroll__long {
    display: none;
  }

  .btn-enroll__short {
    display: inline;
  }

  /* stacked on the right, clear of the hanging menu leaf in the middle */
  .site-header__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .btn-app {
    gap: 0.4375rem;
    padding: 0.35em 0.95em 0.35em 0.35em;
  }

  .btn-app__long,
  .btn-app__arrow {
    display: none;
  }

  .btn-app__short {
    display: inline;
  }

  .hero {
    padding: 10rem var(--gutter) 8.75rem;
  }

  .hero__title {
    letter-spacing: -0.03em;
  }

  /* menu */
  .menu__inner {
    padding-top: 1.375rem;
  }

  .menu__nav {
    margin-top: 2rem;
  }

  .menu__bottom {
    flex-direction: column;
    align-items: stretch;
  }




  .menu-card {
    margin-top: 3rem;
    padding: 5.25rem 1.375rem 3rem;
  }

  .menu-card__leaves {
    width: 10rem;
    height: 5.5rem;
    top: -1.75rem;
  }

  .menu-tab {
    transform: scale(0.72);
  }
}

@media (max-width: 420px) {
  .menu__links {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

@media (max-width: 360px) {
  .brand__logo {
    height: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-down {
    animation: none;
  }

  .menu,
  .menu-backdrop,
  .burst {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ============ BACK-TO-TOP BUTTON (added by script.js) ============ */

.to-top {
  position: fixed;
  right: clamp(1rem, 2.4vw, 2.25rem);
  bottom: clamp(1rem, 2.4vw, 2.25rem);
  z-index: 40;                      /* below the open menu and its backdrop */
  display: grid;
  place-items: center;
  width: 3.625rem;
  height: 3.625rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--menu-green);
  color: var(--yellow);
  cursor: pointer;
  box-shadow: 0 0.625rem 1.625rem rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem) scale(0.85);
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out-back), visibility 0s linear 0.35s, background 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out-back), visibility 0s, background 0.2s ease;
}

body.menu-open .to-top {
  opacity: 0;
  visibility: hidden;
}

.to-top > svg {
  grid-area: 1 / 1;
}

.to-top__ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 3;
}

.to-top__track {
  stroke: rgba(185, 226, 140, 0.22);
}

.to-top__fill {
  stroke: var(--yellow);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.15s linear;
}

.to-top__arrow {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.to-top:hover {
  background: #06662a;
}

.to-top:hover .to-top__arrow {
  transform: translateY(-0.1875rem);
}

.to-top:focus-visible {
  outline: 0.1875rem solid var(--yellow);
  outline-offset: 0.1875rem;
}

@media (max-width: 640px) {
  .to-top {
    width: 3.125rem;
    height: 3.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top,
  .to-top.is-visible {
    transition: opacity 0.01ms, visibility 0s;
    transform: none;
  }
}
