/* ==========================================================
   Sprouters Creche School - modern.css
   ========================================================== */
:root {
	--primary: #14532d;
	--primary-2: #1b6b3a;
	--primary-dark: #0b3319;
	--accent: #f2b705;
	--accent-dark: #d99f00;
	--ink: #1b2a21;
	--muted: #5d6c63;
	--bg: #ffffff;
	--bg-soft: #f4f8f3;
	--line: #e3eae2;
	--radius: 16px;
	--shadow-sm: 0 2px 10px rgba(11, 51, 25, .07);
	--shadow-md: 0 14px 34px rgba(11, 51, 25, .14);
	--font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-head: 'Fraunces', Georgia, serif;
	--header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--primary-dark); }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.skip-link {
	position: absolute; left: -999px; top: 8px; z-index: 1000;
	background: var(--accent); color: #000; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 26px; border-radius: 999px; border: 2px solid transparent;
	font-weight: 600; font-size: .95rem; transition: transform .25s, box-shadow .25s, background .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-2); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #2a2200; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 10px 24px rgba(242, 183, 5, .35); }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--primary-dark); }

/* ---------- Top bar ---------- */
.topbar { background: var(--primary-dark); color: #d7e6da; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 16px; }
.topbar-contact { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar a:hover { color: var(--accent); }
.topbar i { margin-right: 6px; color: var(--accent); }
.social { display: flex; gap: 8px; }
.social a {
	width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
	background: rgba(255, 255, 255, .1); font-size: .8rem; transition: background .25s, color .25s, transform .25s;
}
.social a:hover { background: var(--accent); color: #2a2200; transform: translateY(-2px); }
.topbar .social a i { margin: 0; color: inherit; }

/* ---------- Sticky header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid transparent;
	transition: box-shadow .3s, border-color .3s;
}
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(11, 51, 25, .12); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); transition: height .3s; }
.site-header.is-stuck .nav-inner { height: 64px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; object-fit: contain; transition: transform .3s; }
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--primary-dark); line-height: 1.1; }
.brand-text small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav > ul > li > button,
.main-nav > ul > li > a:not(.btn) {
	display: flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; background: none;
	font-weight: 500; font-size: .95rem; color: var(--ink); border-radius: 10px; transition: color .2s, background .2s;
}
.main-nav > ul > li > button i { font-size: .65rem; transition: transform .25s; }
.main-nav > ul > li:hover > button,
.main-nav > ul > li > button[aria-expanded="true"] { color: var(--primary-2); background: var(--bg-soft); }
.main-nav > ul > li:hover > button i { transform: rotate(180deg); }
.nav-cta { margin-left: 10px; }
.nav-cta .btn { padding: 10px 22px; }

.sub {
	position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px;
	background: #fff; border-radius: 14px; box-shadow: var(--shadow-md); border: 1px solid var(--line);
	opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.open > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 10px 14px; border-radius: 8px; font-size: .92rem; transition: background .2s, color .2s, padding .2s; }
.sub a:hover { background: var(--bg-soft); color: var(--primary-2); padding-left: 20px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; position: relative; z-index: 130; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--primary-dark); border-radius: 2px; transition: transform .3s, opacity .3s, top .3s; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 110; }
.nav-backdrop.show { opacity: 1; visibility: visible; }

/* ---------- Hero slider ---------- */
.hero { position: relative; height: calc(100vh - var(--header-h) - 40px); min-height: 520px; max-height: 820px; overflow: hidden; background: var(--primary-dark); color: #fff; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.1s ease, visibility 1.1s; display: flex; align-items: center; }
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform 9s ease-out; }
.hero-slide.is-active .hero-media img { transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 36, 18, .88) 0%, rgba(8, 36, 18, .55) 45%, rgba(8, 36, 18, .1) 100%); }
.hero .container { position: relative; z-index: 2; }
.hero-caption { max-width: 660px; }
.hero-caption > * { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.hero-slide.is-active .hero-caption > * { opacity: 1; transform: none; }
.hero-slide.is-active .hero-caption > :nth-child(1) { transition-delay: .45s; }
.hero-slide.is-active .hero-caption > :nth-child(2) { transition-delay: .65s; }
.hero-slide.is-active .hero-caption > :nth-child(3) { transition-delay: .85s; }
.hero-slide.is-active .hero-caption > :nth-child(4) { transition-delay: 1.05s; }
.eyebrow {
	display: inline-block; margin-bottom: 16px; padding: 6px 16px; border-radius: 999px;
	background: rgba(242, 183, 5, .18); border: 1px solid rgba(242, 183, 5, .5);
	color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow-dark { background: rgba(20, 83, 45, .08); border-color: rgba(20, 83, 45, .25); color: var(--primary-2); }
.hero-caption h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 4rem); margin-bottom: .4em; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.hero-caption p { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #e8f1ea; max-width: 560px; margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-controls { position: absolute; z-index: 5; right: max(20px, calc((100vw - 1200px) / 2)); bottom: 34px; display: flex; align-items: center; gap: 16px; }
.hero-arrow { width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .08); color: #fff; backdrop-filter: blur(6px); transition: background .25s, color .25s, transform .25s; }
.hero-arrow:hover { background: var(--accent); color: #2a2200; border-color: var(--accent); transform: scale(1.08); }
.hero-counter { display: flex; align-items: center; gap: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-counter i { width: 34px; height: 2px; background: rgba(255, 255, 255, .5); }
.hero-dots { position: absolute; z-index: 5; left: max(20px, calc((100vw - 1200px) / 2)); bottom: 44px; display: flex; gap: 10px; }
.hero-dots button { width: 12px; height: 12px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .4); transition: width .35s, background .35s; }
.hero-dots button.is-active { width: 38px; background: var(--accent); }
.hero-progress { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .15); }
.hero-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
[data-slider].is-running .hero-progress span { animation: progress var(--dur, 7000ms) linear forwards; }
[data-slider].is-paused .hero-progress span { animation-play-state: paused; }
@keyframes progress { from { width: 0; } to { width: 100%; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); position: relative; padding-bottom: 18px; }
.section-head h2::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 4px; margin-left: -32px; border-radius: 4px; background: var(--accent); }

/* Pillars */
.pillars { padding: 0; margin-top: -60px; position: relative; z-index: 6; }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pillar { background: #fff; padding: 32px 26px; border-radius: var(--radius); box-shadow: var(--shadow-md); border-bottom: 4px solid transparent; transition: transform .3s, border-color .3s; }
.pillar:hover { transform: translateY(-8px); border-color: var(--accent); }
.pillar-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 16px; background: var(--bg-soft); color: var(--primary-2); font-size: 1.4rem; transition: background .3s, color .3s; }
.pillar:hover .pillar-icon { background: var(--primary); color: var(--accent); }
.pillar h3 { font-size: 1.2rem; }
.pillar p { color: var(--muted); font-size: .93rem; margin: 0; }
.pillars + .news { padding-top: 110px; }

/* News */
.news { background: var(--bg-soft); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; margin-bottom: 48px; }
.news-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--primary); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-card:hover .news-thumb img { transform: scale(1.08); }
.news-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; color: rgba(255, 255, 255, .55); background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.news-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.news-date { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.news-date i { color: var(--accent-dark); margin-right: 4px; }
.news-body h3 { font-size: 1.15rem; margin-bottom: .5em; }
.news-body h3 a:hover { color: var(--primary-2); }
.news-body p { color: var(--muted); font-size: .93rem; }
.read-more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--primary-2); display: inline-flex; align-items: center; gap: 8px; }
.read-more i { transition: transform .25s; }
.read-more:hover i { transform: translateX(5px); }
.empty-state { text-align: center; color: var(--muted); font-size: 1.1rem; padding: 30px 0 48px; }

/* Events carousel */
.events { background: linear-gradient(160deg, var(--primary-dark), var(--primary)); }
.events .section-head h2 { color: #fff; }
.event-carousel { position: relative; max-width: 980px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); background: #0b2b16; }
.event-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.event-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.event-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); transition: transform 7s ease-out; }
.event-slide.is-active img { transform: scale(1); }
.event-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 44px 54px; color: #fff; background: linear-gradient(0deg, rgba(5, 25, 12, .92), rgba(5, 25, 12, 0)); }
.event-slide figcaption h3 { color: #fff; font-size: clamp(1.2rem, 2.6vw, 1.9rem); margin-bottom: .3em; }
.event-slide figcaption p { margin: 0; max-width: 640px; color: #dcebe0; font-size: .98rem; }
.event-slide figcaption > * { opacity: 0; transform: translateY(20px); transition: opacity .7s .35s, transform .7s .35s; }
.event-slide.is-active figcaption > * { opacity: 1; transform: none; }
.event-slide.is-active figcaption p { transition-delay: .5s; }
.event-arrow { position: absolute; z-index: 3; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--primary-dark); box-shadow: var(--shadow-sm); transition: background .25s, transform .25s; }
.event-arrow:hover { background: var(--accent); transform: scale(1.1); }
.event-arrow.prev { left: 18px; }
.event-arrow.next { right: 18px; }
.event-dots { position: absolute; z-index: 3; right: 26px; bottom: 22px; display: flex; gap: 8px; }
.event-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: width .3s, background .3s; }
.event-dots button.is-active { width: 28px; background: var(--accent); }

