:root {
  --ink: #2B3A55;
  --ink-soft: #5c6b85;
  --brand: #2B3A55;
  --brand-dark: #1d2940;
  --accent: #FF9F45;
  --accent-dark: #ef8730;
  --bg: #ffffff;
  --bg-soft: #FFF8EC;
  --line: #ece3d5;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43,58,85,.10);
  --maxw: 68rem;
}

/* =========================================
   1. Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   2. Typography Scale
   ========================================= */
h1, h2, h3 {
  line-height: 1.2;
  margin-top: 0;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-top: 0; /* Explicit constraint */
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* =========================================
   3. Layout Helpers
   ========================================= */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 3.5rem;
}

.section--soft {
  background-color: var(--bg-soft);
}

.section h2 {
  text-align: center;
}

.section .sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0.6rem auto 2.5rem;
}

/* =========================================
   4. Header & Navigation
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px); /* Fallback handled by solid bg color */
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  font-size: 1.15rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.brand img, .brand svg { height: 2.1rem; width: auto; display: block; }
@media (min-width: 48rem) { .brand img, .brand svg { height: 2.5rem; } }
.brand picture { display: block; line-height: 0; }

.nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: .97rem;
}

.nav a:hover {
  color: var(--brand);
}

/* =========================================
   5. Buttons
   ========================================= */
.btn {
  display: inline-block;
  background-color: var(--accent);
  color: #2B3A55;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  box-shadow: var(--shadow);
  transition: background-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent-dark);
}

.btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.btn--ghost {
  background-color: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: rgba(15, 111, 140, 0.05); /* Very subtle brand tint */
}

/* =========================================
   6. Hero Section
   ========================================= */
.hero {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  padding-block: 3.5rem 3rem;
  text-align: center;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin-inline: auto;
}

.hero .actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

/* =========================================
   7. Grids & Cards
   ========================================= */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.card {
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0;
  color: var(--brand-dark);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Class Card Specifics */
.card--class {
  border-top: 4px solid var(--brand);
}

.card__age {
  display: inline-block;
  background-color: var(--bg-soft);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* =========================================
   8. Testimonials (Quotes)
   ========================================= */
.quote {
  border-left: 4px solid var(--accent);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
}

.quote cite {
  display: block;
  margin-top: 0.6rem;
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

/* =========================================
   9. Gallery
   ========================================= */
.gallery-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}

.gallery-grid img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: var(--bg-soft); /* Placeholder color */
}

/* =========================================
   10. Contact List
   ========================================= */
.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-list a {
  color: var(--brand);
  font-weight: 600;
}

/* =========================================
   11. Blog/News Posts
   ========================================= */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.post-list h3 {
  margin: 0 0 0.3rem;
}

.post-list a {
  color: var(--ink);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--brand);
}

.post-list time {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* =========================================
   12. Footer
   ========================================= */
.site-footer {
  background-color: var(--ink);
  color: #cfe0e8;
  padding-block: 2.5rem;
  margin-top: 3rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
}

.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}

/* =========================================
   13. Accessibility & Utilities
   ========================================= */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  background-color: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  text-decoration: none;
}

/* =========================================
   14. Media Queries (Tablet & Desktop)
   ========================================= */

/* Tablet / Small Desktop (min-width: 768px / 48rem) */
@media (min-width: 48rem) {
  
  /* Nav adjustments for smaller screens per constraint */
  .nav {
    gap: 0.85rem;
  }
  .nav a {
    font-size: 0.9rem;
  }

  /* Grids */
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Footer */
  .site-footer .wrap {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop (min-width: 1024px / 64rem) */
@media (min-width: 64rem) {
  
  /* Grids */
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Cap specific grids at 2 columns if needed, though standard grid goes to 3 */
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   15. Reduced Motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   16. Dark Mode Support
   ========================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FFF8EC;
    --ink-soft: #c3bcae;
    --brand: #FFC93C;
    --brand-dark: #FFD966;
    --accent: #FF9F45;
    --accent-dark: #ffb066;
    --bg: #1a2233;
    --bg-soft: #232d42;
    --line: #38425c;
    --shadow: 0 2px 12px rgba(0,0,0,.45);
  }

  .site-header {
    background-color: var(--bg);
  }

  .site-footer {
    background-color: var(--bg-soft);
    color: var(--ink-soft);
  }

  .site-footer a {
    color: var(--brand-dark);
  }

  .card {
    background-color: var(--bg-soft);
  }

  .btn {
    color: #10202a;
  }

  .skip-link:focus {
    color: #0d181e;
  }

  .gallery-grid img {
    background-color: var(--bg-soft);
  }
}
