@font-face {
  font-family: "Dotty Serif";
  src: url("assets/dotty-serif-bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Dotty Serif";
  src: url("assets/dotty-serif-bold-italic.woff") format("woff");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Rubik;
  src: url("assets/rubik-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Rubik;
  src: url("assets/rubik-bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #faf6eb;
  --ink: #16344a;
  --gold: #e5b748;
  --sea-paper: #e4f1f5;
  --line: #b8c5c6;
  --serif: "Dotty Serif", Georgia, serif;
  --sans: Rubik, system-ui, sans-serif;
}

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

html {
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
}

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

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid #216b8d;
  outline-offset: 5px;
  border-radius: 3px;
}

p {
  margin: 0 0 1em;
}

h1, h2, figcaption, .wordmark, .signature {
  font-family: var(--serif);
  font-weight: 700;
}

h1, h2 {
  margin: 0;
  line-height: .96;
  letter-spacing: -.035em;
}

h2 {
  font-size: clamp(2.65rem, 5.5vw, 4.5rem);
  margin-bottom: .35em;
}

.frame {
  width: min(100% - clamp(2.25rem, 8vw, 8rem), 85rem);
  margin-inline: auto;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .55rem .85rem;
  background: var(--paper);
}

.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 2rem;
}

.site-header {
  min-height: 5.3rem;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  display: inline-block;
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  font-style: italic;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -.055em;
  padding: .12em .12em .18em 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .05rem clamp(1rem, 3.6vw, 3rem);
}

.site-nav a {
  display: block;
  padding-block: .6rem;
  font-size: clamp(.9rem, 1.5vw, 1.12rem);
  text-decoration: none;
  text-underline-offset: .3em;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: #8b651a;
}

.hero {
  display: grid;
  grid-template-columns: 41% minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  padding-block: clamp(1.5rem, 4vw, 3.65rem) clamp(3.75rem, 5vw, 4.75rem);
}

.hero h1 {
  font-size: clamp(4.2rem, 8.15vw, 8.15rem);
}

.hero h1 span {
  display: block;
}

.hero-copy p {
  max-width: 28rem;
  font-size: clamp(1.06rem, 1.58vw, 1.38rem);
  line-height: 1.55;
  margin-bottom: 1.25em;
}

.title-line {
  width: min(15rem, 64%);
  height: .72rem;
  margin: .7rem 0 1.2rem;
  border-top: .27rem solid var(--gold);
  border-radius: 48% 44% 32% 25%;
  transform: rotate(-3deg);
}

.illustration {
  mix-blend-mode: multiply;
}

.hero-art {
  width: 100%;
}

.book-button {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 3.25rem;
  max-width: 100%;
  padding: .8rem clamp(.85rem, 2.1vw, 1.4rem);
  background: var(--ink);
  color: #fffaf0;
  border-radius: .65rem;
  font-size: clamp(.88rem, 1.5vw, 1.14rem);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.book-button:hover {
  background: #225471;
}

.new-tab-arrow {
  position: relative;
  flex: 0 0 .8em;
  height: .8em;
  background: linear-gradient(135deg, transparent 46%, currentColor 46% 55%, transparent 55%);
}

.new-tab-arrow::after {
  position: absolute;
  top: 0;
  right: 0;
  width: .57em;
  height: .57em;
  border-top: .105em solid;
  border-right: .105em solid;
  content: "";
}

.adventures {
  position: relative;
  background: var(--sea-paper);
  padding: clamp(2.75rem, 5vw, 4.5rem) 0 clamp(3rem, 6.5vw, 6rem);
}

.adventures::before {
  position: absolute;
  inset: -1.55rem 0 auto;
  height: 2.35rem;
  border-radius: 56% 44% 0 0 / 75% 80% 0 0;
  background: var(--sea-paper);
  content: "";
}

.section-intro {
  text-align: center;
  max-width: 43rem;
  margin: 0 auto 2rem;
}

.section-intro p, .section-copy p {
  font-size: clamp(1rem, 1.55vw, 1.18rem);
}

.story-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.8rem);
  max-width: 72rem;
  margin-inline: auto;
}

.story-gallery figure {
  margin: 0;
  min-width: 0;
  text-align: center;
}

.story-gallery img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: contain;
}

.story-gallery figcaption {
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  line-height: 1.15;
  margin-top: .6rem;
}

.real-dotty, .books-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.4rem, 6vw, 6rem);
  padding-block: clamp(3rem, 7.25vw, 7rem);
}

.archive-photo {
  padding: clamp(.45rem, 1.1vw, .85rem);
  background: #fff;
  border-radius: .25rem;
  box-shadow: 0 .4rem 1.5rem #39424919;
  transform: rotate(-1.25deg);
}

.section-copy {
  max-width: 34rem;
}

.section-copy .signature {
  margin: 1.1em 0 0;
  font-size: 1.45rem;
  font-style: italic;
}

.books {
  background: #f1eddb;
  border-block: 1px solid #e2dcc6;
}

.books-layout {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.books-layout .section-copy {
  padding-inline-start: clamp(0rem, 2vw, 2rem);
}

.books-art {
  width: 100%;
}

.site-footer {
  padding-block: 1.4rem;
}

.site-footer .wordmark {
  font-size: 2.4rem;
}

.site-footer small {
  font-size: .88rem;
}

.not-found {
  min-height: 70vh;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 1.1rem;
  padding-block: 2rem;
}

.not-found h1 {
  font-size: clamp(2.7rem, 7vw, 5.4rem);
}

@media (max-width: 800px) {
  .hero, .real-dotty, .books-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: .8rem;
    padding-top: 2.2rem;
  }

  .hero-copy {
    padding-inline: .3rem;
  }

  .hero h1 {
    max-width: 37rem;
    font-size: clamp(3.7rem, 11vw, 6.3rem);
  }

  .hero h1 span:nth-child(n + 2) {
    display: inline;
  }

  .hero-art, .books-art {
    max-width: 35rem;
    margin-inline: auto;
  }

  .archive-photo {
    grid-row: 2;
  }

  .section-copy {
    max-width: 38rem;
  }

  .books-layout .section-copy {
    padding-inline-start: 0;
  }
}

@media (max-width: 540px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: .65rem;
  }

  .site-nav {
    justify-content: space-between;
    width: 100%;
    gap: .05rem .35rem;
  }

  .site-nav a {
    min-height: 2.75rem;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 12vw, 4.1rem);
  }

  .hero-art {
    width: min(100% + 1rem, 36rem);
    max-width: none;
    margin-inline: -.5rem;
  }

  .story-gallery {
    grid-template-columns: minmax(0, 1fr);
    max-width: 21rem;
    gap: 1.8rem;
  }

  .story-gallery img {
    aspect-ratio: 1.45;
  }

  .story-gallery figcaption {
    font-size: 1.55rem;
  }
}