/* CTA */
.cta { background: var(--accent); padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .2em; color: #2a2200; }
.cta p { margin: 0; color: #4a3d00; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.cta .btn-accent { background: var(--primary-dark); color: #fff; }
.cta .btn-accent:hover { background: var(--primary); }
.cta .btn-ghost { border-color: var(--primary-dark); color: var(--primary-dark); }
.cta .btn-ghost:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #c9dccd; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 48px; padding: 70px 0 50px; }
.site-footer h4 { color: #fff; font-size: 1.15rem; margin-bottom: 1.1em; position: relative; padding-bottom: 12px; }
.site-footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: var(--accent); border-radius: 3px; }
.brand-light .brand-text { color: #fff; }
.brand-light .brand-text small { color: #a9c3af; }
.footer-brand p { margin: 18px 0 20px; max-width: 340px; font-size: .94rem; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 14px; font-size: .94rem; }
.contact-list i { color: var(--accent); margin-top: 5px; width: 16px; }
.contact-list a:hover, .link-list a:hover { color: var(--accent); }
.link-list li { margin-bottom: 10px; }
.link-list a { transition: padding .2s, color .2s; font-size: .94rem; }
.link-list a:hover { padding-left: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .86rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 0; }
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: var(--accent); }

.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .3s, transform .3s, visibility .3s, background .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: #2a2200; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.pillar-grid .reveal:nth-child(2), .news-grid .reveal:nth-child(2) { transition-delay: .1s; }
.pillar-grid .reveal:nth-child(3), .news-grid .reveal:nth-child(3) { transition-delay: .2s; }
.pillar-grid .reveal:nth-child(4), .news-grid .reveal:nth-child(4) { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.pillar-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
	:root { --header-h: 68px; }
	.nav-toggle { display: block; }
	.main-nav {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(340px, 86vw);
		padding: 90px 22px 30px; background: #fff; overflow-y: auto;
		transform: translateX(100%); transition: transform .4s cubic-bezier(.7, 0, .2, 1); box-shadow: -10px 0 40px rgba(0, 0, 0, .2);
	}
	.main-nav.open { transform: none; }
	.main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.main-nav > ul > li > button { width: 100%; justify-content: space-between; padding: 14px; font-size: 1rem; }
	.sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; max-height: 0; overflow: hidden; transition: max-height .35s; }
	.has-sub:hover > .sub { max-height: 0; }
	.has-sub.open > .sub { max-height: 400px; }
	.has-sub.open > button i { transform: rotate(180deg); }
	.nav-cta { margin: 14px 0 0; }
	.nav-cta .btn { width: 100%; }
	.topbar-contact a:nth-child(2) { display: none; }
}

@media (max-width: 680px) {
	.section { padding: 70px 0; }
	.hero { min-height: 560px; }
	.hero-controls { right: 20px; bottom: 28px; gap: 10px; }
	.hero-arrow { width: 42px; height: 42px; }
	.hero-counter { display: none; }
	.hero-dots { bottom: 40px; }
	.pillars { margin-top: -40px; }
	.pillar-grid { grid-template-columns: 1fr; }
	.event-slide figcaption { padding: 50px 22px 46px; }
	.event-arrow { width: 38px; height: 38px; margin-top: -19px; }
	.event-dots { right: 18px; bottom: 16px; }
	.footer-grid { grid-template-columns: 1fr; gap: 34px; padding: 54px 0 34px; }
	.footer-bottom-inner { flex-direction: column; text-align: center; }
	.topbar-inner { justify-content: center; }
	.topbar .social { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
}
