/* ==========================================================================
   Kids International School — custom styles (plain CSS)
   The Tailwind Play CDN only compiles utility classes found in the HTML; it
   does NOT process @apply inside external stylesheets. So all component styles
   here are written as plain CSS using the brand palette directly.

   Brand palette:
     blue      #1E40AF   blueDark #172E7C   blueLight #0369A1
     sky       #EFF4FF   yellow   #FBBF24   yellowDark #F59E0B
     ink       #0A0A0A
   ========================================================================== */

:root {
  --blue: #1E40AF;
  --blue-dark: #172E7C;
  --blue-light: #0369A1;
  --sky: #EFF4FF;
  --yellow: #FBBF24;
  --yellow-dark: #F59E0B;
  --ink: #0A0A0A;
}

body { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-yellow,
.btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.65rem 1.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-yellow:focus-visible,
.btn-outline-light:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.3); }

.btn-primary {
  background-color: var(--blue);
  color: #fff;
  border-bottom: 4px solid var(--yellow);
  box-shadow: 0 4px 14px -6px rgba(30, 64, 175, 0.4);
}
.btn-primary:hover { background-color: var(--blue-dark); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background-color: #fff;
  color: var(--blue);
  border: 1px solid #e2e8f0;
}
.btn-secondary:hover { border-color: var(--blue); transform: translateY(-2px); }

.btn-yellow {
  background-color: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 4px 14px -6px rgba(245, 158, 11, 0.5);
}
.btn-yellow:hover { background-color: var(--yellow-dark); transform: translateY(-2px); }
.btn-yellow:focus-visible { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.4); }

