/* ==========================================================================
   Lancaster Publications — design tokens
   ========================================================================== */
:root {
  --navy: #051d40;
  --navy-rgb: 5, 29, 64;
  --royal: #145da0;
  --cream: #fbf3e7;
  --paper: #fffdf9;
  --tan: #d5bba6;
  --tan-dark: #c19b7b;
  --sky: #b1d4e1;
  --sky-rgb: 177, 212, 225;
  --sky-dark: #2f6b82;
  --sky-light: #eaf3f6;
  --sky-light-rgb: 234, 243, 246;
  --sky-light-dark: #d3e7ee;
  --red: #c1443b;
  --ink: #1b2430;
  --ink-soft: #4a5568;
  --white: #ffffff;

  --font-display: "Fredoka", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;

  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  /* Flat "pop" shadows — hard offset, no blur. Used sparingly, on things
     that should actually draw the eye (not as ambient depth everywhere). */
  --pop-navy-sm: 4px 4px 0 rgba(var(--navy-rgb), 0.9);
  --pop-navy: 6px 6px 0 rgba(var(--navy-rgb), 0.9);
  --pop-sky: 6px 6px 0 rgba(var(--sky-rgb), 0.95);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 32px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease,
    color 0.15s ease;
}

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

.btn-primary {
  background: var(--tan);
  color: var(--navy);
  box-shadow: var(--pop-navy-sm);
}

.btn-primary:hover {
  background: var(--tan-dark);
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--navy);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline.on-light {
  color: var(--navy);
}

.btn-outline.on-light:hover {
  background: var(--navy);
  color: var(--white);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(var(--sky-light-rgb), 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(var(--navy-rgb), 0.08);
}

.nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
}

.nav-brand img {
  height: 60px;
  width: auto;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle-label:hover {
  background: rgba(var(--navy-rgb), 0.08);
}

.nav-toggle:focus-visible ~ .nav-toggle-label {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.nav-links {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: 100%;
  left: 24px;
  right: 24px;
  background: var(--paper);
  border: 1px solid rgba(var(--navy-rgb), 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--pop-navy-sm);
  padding: 10px;
  margin-top: 10px;
}

.nav-toggle:checked ~ .nav-links {
  display: flex;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.nav-links a:hover {
  background: rgba(var(--navy-rgb), 0.06);
}

.nav-links-cta-mobile {
  margin-top: 6px;
}

.nav-links-cta-mobile .btn {
  width: 100%;
  justify-content: center;
}

.nav-cta {
  display: none;
}

@media (min-width: 900px) {
  .nav-toggle-label {
    display: none;
  }
  .nav-links {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
    gap: 28px;
  }
  .nav-links a {
    padding: 0;
    position: relative;
  }
  .nav-links a:hover {
    background: none;
  }
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--sky);
    transform: scaleX(0);
    transition: transform 0.2s ease;
  }
  .nav-links a:hover::after {
    transform: scaleX(1);
  }
  .nav-links-cta-mobile {
    display: none;
  }
  .nav-cta {
    display: inline-flex;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: radial-gradient(ellipse at top right, var(--royal), var(--navy) 55%);
  color: var(--white);
  overflow: hidden;
  padding-block: 64px 96px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 2px, transparent 2px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--sky-rgb), 0.16);
  color: var(--sky);
  border: 1px solid rgba(var(--sky-rgb), 0.4);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

.hero h1 span {
  color: var(--sky);
  display: block;
}

.hero-lede {
  margin-top: 22px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
}

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

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  justify-self: center;
  width: min(460px, 85vw);
}

.hero-stack {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.hero-stack-cover {
  height: auto;
  flex-shrink: 0;
  position: relative;
  border-radius: var(--radius-md);
  border: 5px solid var(--white);
  box-shadow: var(--pop-sky);
}

.hero-stack-cover:nth-child(1) {
  width: 34%;
  margin-right: -8%;
  transform: rotate(-10deg);
  z-index: 1;
}

.hero-stack-cover:nth-child(2) {
  width: 34%;
  margin-left: -8%;
  transform: rotate(9deg);
  z-index: 2;
}

.hero-stack-cover:nth-child(3) {
  width: 46%;
  border-width: 6px;
  transform: translateY(-6%) rotate(-2deg);
  z-index: 3;
}

.hero-art .badge {
  text-align: center;
  background: var(--sky);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--pop-navy-sm);
  transform: rotate(-1deg);
  font-size: 0.95rem;
  line-height: 1.3;
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */
.section {
  padding-block: 88px;
}

.section-cream {
  background: var(--sky-light);
}

.section-paper {
  background: var(--paper);
}

.section-navy {
  background: var(--navy);
  color: var(--white);
}

.section-sky {
  background: var(--sky);
  color: var(--navy);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-dark);
  margin-bottom: 14px;
}

