:root {
  --cyan: #4ebcca;
  --cyan-light: #edf8fa;
  --blue: #374768;
  --text-dark: #10151f;
  --pill-radius: 50px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  background-color: white;
  color: black;
  overflow-x: hidden;
  line-height: 1.5;
  font-size: 18px;
}

p {
  margin-bottom: 1.125rem;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: underline; color: var(--blue); }
a:hover { color: var(--text-dark); }

h1, h2, h3, h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; }

h1 { 
  font-size: clamp(3.6rem, 7.7vw, 72px);
  line-height: 1;
  color: var(--cyan);
  margin-bottom: 2rem;
}

h2 { 
  font-size: clamp(2.1rem, 4.2vw, 42px);
  line-height: 1;
  color: var(--blue);
  margin-bottom: 1rem;
}

h3 { 
  font-size: clamp(1rem, 2vw, 26px);
  line-height: 1;
  margin-bottom: 1rem;
}

.eyebrow {
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.25rem;
  margin-bottom: 0.875rem;
}

.container { max-width: 75rem; margin: 0 auto; padding: 0 2rem; }

.texture-bg {
  position: relative;
  background-color: var(--cyan-light);
}
.texture-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
}
.texture-bg > * { position: relative; z-index: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--pill-radius);
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-fill {
  background: var(--cyan);
  color: white;
}
.btn-fill:hover { background: #46a9b6; color: white; transform: translateY(-2px); }

.btn-white {
  background: white;
  color: var(--blue);
}
.btn-white:hover { background:  var(--cyan-light); color: var(--blue); transform: translateY(-2px);}

.btn-ghost {
  background: transparent;
  color: white;
  border-color: white;
}
.btn-ghost:hover  { background: transparent; border-color: var(--cyan-light); color: var(--cyan-light); transform: translateY(-2px);}

body, button, input, textarea, select {
  -webkit-font-smoothing: antialiased;
}

/* == HEADER == */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,1);
  z-index: 99;
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.nav-inner {
  max-width: 75rem;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-mark {
  width: auto;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo .logo-mark { background: none; }
.footer-logo .logo-mark {
  width: 270px; height: auto;
  object-fit: contain;
  object-position: top;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: black;
  position: relative;
  transition: color var(--transition);
  text-decoration: none;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 0.125rem;
  background: var(--cyan);
  border-radius: 2px;
  transition: width var(--transition);
}
.main-nav a:hover { color: var(--cyan); }
.main-nav a:hover::after { width: 100%; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.hamburger span {
  display: block;
  width: 1.5rem; height: 0.125rem;
  background: black;
  border-radius: 2px;
  transition: all var(--transition);
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: white;
  padding: 1rem 2rem 1.5rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 98;
}
.mobile-menu a {
  padding: 0.7rem 0;
  font-size: 16px;
  font-weight: 500;
  color: black;
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
  display: inline-block;
}
.mobile-menu a::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 0;
  width: 0; height: 0.125rem;
  background: var(--cyan);
  border-radius: 2px;
  transition: width var(--transition);
}
.mobile-menu a:hover { color: var(--cyan); }
.mobile-menu a:hover::after { width: 100%; }
.mobile-menu.open { display: flex; }

/* == HERO == */
.hero {
  display: flex;
  min-height: 90vh;;
  align-items: bottom;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--text-dark) 0%, transparent) 0%,
    color-mix(in srgb, var(--text-dark) 1%, transparent) 30%,
    color-mix(in srgb, var(--text-dark) 60%, transparent) 60%,
    color-mix(in srgb, var(--text-dark) 90%, transparent) 100%), url("https://rootsmontessorischool.com/uploads/application/files/static-gallery/4804/homepage-main-banner-2-NEW.jpg") center bottom / cover no-repeat;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
}