.btn-outline-light {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.btn-outline-light:hover { background-color: #fff; color: var(--blue); }
.btn-outline-light:focus-visible { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4); }

/* ---------- Nav ---------- */
.nav-link {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--blue); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background-color: var(--yellow);
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

.mobile-link {
  display: block;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  transition: all 0.2s ease;
}
.mobile-link:hover { background-color: var(--sky); color: var(--blue); }

/* ---------- Section helpers ---------- */
.section-eyebrow {
  display: inline-block;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.section-title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }

.check-badge {
  display: grid;
  place-items: center;
  height: 1.5rem;
  width: 1.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background-color: var(--blue);
  color: #fff;
  margin-top: 0.125rem;
}

/* ---------- Feature cards ---------- */
.feature-card {
  background-color: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: all 0.3s ease;
}
.feature-card:hover { box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.3); transform: translateY(-4px); }
.feature-icon {
  display: grid;
  place-items: center;
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 1rem;
  margin-bottom: 1.25rem;
}
.feature-heading { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--ink); }
.feature-text { font-size: 0.875rem; color: #475569; margin-top: 0.5rem; line-height: 1.6; }

/* ---------- Grade cards ---------- */
.grade-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background-color: var(--sky);
  border: 1px solid rgba(30, 64, 175, 0.1);
  padding: 1.5rem 0;
  transition: all 0.3s ease;
}
.grade-card:hover { background-color: var(--blue); border-color: var(--blue); }
.grade-num { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.5rem; color: var(--blue); transition: color 0.3s ease; }
.grade-card:hover .grade-num { color: #fff; }
.grade-age { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; transition: color 0.3s ease; }
.grade-card:hover .grade-age { color: #dbeafe; }

/* ---------- Program cards ---------- */
.program-card {
  background-color: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 0.3s ease;
}
.program-card:hover { border-color: rgba(30, 64, 175, 0.4); }
.prog-item { display: flex; align-items: center; gap: 0.5rem; }
.prog-item::before {
  content: "";
  height: 0.375rem;
  width: 0.375rem;
  border-radius: 9999px;
  background-color: var(--yellow);
  flex-shrink: 0;
}

/* ---------- News cards ---------- */
.news-card {
  background-color: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
}
.news-card:hover { box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.3); transform: translateY(-4px); }
.news-media { position: relative; height: 10rem; display: flex; align-items: flex-end; padding: 1rem; }
.news-tag {
  display: inline-block;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
}
.news-date { font-size: 0.75rem; font-weight: 600; color: var(--yellow-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.news-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--ink); margin-top: 0.375rem; }
.news-excerpt { font-size: 0.875rem; color: #475569; margin-top: 0.5rem; line-height: 1.6; }
.news-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 1rem;
  transition: gap 0.2s ease;
}
.news-more::after { content: "\2192"; }
.news-more:hover { gap: 0.5rem; }

/* ---------- Resource cards ---------- */
.resource-card {
  display: block;
  background-color: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: all 0.3s ease;
}
.resource-card:hover { border-color: var(--blue); transform: translateY(-4px); }
.resource-card--accent { background-color: var(--blue); border-color: var(--blue); }
.resource-card--accent .resource-title { color: #fff; }
.resource-card--accent .resource-text { color: #dbeafe; }
.resource-icon {
  display: grid;
  place-items: center;
  height: 3rem;
  width: 3rem;
  border-radius: 0.75rem;
  background-color: var(--sky);
  color: var(--blue);
  margin-bottom: 1rem;
}
.resource-icon--accent { background-color: var(--yellow); color: var(--ink); }
.resource-title { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--ink); }
.resource-text { font-size: 0.875rem; color: #475569; margin-top: 0.375rem; }

/* ---------- Team cards ---------- */
.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(90deg, var(--blue), var(--yellow));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.team-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 44px -22px rgba(15, 23, 42, 0.35);
  border-color: rgba(30, 64, 175, 0.25);
}
.team-card:hover::before { opacity: 1; }

.team-avatar {
  position: relative;
  display: grid;
  place-items: center;
  height: 6rem;
  width: 6rem;
  border-radius: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.35);
}
.team-avatar--blue {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
}
.team-avatar--yellow {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
}
.team-initials {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.team-initials--ink { color: var(--ink); }

.team-badge {
  position: absolute;
  right: -0.4rem;
  bottom: -0.4rem;
  display: grid;
  place-items: center;
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  background-color: var(--yellow);
  color: var(--ink);
  border: 3px solid #fff;
}
.team-badge--yellow {
  background-color: var(--blue);
  color: #fff;
}

.team-name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
}
.team-role {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 0.25rem;
}
.team-bio {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  margin-top: 0.875rem;
}
.team-specialty {
  display: inline-block;
  margin-top: 1.125rem;
  border-radius: 9999px;
  background-color: var(--sky);
  color: var(--blue);
  border: 1px solid rgba(30, 64, 175, 0.15);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
}
.team-card:hover .team-specialty {
  background-color: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow-dark);
}

.team-cta-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(30, 64, 175, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.team-cta-link:hover { color: var(--blue-dark); text-decoration-color: var(--yellow); }

/* ---------- Contact ---------- */
.contact-icon {
  display: grid;
  place-items: center;
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background-color: var(--blue);
  color: #fff;
}
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 0.375rem; }
.form-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ink);
  transition: all 0.2s ease;
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.15); }

/* ---------- Footer ---------- */
.footer-heading { font-family: 'Poppins', sans-serif; font-weight: 700; color: #fff; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.875rem; }
.footer-link { color: #94a3b8; transition: color 0.2s ease; }
.footer-link:hover { color: var(--yellow); }
.social-link {
  display: grid;
  place-items: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  transition: all 0.2s ease;
}
.social-link:hover { background-color: var(--blue); color: #fff; }

/* ---------- Header scrolled state (toggled by JS) ---------- */
#site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 8px 24px -12px rgba(15, 23, 42, 0.18);
}

/* ---------- Hero placeholder pattern ---------- */
.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.6) 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.5) 3px, transparent 3px);
  background-size: 46px 46px, 60px 60px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Prevent horizontal overflow on small screens */
html, body { overflow-x: hidden; }
