/* Willy and Twigg starter stylesheet */

:root {
  --paper: #f6f0df;
  --paper-deep: #eadfbe;
  --ink: #27231e;
  --blue: #243f68;
  --gold: #b3913f;
  --wood: #5a3d2b;
  --line: rgba(39, 35, 30, 0.18);
  --shadow: 0 16px 40px rgba(39, 35, 30, 0.12);
  --content: 72rem;
  --reading: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

a {
  color: var(--blue);
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 0.12em;
}

.site-header {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  text-decoration: none;
}

nav a[aria-current="page"] {
  border-bottom: 2px solid var(--gold);
}

main {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
}

.hero {
  min-height: 70vh;
  padding: 4rem 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

h1,
h2,
h3 {
  color: var(--blue);
  line-height: 1.15;
}

h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(3rem, 8vw, 6.5rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.eyebrow {
  color: var(--wood);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tagline,
.standfirst {
  max-width: 42rem;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
}

.status,
.small-note {
  color: rgba(39, 35, 30, 0.75);
}

.button-row {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-row.centre {
  justify-content: center;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--blue);
  border-radius: 0.35rem;
  background: var(--blue);
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.button-secondary {
  background: transparent;
  color: var(--blue);
}

.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.placeholder {
  min-height: 18rem;
  border: 2px dashed rgba(90, 61, 43, 0.35);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  padding: 2rem;
  color: rgba(90, 61, 43, 0.7);
  text-align: center;
}

.hero-art {
  min-height: 32rem;
}

.section,
.card,
.callout,
.audio-card,
.letter {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.section {
  margin: 2rem 0;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.card-grid {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  padding: 1.5rem;
}

.earl-panel {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) 1.3fr;
  align-items: center;
  gap: 2rem;
}

.earl-image {
  min-height: 20rem;
}

.purchase-panel {
  text-align: center;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--content));
  margin: 4rem auto 0;
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.reading-page,
.narrow-page,
.welcome-page {
  width: min(calc(100% - 2rem), var(--reading));
  padding: 4rem 0;
}

.chapter {
  font-size: 1.12rem;
}

.chapter p {
  margin: 0 0 1rem;
  text-indent: 0;
}

.callout,
.audio-card,
.letter {
  margin: 2rem 0;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.audio-card audio {
  width: 100%;
  margin-top: 1.25rem;
}

.audio-art {
  min-height: 16rem;
}

.welcome-page {
  text-align: center;
}

.earl-portrait {
  width: min(100%, 24rem);
  min-height: 28rem;
  margin: 0 auto 2rem;
}

.letter {
  text-align: left;
}

code {
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  background: var(--paper-deep);
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .earl-panel,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .hero-art {
    min-height: 22rem;
  }

  .site-footer {
    flex-direction: column;
  }
}
.earl-photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.earl-panel {
  align-items: start;
}

.chapter-illustration {
  margin: 2rem auto;
  max-width: 44rem;
}

.chapter-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.chapter-lesson {
  margin: 2rem 0 1.25rem;
  padding: 1.5rem 1.75rem;
  border-left: 0.35rem solid var(--gold);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
  font-size: 1.2rem;
  font-style: italic;
}

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

.lesson-ending {
  text-align: right;
  font-style: italic;
  color: var(--wood);
}

.reading-page .chapter-heading h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
}

.chapter-number {
  margin-bottom: 0;
  color: var(--wood);
  font-size: 1rem;
}

.chapter-subtitle {
  margin-bottom: 2rem;
  color: var(--wood);
  font-size: 1.15rem;
  font-style: italic;
}
.audio-art-image {
  width: 100%;
  max-width: 44rem;
  height: auto;
  display: block;
  margin: 0 auto 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.earl-portrait-image {
  width: 100%;
  max-width: 34rem;
  height: auto;
  display: block;
  margin: 0 auto 2rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}
.hero-image {
  width: 100%;
  max-width: 42rem;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.purchase-panel .button-row {
  justify-content: center;
}

