:root {
  --cream: #f7f1e1;
  --cream-soft: #fbf7ee;
  --navy: #10233f;
  --navy-deep: #081527;
  --navy-soft: #2c3f63;
  --gold: #b4880c;
  --gold-bg: #fbf1d3;
  --wave-h: clamp(46px, 7vw, 84px);
  --max: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.serif {
  font-family: 'IM Fell English', Georgia, serif;
}

h1, h2, h3 {
  font-family: 'IM Fell English', Georgia, serif;
  font-weight: 400;
  text-wrap: balance;
  margin: 0;
}

/* ---------------- nav ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream-soft);
  border-bottom: 1px solid #e6dcc0;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: 'Mrs Saint Delafield', cursive;
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--navy);
  line-height: 1;
}
.nav-menu { position: relative; }
.nav-menu summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  padding: 0.55em 1.2em;
  user-select: none;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { background: var(--navy); color: var(--cream-soft); }
.nav-menu .menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--navy);
  border-radius: 10px;
  padding: 0.6rem;
  min-width: 260px;
  box-shadow: 0 12px 28px rgba(8, 21, 39, 0.35);
  display: flex;
  flex-direction: column;
}
.nav-menu .menu-panel a {
  display: block;
  padding: 0.6em 0.8em;
  border-radius: 6px;
  text-decoration: none;
  color: #dfe6f2;
  font-size: 0.92rem;
}
.nav-menu .menu-panel a:hover,
.nav-menu .menu-panel a[aria-current="page"] { background: var(--navy-soft); color: var(--cream-soft); }

/* ---------------- wave divider ---------------- */
.wave {
  position: relative;
  width: 100%;
  height: var(--wave-h);
  overflow: hidden;
  line-height: 0;
}
.wave svg {
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 100%;
  animation: drift 24s linear infinite;
}
.wave.rev svg { animation-direction: reverse; }
.wave.slow svg { animation-duration: 36s; opacity: 0.6; }
@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .wave svg { animation: none; }
}

/* ---------------- hero ---------------- */
.hero {
  padding: clamp(2.4rem, 7vw, 4.4rem) 1.5rem 0;
  text-align: center;
}
.eyebrow {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 0.7rem;
}
.wordmark-lg {
  font-family: 'Mrs Saint Delafield', cursive;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  line-height: 1.15;
}
.tagline {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--navy-soft);
  margin: 0.5rem 0 2.2rem;
}
.page-title {
  font-size: clamp(1.6rem, 4.6vw, 2.4rem);
  letter-spacing: 0.03em;
  margin: 0 0 0.9rem;
}
.rule {
  border: none;
  border-top: 1.5px solid var(--navy);
  width: 70px;
  margin: 0 auto 2rem;
}
.rule.on-dark { border-color: var(--gold); }

/* ---------------- bands ---------------- */
.band {
  padding: clamp(2.2rem, 6vw, 3.6rem) 1.5rem;
}
.band-navy { background: var(--navy); color: var(--cream-soft); }
.band-navy .prose p { color: #d7deea; }
.band-cream { background: var(--cream); }
.band-white { background: var(--cream-soft); }
.inner { max-width: var(--max); margin: 0 auto; }
.center { text-align: center; }

.section-title {
  font-size: clamp(1.3rem, 3.6vw, 1.8rem);
  letter-spacing: 0.03em;
  margin: 0 0 1.5rem;
  text-align: center;
}

.prose p { margin: 0 0 1.15rem; }
.prose p:last-child { margin-bottom: 0; }

ul.checks {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
ul.checks li { position: relative; padding-left: 1.5rem; }
ul.checks li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.band-navy ul.checks li::before { color: var(--gold); }

.price-line {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
  margin: 0 0 1.4rem;
}
.band-navy .price-line { color: var(--gold-bg); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn:hover { background: var(--gold); color: var(--navy-deep); }
.btn.solid { background: var(--gold); color: var(--navy-deep); }
.btn.solid:hover { background: var(--gold-bg); border-color: var(--gold-bg); }
.btn.on-navy { color: var(--gold-bg); border-color: var(--gold-bg); }
.btn.on-navy:hover { background: var(--gold-bg); color: var(--navy-deep); }

/* ---------------- photo frame (placeholder) ---------------- */
.photo-frame {
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--navy-soft), var(--navy) 60%, var(--navy-deep));
  color: var(--cream-soft);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
  margin: 0 0 1.4rem;
}
.photo-frame::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(180,136,12,0.09) 0 2px, transparent 2px 22px);
}
.photo-frame span {
  position: relative;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: #c7d1e2;
  line-height: 1.4;
}
.photo-frame.wide { aspect-ratio: 16 / 9; }
.photo-frame.tall { aspect-ratio: 3 / 4; max-width: 260px; margin-left: auto; margin-right: auto; }

