/* Sandy Ridge Academy redesign — colors taken from the existing logo and site
   (purple tuition bands, yellow sun, teal nav, red apple/tagline). */
:root {
  --purple: #7b1a8c;
  --purple-dark: #4a0e52;
  --purple-tint: #f6eef8;
  --yellow: #f6c21c;
  --yellow-tint: #fff7dc;
  --teal: #1f7f99;          /* darkened from the site's #3aa6c4 for 4.5:1 text contrast */
  --teal-tint: #e6f4f8;
  --red: #c8202f;
  --ink: #23202a;
  --muted: #5c5766;
  --line: #e6e1ea;
  --bg: #fffdf9;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(74, 14, 82, .08);
  --font-head: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--purple); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--purple-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--purple-dark); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Top bar */
.topbar { background: var(--purple-dark); color: #f3e9f5; font-size: .875rem; }
.topbar__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 6px 0; }
.topbar a { color: #fff; text-decoration: none; font-weight: 700; }
.topbar a:hover { text-decoration: underline; color: var(--yellow); }
.topbar__links { display: flex; gap: 8px; }
@media (max-width: 640px) { .topbar__inner > span:first-child { display: none; } }

/* Header + nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
.brand img { height: 76px; width: auto; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 500; font-size: 1.02rem;
  color: var(--purple-dark); text-decoration: none;
}
.site-nav a:hover { background: var(--purple-tint); }
.site-nav a[aria-current="page"] { background: var(--purple-tint); color: var(--purple); }
.site-nav a.btn { color: var(--purple-dark); margin-left: 6px; }
.site-nav a.btn:hover { background: #ffd447; }

.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border: 0; border-radius: 12px;
    background: var(--purple-tint); cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; display: block; width: 22px; height: 3px; border-radius: 2px;
    background: var(--purple-dark); position: relative; transition: transform .2s;
  }
  .nav-toggle__bar::before { position: absolute; top: -7px; }
  .nav-toggle__bar::after { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .site-nav a { padding: 12px 14px; }
  .site-nav a.btn { margin: 8px 0 0; text-align: center; }
  .brand img { height: 52px; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  background: var(--yellow); color: var(--purple-dark);
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; border: 2px solid transparent;
}
.btn:hover { background: #ffd447; color: var(--purple-dark); }
.btn--small { padding: 8px 16px; font-size: .98rem; }
.btn--ghost { background: transparent; border-color: currentColor; color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--purple { background: var(--purple); color: #fff; }
.btn--purple:hover { background: var(--purple-dark); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section--tint { background: var(--purple-tint); }
.section--yellow { background: var(--yellow-tint); }
.section--teal { background: var(--teal-tint); }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
  color: var(--red); margin-bottom: 8px;
}
.lead { font-size: 1.2rem; color: var(--muted); }
.section-head { max-width: 720px; margin-bottom: 32px; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 95% 8%, rgba(246,194,28,.45), transparent 260px),
    linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  padding: clamp(48px, 8vw, 96px) 0;
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--yellow); display: block; }
.hero p { color: #f1e6f3; font-size: 1.15rem; max-width: 36em; }
.hero__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero__photos img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius);
  border: 5px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.hero__photos img:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.hero__photos img:not(:first-child) { aspect-ratio: 4 / 3; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 28px; padding: 0; list-style: none; font-weight: 700; color: #fff; }
.hero__facts li::before { content: "★"; color: var(--yellow); margin-right: 6px; }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photos { max-width: 520px; }
}

/* Page banner for inner pages */
.page-banner { background: linear-gradient(135deg, var(--purple-dark), var(--purple)); color: #fff; padding: clamp(40px, 6vw, 64px) 0; }
.page-banner h1 { color: #fff; margin: 0; }
.page-banner p { color: #f1e6f3; margin: 8px 0 0; font-size: 1.15rem; max-width: 40em; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border-top: 6px solid var(--purple);
}
.card--yellow { border-top-color: var(--yellow); }
.card--teal { border-top-color: var(--teal); }
.card--red { border-top-color: var(--red); }
.card h3 { margin-bottom: .35em; }
.card .meta { font-weight: 700; color: var(--purple); margin-bottom: .6em; }
.card ul { padding-left: 1.2em; margin: 0; }

/* Two-column media/text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%234a0e52' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* CTA band */
.cta {
  background: var(--purple-dark); color: #fff; border-radius: calc(var(--radius) + 6px);
  padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 24px;
}
.cta h2 { color: var(--yellow); margin: 0; }
.cta p { margin: 6px 0 0; color: #f1e6f3; }
.cta a.phone { color: #fff; }

/* Tuition tables */
.rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.rate-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rate-card__head { background: var(--purple); color: #fff; padding: 18px 24px; }
.rate-card__head h2 { color: #fff; font-size: 1.45rem; margin: 0; }
.rate-card__head p { margin: 2px 0 0; color: var(--yellow); font-weight: 700; }
.rate-card table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rate-card caption { text-align: left; }
.rate-card th, .rate-card td { padding: 14px 24px; text-align: left; border-bottom: 1px solid var(--line); }
.rate-card thead th { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #faf7fb; }
.rate-card tbody th { font-weight: 700; }
.rate-card td { text-align: right; font-weight: 700; color: var(--purple-dark); }
.rate-card thead th:not(:first-child) { text-align: right; }
@media (max-width: 480px) { .rate-card th, .rate-card td { padding: 12px 14px; } }
.rate-card tr:last-child th, .rate-card tr:last-child td { border-bottom: 0; }
.fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 32px; }
.fee { background: var(--yellow-tint); border-radius: var(--radius); padding: 20px 24px; border: 2px dashed var(--yellow); }
.fee strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--purple-dark); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); }
.lightbox::backdrop { background: rgba(20, 6, 24, .85); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lightbox__close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #fff; color: var(--purple-dark); font-size: 1.6rem; cursor: pointer;
}

/* Testimonials */
.quotes { columns: 2 340px; column-gap: 24px; }
.quote {
  break-inside: avoid; margin: 0 0 24px; background: #fff; border-radius: var(--radius);
  padding: 28px 28px 22px; box-shadow: var(--shadow); position: relative;
}
.quote::before {
  content: "\201C"; position: absolute; top: -6px; left: 18px;
  font-family: Georgia, serif; font-size: 4.5rem; line-height: 1; color: var(--yellow);
}
.quote blockquote { margin: 18px 0 12px; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { font-weight: 700; color: var(--purple); }

/* Placeholder / owner-input notice */
.notice {
  border: 2px dashed var(--teal); background: var(--teal-tint); border-radius: var(--radius);
  padding: 24px 28px;
}
.notice h2 { color: var(--teal); font-size: 1.4rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
address { font-style: normal; }

/* Footer */
.site-footer { background: #2a0a2f; color: #e9dcec; padding: 56px 0 0; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 32px; }
.site-footer__name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: #fff; margin-bottom: 0; }
.site-footer__heading { font-size: 1.1rem; color: var(--yellow); margin-bottom: .6em; }
.site-footer .tagline { color: var(--yellow); font-family: var(--font-head); font-weight: 600; letter-spacing: .04em; }
.site-footer p, .site-footer address { font-size: .98rem; overflow-wrap: anywhere; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding: 16px 0 24px; font-size: .85rem; color: #bfaec3; }
.site-footer__legal p { margin: 0; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }
