:root {
  --paper: #f7f0df;
  --paper-deep: #eadcc3;
  --ink: #2f3029;
  --forest: #53614a;
  --rust: #a2472f;
  --gold: #d6a34d;
  --blue: #405b78;
  --line: rgba(67, 59, 48, 0.22);
  --shadow: 0 28px 70px rgba(57, 45, 30, 0.2);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(214, 163, 77, 0.13), transparent 25rem),
    linear-gradient(180deg, #fbf6ea 0%, var(--paper) 62%, #efe3ce 100%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

a { color: inherit; }

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

.brand {
  width: 500px;
  max-width: 58vw;
  display: grid;
  grid-template-columns: 225px 1fr;
  align-items: center;
  gap: 1.6rem;
  color: var(--forest);
  text-decoration: none;
}
.brand img { display: block; width: 225px; height: 154px; object-fit: contain; }
.brand-tagline {
  position: relative;
  padding: 1rem 0;
  font-size: 1.04rem;
  font-style: italic;
  line-height: 1.45;
}
.brand-tagline span { display: block; }
.brand-tagline::before,
.brand-tagline::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(214, 163, 77, 0));
}
.brand-tagline::before { top: 0; }
.brand-tagline::after { bottom: 0; }

nav { display: flex; gap: 2rem; font-family: Arial, Helvetica, sans-serif; }
nav a { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--rust); }

main { overflow: hidden; }

.hero {
  width: min(1180px, calc(100% - 3rem));
  min-height: 720px;
  margin: 0 auto;
  padding: 5rem 0 6.5rem;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--rust);
  font: 800 0.78rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; color: #30372d; font-weight: 500; line-height: 1.06; letter-spacing: -0.035em; }
h1 { max-width: 720px; font-size: clamp(3.2rem, 6vw, 5.85rem); }
h1 em { color: var(--rust); font-weight: 500; }
h2 { font-size: clamp(2.45rem, 4.8vw, 4.5rem); }

