/* The Muddy Boots Crew — series homepage mockup
   Palette from the Book 1 cover: barn red, warm earth, cream, sky. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/Literata-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/Literata-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/Literata-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --barn: #b33a1c;
  --barn-dark: #8c2c14;
  --barn-deep: #5c2410;
  --ink: #2c2118;
  --ink-soft: #5c4a3a;
  --cream: #f6f0e4;
  --cream-dark: #ebe3d2;
  --paper: #fffbf5;
  --sky: #d7eef8;
  --sky-deep: #b7dff3;
  --earth: #8b5e3c;
  --olive: #8a8348;
  --line: #e0d6c4;
  --max: 1080px;
  --shadow: 0 18px 40px rgba(44, 33, 24, 0.22);
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Literata, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--barn-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--barn);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--paper);
  padding: 0.5rem 0.8rem;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 240, 228, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.4rem 0;
}

.logo {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--barn-dark);
  text-decoration: none;
  line-height: 1.2;
}

.logo:hover {
  color: var(--barn);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 1.15rem;
}

.nav a {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.nav a:hover {
  color: var(--barn-dark);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #cfeaf8 0%, #e4f3fa 45%, var(--cream) 100%);
}

.hero-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px);
  gap: 3rem;
  align-items: center;
  padding: 3.2rem 0 3.6rem;
}

.eyebrow {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--barn);
  margin: 0 0 0.7rem;
}

.hero h1 {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 700;
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--barn-dark);
  margin: 0 0 0.85rem;
}

.hook {
  font-family: Literata, Georgia, serif;
  font-style: italic;
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 1.1rem;
  max-width: 36ch;
}

.book-title {
  margin: 0 0 0.15rem;
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}

.byline {
  margin: 0 0 1.5rem;
  font-family: Nunito, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
}

.btn {
  display: inline-block;
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: var(--barn);
  color: #fffaf4;
  padding: 0.85rem 1.35rem;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(140, 44, 20, 0.28);
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background: var(--barn-dark);
  color: #fffaf4;
}

.btn:focus-visible,
.link-plain:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--barn);
  outline-offset: 3px;
}

.link-plain {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--barn-dark);
}

.cover-frame {
  justify-self: center;
  width: 100%;
  max-width: 340px;
}

.cover-frame img {
  width: 100%;
  border-radius: 2px 5px 5px 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    4px 0 0 var(--barn-deep),
    0 22px 44px rgba(44, 33, 24, 0.32);
}

/* ----- Sections ----- */
section {
  padding: 4.2rem 0;
}

.section-kicker {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--barn);
  margin: 0 0 0.45rem;
}

h2 {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--barn-dark);
  margin: 0 0 1.1rem;
}

/* ----- About ----- */
.about {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.blurb p {
  margin: 0 0 1rem;
}

.blurb p:last-of-type {
  margin-bottom: 0;
}

.blurb .lede {
  font-weight: 700;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--barn-deep);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
}

.sketch-frame {
  margin: 0;
}

.sketch-frame img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #f3efe8;
}

.sketch-frame figcaption {
  font-family: Nunito, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  text-align: center;
}

/* ----- Crew ----- */
.crew {
  background: var(--cream);
}

.crew-intro {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.crew-intro h2,
.crew-intro .section-kicker {
  text-align: center;
}

.scene-plate {
  margin: 0 auto 2.4rem;
  max-width: var(--max);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
  background: #c9b48a;
}

.scene-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cards .card:nth-child(4),
.cards .card:nth-child(5) {
  /* animals sit on a centered second row */
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-art {
  aspect-ratio: 3 / 4;
  height: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0 0 0.9rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.card h3 {
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.15rem;
  color: var(--barn-dark);
}

.role {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--earth);
  margin: 0 0 0.55rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

/* Second row of animals: center two cards under the three */
.cards-animals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  width: min(100%, 720px);
  margin: 1.25rem auto 0;
}

/* ----- Book 2 ----- */
.book2 {
  background:
    linear-gradient(180deg, #eef3f6 0%, #e4ebf0 100%);
  border-top: 1px solid #d3dde4;
  border-bottom: 1px solid #d3dde4;
  text-align: center;
}

.book2 .wrap {
  max-width: 38rem;
}

.book2 h2 {
  color: #3d4a55;
}

.book2 .section-kicker {
  color: #5b6d7a;
}

.book2 p {
  margin: 0 0 1rem;
  color: #2f3b44;
}

.book2 p:last-child {
  margin-bottom: 0;
}

.closing {
  font-style: italic;
  font-size: 1.12rem;
}

/* ----- Author ----- */
.author {
  background: var(--paper);
}

.author-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.4rem;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}

.author-portrait {
  margin: 0;
}

.author-portrait .frame {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid var(--cream);
  box-shadow: 0 10px 24px rgba(44, 33, 24, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}

.author-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.author-portrait figcaption {
  font-family: Nunito, sans-serif;
  font-size: 0.75rem;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

/* ----- Newsletter ----- */
.newsletter {
  background: var(--cream);
}

.news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2.4rem 2rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 10px 28px rgba(44, 33, 24, 0.08);
}

.news-card h2 {
  margin-bottom: 0.5rem;
}

.news-card > p {
  margin: 0 auto 1.4rem;
  max-width: 36rem;
  color: var(--ink-soft);
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.7rem;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field label {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input {
  font-family: Nunito, sans-serif;
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.field input:focus {
  outline: 2px solid var(--barn);
  outline-offset: 1px;
  border-color: var(--barn);
}

form .btn {
  align-self: end;
  padding: 0.8rem 1.25rem;
  white-space: nowrap;
  min-width: 8.5rem;
}

.form-note {
  font-family: Nunito, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--barn-deep);
  color: #f3e6d6;
  padding: 2.2rem 0 2rem;
}

.footer-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  align-items: flex-start;
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.ai-note {
  max-width: 34rem;
  color: #ecd9c6;
}

.copyright {
  font-family: Nunito, sans-serif;
  font-size: 0.82rem;
  color: #d9c3ae;
}

.social {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #f3e6d6;
  text-decoration: none;
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
}

.social a:hover {
  color: #fff;
}

.social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .hero-inner,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-inner {
    padding: 2.2rem 0 2.6rem;
  }

  .cover-frame {
    order: -1;
    max-width: 260px;
  }

  .hook {
    max-width: none;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .cards-animals {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .author-grid {
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
  }

  .author-portrait .frame {
    width: 140px;
    height: 140px;
  }

  form {
    grid-template-columns: 1fr;
  }

  form .btn {
    width: 100%;
    justify-self: stretch;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .wrap,
  .hero-inner,
  .footer-inner {
    width: min(var(--max), calc(100% - 1.6rem));
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.7rem 0 0.65rem;
    min-height: 0;
  }

  .nav {
    justify-content: flex-start;
    gap: 0.15rem 0.7rem;
  }

  .nav a {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cover-frame {
    max-width: 220px;
  }

  .cards,
  .cards-animals {
    grid-template-columns: 1fr;
  }

  .scene-plate img {
    object-position: center 32%;
  }

  .author-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .author-portrait .frame {
    width: 160px;
    height: 160px;
  }

  section {
    padding: 3rem 0;
  }

  .news-card {
    padding: 1.6rem 1.15rem;
  }
}