.hero-circle {
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
  background-repeat: no-repeat;
  background-size: contain;
}
.circle-1 {
  width: 20rem; height: 32rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath d='M50 4 C85 40 88 120 50 156 C12 120 15 40 50 4 Z' fill='%234ebcca'/%3E%3Cpath d='M50 20 C56 60 56 100 50 140' stroke='%23374768' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  top: -180px; right: -100px;
  animation: circleFloat1 10s ease-in-out infinite alternate;
}
.circle-3 {
  width: 8rem; height: 12.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath d='M50 4 C85 40 88 120 50 156 C12 120 15 40 50 4 Z' fill='%23374768'/%3E%3Cpath d='M50 20 C56 60 56 100 50 140' stroke='%234ebcca' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  top: 30%; left: 30%;
  animation: circleFloat1 9s ease-in-out infinite alternate-reverse;
  opacity: 0.08;
}
@keyframes circleFloat1 {
  from { transform: translate(0,0) scale(1) rotate(0deg); }
  to   { transform: translate(20px, -30px) scale(1.06) rotate(8deg); }
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 50rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 70vh;
  justify-content: flex-end;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
  transform: translateY(clamp(0.75rem, 2vw, 1.5rem));
}
.hero-eyebrow {
  font-weight: 600;
  letter-spacing: 0.25rem;
  font-size: 18px;
  color: white;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 28px;
  max-width: 40rem;
  margin-bottom: 3rem;
  line-height: 1.5;
  color: white;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.circle-yellow {
  position: absolute;
  width: 14rem; height: 22.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath d='M50 4 C85 40 88 120 50 156 C12 120 15 40 50 4 Z' fill='%234ebcca'/%3E%3Cpath d='M50 20 C56 60 56 100 50 140' stroke='%23374768' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.12;
  bottom: -80px; left: -60px;
  pointer-events: none;
  animation: circleFloat1 12s ease-in-out infinite alternate;
}
.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3.5rem;
}

/* == PROGRAMS == */
.programs-section {
  padding: 6rem 0 3rem 0;
  position: relative;
  overflow: hidden;
}

.programs-section > .container { 
  position: relative; 
  z-index: 1; 
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 auto;
}

.program-card {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: transform var(--transition), box-shadow var(--transition);
}
.program-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.12); }
.pc-img-wrap {
  position: relative;
  height: 14rem;
  overflow: hidden;
}

.pc-img-wrap img { transition: transform 0.5s ease; }

.program-card:hover .pc-img-wrap img { transform: scale(1.04); }

.pc-body {
  padding: 1.6rem 1.8rem;
}

/* == ABOUT == */
.about-section {
  padding: 7rem 0;
  background: white;
}

.about-inner {
  max-width: 75rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.7fr 0.3fr;
  gap: 5rem;
  align-items: center;
}
.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.about-text h2 { margin-bottom: 1.5rem; }
.about-text .btn { margin-top: 1rem; }

/* == TUITION == */

.admissions-section {
  padding: 2.5rem 0 6rem;
  position: relative;
  overflow: hidden;
}

/* Tuition & Fees accordion */
.admissions {
  padding: 3rem 0;
}
.admissions h3 {
  margin-bottom: 1.5rem;
  color: var(--blue);
}

.applynowlist { display: flex; flex-direction: column; gap: 0; }
.apply-item {
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.apply-item:last-child { border-bottom: none; }
.apply-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 0;
  cursor: pointer;
  list-style: none;
}
.apply-summary::-webkit-details-marker { display: none; }
.apply-toggle {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cyan-light);
  color: var(--blue);
  font-size: 24px;
  font-family: 'Bricolage Grotesque', sans-serif;
  transition: transform var(--transition);
}
.apply-item[open] .apply-toggle { transform: rotate(45deg); }
.apply-item .apply-details {
  display: grid;
  grid-template-rows: 0fr;
  color: var(--text-dark);
  transition: grid-template-rows 0.35s ease;
}
.apply-item[open] .apply-details {
  grid-template-rows: 1fr;
}
.apply-details-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0.5rem 0 1.5rem 0;
}
.apply-details p { margin: 0 0 1rem 0; }
.apply-details ul {
  margin: 0.5rem 0 1rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}
.apply-details li {
  margin-bottom: 0.5rem;
}
.apply-details li:last-child {
  margin-bottom: 0;
}
.apply-info { flex: 1; }
.apply-info h3 { margin-bottom: 0; }
.apply-info strong { display: block; font-size: 15.2px; color: black; margin-bottom: 0.2rem; }
.apply-info p { font-size: 18px; color: black; margin: 0; }

/* == BEYOND-THE-CLASSROOM == */
.collage-section {
  padding: 6rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  background: white;
}

.collage-section > .container {
  position: relative;
  z-index: 1;
}

.collage-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: 220px 220px 220px;
  grid-template-areas:
    "main top-right middle-right"
    "main bottom-left middle-right"
    "main bottom-left bottom-right";
  gap: 1rem;
}

