/* Beasty Boy Books — cream, soft navy, sky blue, soft red */

:root {
  --cream: #faf6f0;
  --cream-deep: #f3ebe0;
  --warm-white: #fffdf9;
  --navy: #1e3a5f;
  --navy-soft: #2a4a73;
  --sky: #7eb8da;
  --sky-soft: #c5e4f5;
  --sky-deep: #4a9bc7;
  --soft-red: #d9786e;
  --soft-red-deep: #c45f55;
  --ink: #243044;
  --muted: #5a6578;
  --border: #e6ddd0;
  --shadow: 0 8px 28px rgba(30, 58, 95, 0.08);
  --shadow-sm: 0 2px 12px rgba(30, 58, 95, 0.06);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --font-display: "Nunito", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --max: 68rem;
  --header-h: 4rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1rem; }

a {
  color: var(--navy-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--sky-deep); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--warm-white);
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: 50%;
  background: var(--cream-deep);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--warm-white);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem 1.25rem;
  display: none;
}

.site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--navy);
  border-radius: 0.5rem;
}

.site-nav a:hover {
  background: var(--sky-soft);
  color: var(--navy);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 0.15rem;
  }

  .site-nav a {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--navy);
  color: var(--warm-white);
}

.btn-primary:hover {
  background: var(--navy-soft);
  color: var(--warm-white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--sky);
}

.btn-secondary:hover {
  background: var(--sky-soft);
  color: var(--navy);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
}

/* Eyebrows & sections */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin: 0 0 0.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.section-intro {
  color: var(--muted);
  margin: 0;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(126, 184, 218, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 80%, rgba(217, 120, 110, 0.1), transparent 50%),
    var(--cream);
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-copy .tagline {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--navy-soft);
  margin-bottom: 0.75rem;
}

.hero-lede {
  color: var(--muted);
  max-width: 34rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-art {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-art img {
  width: 100%;
  border-radius: calc(var(--radius-lg) - 0.35rem);
  object-fit: contain;
  background: var(--cream);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

/* Pack */
.pack {
  background: var(--warm-white);
  border-block: 1px solid var(--border);
}

.character-grid {
  display: grid;
  gap: 1.5rem;
}

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

.character-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.character-art {
  background: var(--cream-deep);
  padding: 1.25rem 1.25rem 0;
  display: flex;
  justify-content: center;
}

.character-art img {
  width: min(100%, 280px);
  object-fit: contain;
}

.character-body {
  padding: 1.25rem 1.5rem 1.75rem;
}

.character-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sky-deep);
  margin: 0 0 0.65rem;
}

.character-card--maya .character-role {
  color: var(--soft-red);
}

.character-body p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* Books */
.book-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .book-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.book-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.book-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.book-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-deep);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover--placeholder img {
  filter: saturate(0.9);
}

.book-body {
  padding: 1.1rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-series {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.book-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.book-body p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.book-card--live {
  border-color: color-mix(in srgb, var(--sky) 50%, var(--border));
}

.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.book-cover .badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.badge-live {
  background: var(--navy);
  color: var(--warm-white);
}

.badge-soon {
  background: var(--cream);
  color: var(--navy-soft);
  border: 1px solid var(--border);
}

/* Color While You Learn */
.color-learn {
  background:
    linear-gradient(180deg, var(--sky-soft) 0%, var(--cream) 55%);
}

.color-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.color-art {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.color-art img {
  width: 100%;
  border-radius: calc(var(--radius-lg) - 0.35rem);
  object-fit: cover;
}

.feature-list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-weight: 500;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--soft-red);
}

.coming-note {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

@media (min-width: 800px) {
  .color-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* Adventures */
.adventures {
  background: var(--warm-white);
  border-block: 1px solid var(--border);
}

.episode-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .episode-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.episode-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.episode-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--soft-red);
  margin-bottom: 0.5rem;
}

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

.episode-card .badge {
  margin-top: 0.25rem;
}

.adventures-art {
  margin: 0;
  text-align: center;
}

.adventures-art img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.adventures-art figcaption {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Mission */
.mission {
  background:
    radial-gradient(ellipse 70% 80% at 100% 50%, rgba(126, 184, 218, 0.2), transparent 55%),
    var(--cream);
}

.mission-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.mission-copy p {
  color: var(--muted);
}

.mission-copy p:last-of-type {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
}

.mission-panel {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mission-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 280px;
}

@media (min-width: 800px) {
  .mission-inner {
    grid-template-columns: 1.2fr 0.9fr;
    padding: 2rem;
    gap: 2.5rem;
  }

  .mission-panel img {
    max-height: none;
    min-height: 260px;
  }
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 253, 249, 0.85);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-mark {
  width: 3.5rem;
  height: auto;
  border-radius: 0.5rem;
  background: var(--cream);
  padding: 0.2rem;
}

.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--warm-white);
  font-size: 1.1rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.5rem;
}

.footer-meta a {
  color: var(--sky-soft);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--warm-white);
  text-decoration: underline;
}

.footer-meta .sep {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover,
  .book-card:hover { transform: none; }
  .nav-toggle-bar { transition: none; }
}