/* a book cover shown inline within a class/lesson card, rather than the
   photo-frame placeholder used for still-missing photos */
.cover-inline {
  max-width: 220px;
  margin: 0 auto 1.4rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(16,35,63,0.2);
}

/* a real wide photo standing in for the photo-frame placeholder */
.photo-wide {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 1.4rem;
  box-shadow: 0 8px 20px rgba(16,35,63,0.2);
}
.photo-wide img { width: 100%; height: 100%; object-fit: cover; }

.video-thumb {
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 0.7rem;
}
.video-thumb .play {
  position: relative;
  font-size: 1.6rem;
  width: 3.2rem; height: 3.2rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
}
.video-thumb span.label {
  position: relative;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #dfe6f2;
}

/* ---------------- book grid ---------------- */
.books {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 720px) { .books { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .books { grid-template-columns: 1fr; } }

.book-card {
  background: var(--cream-soft);
  border: 1px solid #e4dac0;
  border-radius: 10px;
  padding: 1.1rem 1rem 1.3rem;
  text-align: center;
}
.book-card .spine {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 2 / 3;
  margin: 0 auto 1rem;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--navy-soft), var(--navy));
  border-left: 6px solid var(--gold);
  box-shadow: 0 8px 18px rgba(16,35,63,0.22);
  overflow: hidden;
}
.book-card .spine img { width: 100%; height: 100%; object-fit: cover; }
.book-card h3 { font-size: 1rem; line-height: 1.35; margin-bottom: 0.4rem; }
.book-card .meta { font-size: 0.76rem; color: var(--navy-soft); letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.book-card p { font-size: 0.88rem; text-align: left; margin: 0 0 1.1rem; }

/* ---------------- book shelf (horizontal row of covers) ---------------- */
.shelf {
  display: flex;
  gap: 1.3rem;
  overflow-x: auto;
  padding: 0.4rem 0.2rem 1.1rem;
  scroll-snap-type: x proximity;
}
.shelf-item {
  flex: 0 0 128px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}
.shelf-cover {
  width: 128px; height: 186px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--navy-soft), var(--navy));
  border-left: 7px solid var(--gold);
  box-shadow: 0 8px 20px rgba(16,35,63,0.22);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; }
.shelf-item .shelf-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.3;
}

/* ---------------- latest-songs widget (see public/js/latest-songs.js) -- */
.songs-grid {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.4rem 0.2rem 1.1rem;
  scroll-snap-type: x proximity;
}
.songs-grid .muted { color: #c7d1e2; }
.song-card {
  flex: 0 0 200px;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}
.song-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--gold);
  box-shadow: 0 8px 20px rgba(16,35,63,0.22);
  margin-bottom: 0.5rem;
}
.song-card .song-title {
  display: block;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--cream-soft);
}

/* ---------------- full book entry (Published Books page) ---------------- */
.book-full {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.6rem;
  align-items: start;
  margin: 0 auto 2.6rem;
  max-width: var(--max);
  scroll-margin-top: 5rem;
}
@media (max-width: 560px) {
  .book-full { grid-template-columns: 1fr; text-align: center; }
  .book-full .spine-lg { margin: 0 auto; }
}
.book-full .spine-lg {
  width: 130px; height: 188px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--navy-soft), var(--navy));
  border-left: 7px solid var(--gold);
  box-shadow: 0 8px 20px rgba(16,35,63,0.22);
  flex: none;
  overflow: hidden;
}
.book-full .spine-lg img { width: 100%; height: 100%; object-fit: cover; }
.book-full h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.book-full .byline { font-size: 0.82rem; color: var(--navy-soft); margin-bottom: 0.9rem; }
.book-full p { font-size: 0.94rem; margin: 0 0 1.1rem; }

