/* Shepherds of Honor Foundation — AI Smart Kids (preview site)
   Colors from the foundation badge: navy and gold.
   No webfonts or third-party CSS (COPPA: no outside requests except YouTube embeds). */

:root {
  --navy: #082252;
  --navy-deep: #06183a;
  --navy-mid: #1a3a73;
  --gold: #ffb409;
  --gold-deep: #e09a00;
  --gold-soft: #ffe7a8;
  --cream: #fff6e4;
  --cream-2: #ffefc8;
  --white: #ffffff;
  --ink: #082252;
  --muted: #3e5278;
  --line: #ead9a8;
  --ok: #1a7a3a;
  --ok-bg: #e6f6ea;
  --no: #a32020;
  --no-bg: #fdecec;
  --shadow: 0 10px 28px rgba(8, 34, 82, 0.12);
  --radius: 22px;
  --tap: 52px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, #ffe7a8 0%, transparent 55%),
    radial-gradient(900px 480px at 110% 0%, #ffd36a 0%, transparent 50%),
    var(--cream);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", "Avenir Next", "Avenir", system-ui, sans-serif;
  line-height: 1.45;
  min-height: 100%;
}

img { max-width: 100%; height: auto; }
a { color: var(--navy-mid); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 5px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0 calc(10px + env(safe-area-inset-top, 0px));
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.brand-title {
  display: block;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--gold-soft);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.star-chip {
  background: rgba(255, 180, 9, 0.16);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.1); }

.preview-banner {
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
}

/* Hero */
.hero {
  padding: 28px 0 8px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  min-height: 2rem;
}

.earned-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Cards */
.section-title {
  margin: 22px 0 12px;
  font-size: 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 28px;
}

@media (min-width: 700px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid.series-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

a.card:hover, a.card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.card.soon {
  background: #fffaf0;
  border: 2px dashed #d8c48a;
  box-shadow: none;
  color: var(--muted);
  min-height: 130px;
}

.icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  flex: 0 0 auto;
}

.card.soon .icon-bubble {
  background: #ece3c8;
  color: var(--navy);
}

.kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.card h2, .card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.progress-line {
  margin-top: auto;
  font-weight: 800;
  color: var(--navy);
  font-size: 0.95rem;
}

.stars {
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  font-size: 1.15rem;
}
.stars .dim { color: #e6d7b0; }

/* Series lesson list */
.lesson-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 32px; }

.lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  min-height: var(--tap);
}

.lesson-row:hover, .lesson-row:focus-visible { border-color: var(--gold); }

.num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.lesson-row strong { display: block; font-size: 1.05rem; }
.lesson-row span.meta { color: var(--muted); font-size: 0.88rem; }
.lesson-row .right { margin-left: auto; text-align: right; }

/* Lesson page */
.back {
  display: inline-block;
  margin: 16px 0 8px;
  font-weight: 800;
  text-decoration: none;
  color: var(--navy);
}

.lesson-head h1 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 5vw, 2rem);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 14px 0 22px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.quiz {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 22px;
  margin-bottom: 40px;
}

.quiz h2 { margin: 0 0 6px; }
.q-count { color: var(--muted); font-weight: 700; margin: 0 0 12px; }

.question {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 14px;
}

.choices { display: flex; flex-direction: column; gap: 10px; }

.choice {
  appearance: none;
  border: 3px solid #e7d9ad;
  background: #fffdf6;
  border-radius: 16px;
  min-height: 58px;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.choice:hover { border-color: var(--gold); }
.choice .letter {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.choice.correct { border-color: var(--ok); background: var(--ok-bg); }
.choice.wrong { border-color: var(--no); background: var(--no-bg); }
.choice:disabled { cursor: default; }

.feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}
.feedback.ok { background: var(--ok-bg); color: var(--ok); }
.feedback.no { background: var(--no-bg); color: var(--no); }
.feedback p { margin: 6px 0 0; color: var(--ink); font-weight: 600; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  appearance: none;
  border: 0;
  background: var(--gold);
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.secondary {
  background: var(--navy);
  color: var(--gold);
}

.btn.ghost {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}

.results {
  text-align: center;
  padding: 10px 0 6px;
}

.results .big-stars {
  font-size: 2.4rem;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  margin: 8px 0;
}

.badge-award {
  margin: 18px auto 8px;
  max-width: 22rem;
  background: var(--navy);
  color: #fff;
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 16px;
}

.badge-award strong { color: var(--gold); display: block; font-size: 1.2rem; }

/* Parents */
.gate, .prose {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  margin: 20px 0 36px;
}

.gate { text-align: center; max-width: 420px; margin-left: auto; margin-right: auto; }
.gate h1 { margin-top: 0; }
.gate input {
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  width: 100px;
  min-height: var(--tap);
  border: 3px solid var(--navy);
  border-radius: 12px;
  margin: 8px;
}

.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 1.6em; font-size: 1.15rem; }
.prose p, .prose li { color: var(--ink); }
.prose a { overflow-wrap: anywhere; }
.prose .muted { color: var(--muted); }
.video-list { padding-left: 1.15rem; }
.video-list li { margin: 0.35rem 0; }

.footer {
  background: var(--navy);
  color: #d7e0f2;
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px));
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer a { color: var(--gold); font-weight: 700; text-decoration: none; }
.footer p { margin: 0 0 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