.hero-lede { max-width: 620px; margin: 2rem 0; font-size: 1.22rem; line-height: 1.7; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.45rem;
  border-radius: 3px;
  font: 800 0.94rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.025em;
  text-decoration: none;
}
.button.primary { color: #fffaf0; background: var(--rust); box-shadow: 0 9px 24px rgba(162, 71, 47, 0.24); }
.button.primary:hover, .button.primary:focus-visible { background: #853723; transform: translateY(-2px); }
.text-link { color: var(--blue); font: 700 0.94rem/1.4 Arial, Helvetica, sans-serif; text-underline-offset: 0.35rem; }
.credit { margin-top: 1.7rem; color: #6d665b; font-size: 0.94rem; font-style: italic; }

.book-stage { position: relative; min-height: 590px; display: grid; place-items: center; }
.book-stage::before {
  content: "";
  position: absolute;
  width: 93%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d4c693;
  opacity: 0.46;
}
.book-cover {
  position: relative;
  z-index: 2;
  width: min(390px, 78%);
  max-height: 610px;
  object-fit: contain;
  transform: rotate(1.7deg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(83, 65, 41, 0.22);
}
.book-note {
  position: absolute;
  z-index: 3;
  right: -1.5rem;
  bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: #fffaf0;
  color: var(--forest);
  box-shadow: 0 12px 32px rgba(48, 43, 34, 0.14);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.4;
  transform: rotate(-3deg);
}
.sketch-line { position: absolute; z-index: 1; border: 2px solid var(--rust); border-radius: 50%; opacity: 0.34; }
.line-one { width: 98%; height: 70%; transform: rotate(-8deg); }
.line-two { width: 76%; height: 96%; border-color: var(--blue); transform: rotate(12deg); }

.origin {
  position: relative;
  min-height: 760px;
  padding: 7rem max(1.5rem, calc((100vw - 1120px) / 2));
  display: grid;
  place-items: center;
  background-image:
    linear-gradient(rgba(250, 244, 229, 0.12), rgba(250, 244, 229, 0.12)),
    url("farmyard-backdrop.png");
  background-size: cover;
  background-position: center;
  color: var(--ink);
}
.origin-panel {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  padding: clamp(2rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
  background: rgba(255, 250, 238, 0.9);
  border: 1px solid rgba(111, 91, 63, 0.24);
  box-shadow: 0 26px 70px rgba(70, 56, 37, 0.2);
  backdrop-filter: blur(2px);
}
.origin-panel::before {
  content: "";
  position: absolute;
  inset: 11px;
  pointer-events: none;
  border: 1px solid rgba(162, 71, 47, 0.22);
}
.origin h2 { color: #30372d; max-width: 580px; font-size: clamp(2.4rem, 4vw, 3.8rem); }
.origin .eyebrow { color: var(--rust); }
.origin-copy { max-width: 620px; font-size: 1.1rem; }
.origin-copy p:first-child { margin-top: 0; }

.author {
  width: min(1080px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 8rem 0;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(3rem, 9vw, 8rem);
  align-items: center;
}
.portrait-wrap { position: relative; aspect-ratio: 1; }
.portrait-wrap img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); }
.portrait-ring { position: absolute; inset: -1.1rem 0.8rem 0.8rem -1.1rem; border: 3px solid var(--gold); border-radius: 50%; transform: rotate(-4deg); }
.author-copy > p:not(.eyebrow) { max-width: 650px; margin: 1.6rem 0; font-size: 1.14rem; }
blockquote { margin: 2rem 0 0; padding-left: 1.5rem; border-left: 3px solid var(--gold); color: var(--forest); font-size: 1.22rem; font-style: italic; }

.next-chapter {
  padding: 6.5rem max(1.5rem, calc((100vw - 1080px) / 2));
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
  background: #d9caa2;
}
.next-chapter h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.next-chapter .next-copy > p:last-child { margin: 1.2rem 0 0; max-width: 650px; font-size: 1.1rem; }
.next-chapter img {
  display: block;
  width: 100%;
  border: 1px solid rgba(71, 61, 46, 0.24);
  box-shadow: var(--shadow);
  transform: rotate(0.7deg);
}

footer { padding: 4rem 1.5rem; text-align: center; background: #32382f; color: #f6eddd; }
footer img { width: 170px; height: 100px; object-fit: contain; filter: brightness(1.24); }
footer p { margin: 0.5rem auto; }
.copyright { color: rgba(246,237,221,0.67); font: 0.78rem/1.5 Arial, Helvetica, sans-serif; }

@media (max-width: 820px) {
  .site-header { min-height: 172px; justify-content: center; }
  .brand { width: min(500px, 100%); max-width: none; grid-template-columns: 190px 1fr; gap: 1rem; }
  .brand img { width: 190px; height: 145px; }
  .brand-tagline { font-size: 0.96rem; }
  nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 3.5rem 0 5rem; }
  .hero-copy { text-align: center; }
  .hero-lede { margin-inline: auto; }
  .actions { justify-content: center; }
  .book-stage { min-height: 500px; }
  .book-note { right: 0; }
  .origin-panel, .author, .next-chapter { grid-template-columns: 1fr; }
  .origin { padding-block: 5.5rem; }
  .author { padding-block: 6rem; }
  .next-chapter { padding-block: 5.5rem; }
  .portrait-wrap { width: min(420px, 86vw); margin: 0 auto; }
}

@media (max-width: 520px) {
  .site-header, .hero, .author { width: min(100% - 2rem, 1180px); }
  .site-header { min-height: 210px; }
  .brand { grid-template-columns: 1fr; gap: 0; justify-items: center; text-align: center; }
  .brand img { width: 190px; height: 132px; }
  .brand-tagline { width: min(310px, 100%); padding: 0.7rem 0; }
  .brand-tagline span { display: inline; }
  h1 { font-size: clamp(2.75rem, 13vw, 4rem); }
  .hero-lede, .author-copy > p:not(.eyebrow) { font-size: 1.05rem; }
  .book-stage { min-height: 450px; }
  .book-cover { width: 82%; }
  .book-note { bottom: 0; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