/* ---------------- class cards (Classes / Homeschool) ---------------- */
.class-card {
  max-width: var(--max);
  margin: 0 auto clamp(2.4rem, 5vw, 3.2rem);
  text-align: left;
}
.class-card h3 {
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
  margin-bottom: 1rem;
  text-align: center;
}
.class-card .meta {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
  margin: 0 0 0.9rem;
}

/* ---------------- homeschool sign-up checklist (see homeschool-signup.js) --- */
.signup-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}
.signup-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--cream-soft, var(--white));
  border: 1px solid #e4dac0;
  border-radius: 8px;
  padding: 0.8em 1em;
  cursor: pointer;
}
.signup-check {
  width: 1.15em;
  height: 1.15em;
  accent-color: var(--navy);
  flex: 0 0 auto;
}
.signup-row-name {
  flex: 1 1 auto;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.02rem;
}
.signup-row-price {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--navy);
}
.signup-row-unit {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--navy-soft);
}
.signup-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--navy);
  padding-top: 0.9rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
}
.signup-payment-note {
  background: #fbf1d3;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0.9em 1.1em;
  margin-top: 1.4rem;
  font-size: 0.9rem;
}
.signup-payment-note p { margin: 0; }

/* ---------------- video embed ---------------- */
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy-deep);
  margin-bottom: 0.8rem;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-caption {
  font-size: 0.86rem;
  color: var(--navy-soft);
  text-align: center;
  margin: 0 0 2.4rem;
}
.band-navy .video-caption { color: #c7d1e2; }
.video-grid {
  display: grid;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
}

/* ---------------- contact form ---------------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
  margin: 0 auto 1.4rem;
}
.contact-form input,
.contact-form textarea {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.85em 1em;
  border: 1.5px solid var(--gold-bg);
  border-radius: 6px;
  background: var(--navy-soft);
  color: var(--cream-soft);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #b9c3d6; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-note { font-size: 0.78rem; color: #b9c3d6; max-width: 420px; margin: 0 auto 2rem; }
.contact-note a { color: var(--gold-bg); }

/* ---------------- external-link callout ---------------- */
.external-card {
  background: var(--navy-soft);
  color: var(--cream-soft);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: var(--max);
  margin: 0 auto 2.4rem;
}
.external-card p { color: #d7deea; margin: 0 0 1.3rem; }

/* ---------------- footer ---------------- */
footer { background: var(--navy-deep); }
.ticker-band {
  background: var(--navy-deep);
  overflow: hidden;
  border-top: 1px solid #1c2c47;
  padding: 0.55rem 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: ticker 26s linear infinite;
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--gold);
  white-space: nowrap;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
.footer-inner {
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
  text-align: center;
  color: #b9c3d6;
}
.socials { display: flex; justify-content: center; align-items: center; gap: 0.9rem; margin-bottom: 1.3rem; }
.socials a {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  text-decoration: none;
}
.socials a.small { width: 24px; height: 24px; font-size: 0.68rem; background: var(--gold-bg); }
.copyright { font-size: 0.85rem; margin: 0 0 1.2rem; }
.footlinks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem 1.4rem;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1.4rem;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
}
.footlinks a { color: #d7deea; text-decoration: none; }
.footlinks a:hover { color: var(--gold-bg); }
.footer-rule { border: none; border-top: 1px solid #23375a; max-width: 220px; margin: 0 auto 1.4rem; }
.domain-bar {
  background: var(--cream-soft);
  color: var(--navy);
  text-align: center;
  padding: 0.9rem;
  font-size: 0.85rem;
  border-top: 2px solid var(--navy);
}

/* ---------------- 404 ---------------- */
.error-page { text-align: center; padding: 5rem 1.5rem; }
