:root {
  color-scheme: dark;
  --ink: #fff8ec;
  --muted: #e6dac3;
  --line: rgba(255, 248, 236, 0.22);
  --panel: rgba(25, 31, 23, 0.78);
  --panel-strong: rgba(25, 31, 23, 0.94);
  --accent: #ffd36f;
  --accent-dark: #3b5b41;
  --leaf: #8fc58a;
  --berry: #d87064;
  --content-width: 1680px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(20, 25, 18, 0.96), rgba(20, 25, 18, 0.64), rgba(20, 25, 18, 0.92)),
    url("assets/emma-hero.jpg") center 22% / cover fixed,
    #151b13;
  font-size: 18px;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 18%, rgba(20, 25, 18, 0.93) 86%);
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 5;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #151b13;
  border-radius: 0.35rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  position: relative;
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

nav a {
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  border-radius: 0.35rem;
  font-weight: 750;
  text-decoration: none;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.10);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(280px, 0.84fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: calc(100svh - 90px);
  padding: clamp(2rem, 7vw, 5.5rem) 0;
}

.hero-copy {
  max-width: 980px;
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.62);
}

.eyebrow,
.section-label {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 8vw, 7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
}

.subtitle {
  margin: 0.75rem 0 0;
  color: var(--leaf);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 850;
}

.lead {
  max-width: 780px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1rem;
  border: 2px solid var(--accent);
  border-radius: 0.35rem;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  color: #151b13;
  background: var(--accent);
}

.button.primary:hover {
  border-color: var(--leaf);
  background: var(--leaf);
  color: #151b13;
}

.button.secondary {
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.cover {
  margin: 0;
  justify-self: center;
}

.cover img {
  width: min(100%, 390px);
  border-radius: 0.25rem;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--line);
}

.book-intro,
.buy,
.material {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}

.prose,
.material > p {
  max-width: 900px;
  color: var(--muted);
}

.quote-band {
  padding: clamp(2rem, 6vw, 4rem);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}

.quote-band p {
  max-width: 1050px;
  margin: 0 auto;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 3.4rem);
  line-height: 1.12;
  text-align: center;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.theme-grid,
.availability {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.theme-grid article,
.availability article {
  min-height: 100%;
  padding: 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}

.theme-grid p,
.availability p {
  margin: 0;
  color: var(--muted);
}

.mystery,
.world {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.mystery img,
.world img {
  width: min(100%, 430px);
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.mystery p:last-child,
.world p:last-child {
  max-width: 820px;
  color: var(--muted);
}

.buy .availability {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note {
  margin-top: 0.9rem !important;
  color: var(--accent) !important;
  font-weight: 800;
}

.status {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0.72rem 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .hero,
  .book-intro,
  .mystery,
  .world,
  .buy,
  .material {
    grid-template-columns: 1fr;
  }

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
    background-attachment: scroll;
  }

  .site-header {
    display: grid;
  }

  nav {
    justify-content: flex-start;
  }

  nav a {
    padding-left: 0;
  }

  .theme-grid,
  .buy .availability {
    grid-template-columns: 1fr;
  }

  .actions,
  .button {
    width: 100%;
  }

  .button {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