.collage-item {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

.collage-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--text-dark) 0%, transparent) 0%,
    color-mix(in srgb, var(--text-dark) 0%, transparent) 40%,
    color-mix(in srgb, var(--text-dark) 10%, transparent) 60%,
    color-mix(in srgb, var(--text-dark) 60%, transparent) 80%,
    color-mix(in srgb, var(--text-dark) 90%, transparent) 100%);
  pointer-events: none;
  z-index: 1;
}

.collage-item h3 {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.collage-item:hover img {
  transform: scale(1.05);
}

.collage-main { grid-area: main; }
.collage-top-right { grid-area: top-right; }
.collage-middle-right { grid-area: middle-right; }
.collage-bottom-left { grid-area: bottom-left; }
.collage-bottom-right { grid-area: bottom-right; }

/* == APP INFO == */
.app-info-section {
  padding: 3.5rem 0 6rem;
  text-align: center;
  background: white;
  position: relative;
  overflow: hidden;
}

.app-info-section .container { 
  position: relative; 
  z-index: 1; 
}

.app-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.app-info-grid .btn {
  justify-content: center;
  width: 100%;
}

/* == FOOTER == */

.site-footer {
  background: var(--cyan-light);
  color: black;
  padding-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--cyan-light);
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 2.5rem;
}

.footer-logo {
  display: flex;
  align-items: flex-start;
}

.social-links { display: flex; gap: 0.8rem; padding-top: 0.75rem; }
.social-links a {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.social-links a:hover { border-color: var(--cyan); }
.footer-links {
  display: contents;
}
.footer-col h4 {
  font-family: 'Open Sans', sans-serif;
  margin-bottom: 1.2rem;
}
.footer-col a, .footer-col p {
  display: block;
  margin-bottom: 0.6rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--cyan); }
.footer-col .social-links a {
  display: flex;
  margin-bottom: 0;
}
.footer-bottom .container > div {
  display: flex;
  gap: 1rem;
}
.footer-bottom .container > div a {
  transition: color var(--transition);
}
.footer-bottom .container > div a:hover { color: var(--cyan); }
.footer-bottom {
  padding: 1rem 0 0;
}
.footer-bottom .container {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap:1rem;
  flex-wrap: wrap;
}

/* =======================================
   SCROLL ANIMATIONS
   ======================================= */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}
[data-animate="fade-up"]    { transform: translateY(32px); }
[data-animate="fade-right"] { transform: translateX(-32px); }
[data-animate="fade-left"]  { transform: translateX(32px); }
[data-animate].animated {
  opacity: 1;
  transform: translate(0);
}

/* =======================================
   RESPONSIVE
   ======================================= */
@media (max-width: 1200px) {
  .programs-grid { grid-template-columns: repeat(2, 1fr); max-width: none; margin: 0; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 1024px) {
  h3 { font-size: 20px; }
  .collage-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "main main"
      "top-right middle-right"
      "bottom-left bottom-right";
  }
  .collage-item { aspect-ratio: 4 / 3; }

  .hero {
    padding: 4rem 2rem;
    min-height: 88vh;
    text-align: center;
  }
  .hero-inner {
    flex-direction: column;
  }
  .hero-content {
    max-width: 100%;
    align-items: center;
    min-height: 100%;
  }
  .hero-actions { justify-content: center; }
  .hero-sub { margin: 0 auto 2rem; }
  .about-inner { grid-template-columns: 1fr; gap: 4rem; }
  .about-image { width: 60%; margin: 0 auto; }
  .about-text { text-align: center; }
  .about-text h2, .about-text p { text-align: left; }
  .programs-grid { grid-template-columns: 1fr; max-width: 40rem; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .app-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .collage-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, auto);
    grid-template-areas:
      "main"
      "top-right"
      "middle-right"
      "bottom-left"
      "bottom-right";
  }
  .collage-item { aspect-ratio: 4 / 3; }
  .app-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .footer-links { grid-template-columns: 1fr 1fr; }}

@media (max-width: 500px) {
  body { font-size: 16px; }
  .nav-right .btn-fill { display: none; }
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { padding: 0; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .admissions-section h3 { font-size: clamp(1.2rem, 2vw, 24px); }
  .footer-logo .logo-mark { width: 220px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
