:root {
  --ink: #1c2740;
  --ink-soft: #3d4a66;
  --paper: #fff8ef;
  --paper-deep: #f3e6d4;
  --panel: #fffdf9;
  --coral: #ff6b6b;
  --coral-deep: #e85a5a;
  --sun: #ffd166;
  --sky: #7ec8e3;
  --mint: #7bd389;
  --lavender: #c4b5fd;
  --line: #1c2740;
  --shadow: 6px 6px 0 var(--ink);
  --radius: 22px;
  --font-display: "Fredoka", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-paper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 209, 102, 0.35), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(126, 200, 227, 0.28), transparent 26%),
    radial-gradient(circle at 80% 88%, rgba(196, 181, 253, 0.22), transparent 30%),
    radial-gradient(circle at 12% 84%, rgba(123, 211, 137, 0.18), transparent 24%);
}

.shell {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 1.1rem 0 0.4rem;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand__mark {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}

.brand__burst {
  position: absolute;
  inset: 0;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 40% 60% 45% 55%;
  transform: rotate(-8deg);
}

.brand__face {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.brand__tag {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.custom-logo-link img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 3px solid var(--ink);
  background: var(--sun);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.9rem;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
}

.menu a:hover,
.menu .current-menu-item > a {
  background: var(--sun);
}

.hero {
  padding: 2.5rem 0 1rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.25rem 0.75rem;
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
}

.hero__title,
.section-title,
.page-head h1,
.empty-panel h1,
.about-teaser h2 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.hero__lead,
.page-head__lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.hero__actions,
.empty-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.55rem 1.2rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
  font-weight: 800;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn--sun {
  background: var(--sun);
}

.btn--coral {
  background: var(--coral);
  color: #fff;
}

.btn--ink {
  background: var(--ink);
  color: #fff;
}

.btn--ghost {
  background: #fff;
}

.hero__art {
  position: relative;
}

.speech {
  margin: 0 0 1rem auto;
  width: min(100%, 280px);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 24px 24px 24px 6px;
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
}

.speech blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.comic-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.comic-panel {
  min-height: 130px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.comic-panel--sky {
  background: var(--sky);
}

.comic-panel--mint {
  background: var(--mint);
}

.comic-panel--coral {
  background: var(--coral);
  color: #fff;
  grid-column: 1 / -1;
}

.comic-panel p {
  margin: 0;
}

.doodle {
  width: 28px;
  height: 28px;
  margin-bottom: auto;
  border: 3px solid var(--ink);
}

.doodle--star {
  background: var(--sun);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  border: 0;
  background:
    radial-gradient(circle at 50% 50%, var(--sun) 40%, transparent 41%),
    var(--sun);
}

.doodle--heart {
  background: #fff;
  border-radius: 50% 50% 50% 50%;
}

.doodle--book {
  background: #fff;
  border-radius: 4px;
}

.welcome-strip {
  margin: 1.5rem 0 0.5rem;
}

.welcome-strip__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.95rem 1.2rem;
  background: var(--lavender);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.welcome-strip a {
  font-weight: 800;
}

.features,
.latest,
.about-teaser,
.page-wrap {
  padding: 2.4rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.text-link {
  font-weight: 800;
}

.feature-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card,
.story-card,
.empty-panel,
.prose-page,
.about-teaser__panel {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 1.3rem;
}

.feature-card__badge {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 0.7rem;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
}

.feature-card h3,
.story-card h2,
.story-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
}

.story-card__link {
  display: block;
  text-decoration: none;
  padding: 0.8rem;
}

.story-card__image,
.story-card__placeholder,
.story-hero img {
  width: 100%;
  border-radius: 16px;
  border: 3px solid var(--ink);
}

.story-card__placeholder {
  min-height: 160px;
  background:
    linear-gradient(135deg, var(--sky), var(--sun) 55%, var(--coral));
}

.story-card p {
  margin: 0;
  color: var(--ink-soft);
}

.empty-panel {
  padding: 2rem;
  text-align: center;
  justify-content: center;
  flex-direction: column;
}

.about-teaser__panel {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 1.5rem;
  padding: 1.8rem;
  align-items: center;
  background: #fff7d6;
}

.about-teaser__blob {
  min-height: 180px;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 42% 58% 50% 50%;
  box-shadow: var(--shadow);
}

.big-initials {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
}

.page-head {
  margin-bottom: 1.4rem;
}

.page-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.prose-page {
  padding: 1.6rem;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
  font-family: var(--font-display);
}

.story-hero {
  margin: 0 0 1.2rem;
}

.site-footer {
  padding: 0 0 2rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem 1.2rem;
  background: var(--ink);
  color: #fff8ef;
  border-radius: 24px;
}

.site-footer a {
  color: var(--sun);
  font-weight: 800;
}

.menu--footer {
  gap: 0.8rem;
}

.menu--footer a {
  min-height: auto;
  padding: 0;
}

.site-footer__note {
  margin: 0;
}

@media (max-width: 860px) {
  .hero__grid,
  .feature-grid,
  .card-grid,
  .about-teaser__panel {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 1rem;
    left: 1rem;
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 0.6rem;
  }

  .site-header {
    position: relative;
  }

  .site-nav.is-open {
    display: block;
  }

  .menu {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