.section-navy .eyebrow,
.section-sky .eyebrow {
  color: var(--navy);
  opacity: 0.75;
}

.section-header {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-header.center {
  margin-inline: auto;
  text-align: center;
}

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: var(--navy);
}

.section-navy .section-title,
.section-sky .section-title {
  color: inherit;
}

.section-sub {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.section-navy .section-sub {
  color: rgba(255, 255, 255, 0.78);
}

.section-sky .section-sub {
  color: rgba(var(--navy-rgb), 0.8);
}

/* ==========================================================================
   About the book
   ========================================================================== */
.book-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .book-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .book-grid.reverse {
    direction: rtl;
  }
  .book-grid.reverse > * {
    direction: ltr;
  }
}

.book-art {
  position: relative;
}

.book-art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--navy-rgb), 0.08);
}

.book-copy p + p {
  margin-top: 18px;
}

.book-copy p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.book-copy strong {
  color: var(--navy);
}

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

/* ==========================================================================
   Books (series grid)
   ========================================================================== */
.books-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid rgba(var(--navy-rgb), 0.18);
}

.book-card-cover {
  width: 100%;
  max-width: 220px;
  margin-bottom: 22px;
}

.book-card-cover img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--navy-rgb), 0.18);
}

.book-card-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-dark);
  margin-bottom: 6px;
}

.book-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.book-card-blurb {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.book-card-link {
  margin-top: auto;
}

.books-more {
  margin-top: 48px;
  text-align: center;
}

/* ==========================================================================
   Author
   ========================================================================== */
.author-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 800px) {
  .author-grid {
    grid-template-columns: 280px 1fr;
    gap: 56px;
  }
}

.author-photo {
  position: relative;
  justify-self: center;
}

.author-photo img {
  width: 100%;
  height: auto;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--sky-light-dark);
}

.author-photo .paw {
  position: absolute;
  bottom: -6px;
  right: 6px;
  background: var(--navy);
  color: var(--cream);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--pop-sky);
}

.author-copy p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.author-copy p + p {
  margin-top: 16px;
}

.author-copy p.author-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 8px;
}

.author-role {
  color: var(--sky-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: block;
}

/* ==========================================================================
   Scavenger hunt
   ========================================================================== */
.hunt-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hunt-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hunt-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--sky-rgb), 0.6);
}

.hunt-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hunt-card-body {
  padding: 18px 20px 22px;
}

.hunt-card-number {
  font-family: var(--font-display);
  color: var(--sky);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.hunt-card-body p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
}

/* ==========================================================================
   Instagram / reading challenge
   ========================================================================== */
.challenge-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .challenge-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.challenge-art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--navy-rgb), 0.15);
}

.instagram-handle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  background: rgba(var(--navy-rgb), 0.08);
  padding: 10px 20px;
  border-radius: 999px;
  margin-top: 18px;
  margin-bottom: 22px;
}

.challenge-copy p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(var(--navy-rgb), 0.8);
}

/* ==========================================================================
   Mailing list
   ========================================================================== */
.mailing-card {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--pop-navy);
  border: 1px solid rgba(var(--navy-rgb), 0.08);
  padding: 56px 40px;
}

.mailing-card .eyebrow {
  display: block;
}

.mailing-card .section-title {
  margin-top: 4px;
}

.mailing-card .section-sub {
  margin-inline: auto;
  max-width: 40ch;
}

.mailing-card .btn {
  margin-top: 30px;
}

.paw-badge {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--pop-sky);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--royal);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 56px 32px;
}

.footer-top {
  display: grid;
  gap: 36px;
}

@media (min-width: 800px) {
  .footer-top {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand img {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  max-width: 32ch;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--sky);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links li + li {
  margin-top: 10px;
}

.footer-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
}

.footer-links a:hover {
  color: var(--sky);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: background 0.15s ease;
}

.footer-social a:hover {
  background: var(--sky);
  color: var(--navy);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
