:root {
  --pine: #1c3128;
  --pine-mid: #274236;
  --moss: #4a6a56;
  --sand: #f3ead8;
  --paper: #faf6ee;
  --ink: #2a241c;
  --ink-soft: #5a5248;
  --rust: #b56a42;
  --gold: #d4b06a;
  --gold-deep: #9a7b38;
  --header-h: 5rem;
  --shadow: 0 22px 46px rgba(28, 49, 40, 0.16);
  --shadow-book: 0 16px 36px rgba(28, 49, 40, 0.26);
  --font-display: "Fraunces", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  background-color: var(--sand);
  background-image: url("../images/linen.jpg");
  background-size: 420px;
  min-height: 100vh;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--rust);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

p {
  margin: 0 0 1rem;
}

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

h1,
h2,
h3,
h4,
p,
li {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.15;
  color: var(--pine);
  margin: 0 0 0.75rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: var(--pine);
  padding: 0.6rem 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.2rem;
}

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.7rem;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.home .site-header {
  background: linear-gradient(180deg, rgba(28, 49, 40, 0.55), transparent);
}

.home .site-header.is-scrolled,
.inner .site-header {
  background: rgba(243, 234, 216, 0.95);
  box-shadow: 0 1px 0 rgba(28, 49, 40, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #1c3128;
  box-shadow: 0 0 0 2px rgba(212, 176, 106, 0.45);
}

.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--paper);
  white-space: nowrap;
}

.home .site-header.is-scrolled .brand-name,
.inner .brand-name {
  color: var(--pine);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(250, 246, 238, 0.35);
  background: transparent;
  border-radius: 0.3rem;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.inner .nav-toggle,
.home .site-header.is-scrolled .nav-toggle {
  border-color: rgba(28, 49, 40, 0.2);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--paper);
  position: relative;
  margin: 0 auto;
}

.inner .nav-toggle span,
.inner .nav-toggle span::before,
.inner .nav-toggle span::after,
.home .site-header.is-scrolled .nav-toggle span,
.home .site-header.is-scrolled .nav-toggle span::before,
.home .site-header.is-scrolled .nav-toggle span::after,
body.nav-open .nav-toggle span,
body.nav-open .nav-toggle span::before,
body.nav-open .nav-toggle span::after {
  background: var(--pine);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

body.nav-open .site-header,
body.nav-open.home .site-header {
  background: var(--sand);
}

body.nav-open .brand-name {
  color: var(--pine);
}

.site-nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

.home .site-header.is-scrolled .site-nav a,
.inner .site-nav a {
  color: var(--pine);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.home .site-header.is-scrolled .site-nav a:hover,
.home .site-header.is-scrolled .site-nav a[aria-current="page"],
.inner .site-nav a:hover,
.inner .site-nav a[aria-current="page"] {
  color: var(--rust);
  border-bottom-color: var(--rust);
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 2rem) 0 5rem;
  color: var(--paper);
  background:
    linear-gradient(105deg, rgba(28, 49, 40, 0.86) 0%, rgba(28, 49, 40, 0.5) 52%, rgba(28, 49, 40, 0.18) 100%),
    url("../images/hero-boardwalk.jpg") center 40% / cover no-repeat;
}

.hero-content {
  max-width: 40rem;
}

.hero h1 {
  font-size: clamp(3.1rem, 8vw, 5.8rem);
  font-style: italic;
  font-weight: 500;
  color: var(--paper);
  margin: 0 0 0.5rem;
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  color: var(--gold);
  margin: 0 0 1.1rem;
}

.gold-rule {
  width: 4rem;
  height: 1px;
  background: var(--gold);
  border: 0;
  margin: 0 0 1.2rem;
}

.hero p {
  color: rgba(250, 246, 238, 0.9);
  max-width: 34rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.site-nav a:focus-visible,
.brand:focus-visible,
.email-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-gold {
  background: var(--gold);
  color: var(--pine);
}

.btn-gold:hover {
  background: #e4c88a;
  color: var(--pine);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(250, 246, 238, 0.4);
}

.btn-ghost:hover {
  color: var(--paper);
  background: rgba(250, 246, 238, 0.1);
}

.btn-pine {
  background: var(--pine);
  color: var(--paper);
}

.btn-pine:hover {
  background: var(--pine-mid);
  color: var(--gold);
}

.btn-outline {
  background: transparent;
  color: var(--pine);
  border-color: rgba(28, 49, 40, 0.25);
}

.btn-outline:hover {
  border-color: var(--rust);
  color: var(--rust);
}

section {
  padding: 5rem 0;
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.8rem;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
}

.welcome {
  background: var(--paper);
}

.welcome-grid {
  display: grid;
  gap: 2.6rem;
  align-items: center;
}

.welcome-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.welcome h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
}

.books-band {
  background:
    linear-gradient(180deg, rgba(28, 49, 40, 0.9), rgba(28, 49, 40, 0.93)),
    url("../images/hero-dusk.jpg") center / cover no-repeat;
  color: var(--paper);
}

.books-band .section-head h2,
.books-band .eyebrow,
.books-band h3 {
  color: var(--paper);
}

.books-band .section-head p {
  color: rgba(250, 246, 238, 0.82);
}

.cover-grid {
  display: grid;
  gap: 1.2rem;
}

.cover-grid a img,
.cover-grid img {
  width: 100%;
  box-shadow: var(--shadow-book);
  transition: transform 0.4s var(--ease);
}

.cover-grid a {
  display: grid;
  justify-items: center;
  text-decoration: none;
  color: inherit;
}

.cover-grid a:hover {
  color: var(--gold);
}

.cover-grid a:hover img {
  transform: translateY(-6px);
}

.cover-grid .cover-label {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.ruby-band {
  background: var(--paper);
}

.ruby-grid {
  display: grid;
  gap: 2.4rem;
  align-items: center;
}

.ruby-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--pine);
  line-height: 1.35;
}

.publisher {
  text-align: center;
  background:
    linear-gradient(180deg, rgba(243, 234, 216, 0.9), rgba(243, 234, 216, 0.94)),
    url("../images/linen.jpg");
}

.publisher-logo {
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 50%;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 3px rgba(181, 106, 66, 0.3);
}

.publisher a.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.site-footer {
  background: var(--pine);
  color: rgba(250, 246, 238, 0.78);
  padding: 3.2rem 0 1.7rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(250, 246, 238, 0.1);
}

.footer-brand .brand-name {
  color: var(--paper);
}

.footer-brand p {
  margin-top: 0.9rem;
  max-width: 24rem;
}

.site-footer h4 {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: rgba(250, 246, 238, 0.88);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-links {
  display: grid;
  gap: 0.4rem;
}

.footer-copy {
  padding-top: 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: rgba(250, 246, 238, 0.55);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.page-hero {
  min-height: 20rem;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 3.4rem) 0 2.8rem;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(28, 49, 40, 0.42), rgba(28, 49, 40, 0.74)),
    url("../images/hero-dusk.jpg") center 40% / cover no-repeat;
}

.page-hero.about-hero {
  background-image:
    linear-gradient(180deg, rgba(28, 49, 40, 0.45), rgba(28, 49, 40, 0.76)),
    url("../images/writing-nook.jpg");
  background-position: center 60%;
}

.page-hero h1 {
  color: var(--paper);
  font-style: italic;
  font-size: clamp(2.7rem, 6vw, 4.4rem);
}

.page-hero p {
  max-width: 34rem;
  color: rgba(250, 246, 238, 0.88);
}

.about-block,
.book-catalog,
.contact-wrap {
  background: var(--paper);
}

.about-layout,
.book-detail,
.contact-grid {
  display: grid;
  gap: 2.4rem;
  align-items: start;
}

.portrait {
  max-width: 24rem;
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
  box-shadow: var(--shadow);
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.5rem;
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-ui);
}

.meta-list span {
  display: inline-block;
  min-width: 5.6rem;
  color: var(--rust);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.book-detail {
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(28, 49, 40, 0.08);
}

.book-detail:last-child {
  border-bottom: 0;
}

.book-detail h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-style: normal;
}

.book-detail img {
  width: min(100%, 14rem);
  box-shadow: var(--shadow-book);
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.contact-card,
.contact-form {
  background: var(--sand);
  padding: 2rem 1.6rem;
}

.email-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  color: var(--pine);
  margin: 0.6rem 0 1rem;
  overflow-wrap: anywhere;
}

.publisher-inline {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.2rem;
  text-decoration: none;
  color: inherit;
}

.publisher-inline img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
}

label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.field {
  margin-bottom: 1rem;
}

input,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(28, 49, 40, 0.12);
  padding: 0.75rem 0.85rem;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 799px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    background: var(--sand);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    padding: 2rem 1.4rem;
  }

  .site-nav.is-open {
    transform: none;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 1.2rem;
  }

  .site-nav a,
  .home .site-nav a {
    color: var(--pine);
    font-size: 1rem;
  }

  .hero {
    align-items: center;
    text-align: center;
    background:
      linear-gradient(180deg, rgba(28, 49, 40, 0.74), rgba(28, 49, 40, 0.78)),
      url("../images/hero-boardwalk.jpg") center / cover no-repeat;
  }

  .gold-rule {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .brand-name {
    font-size: 1.15rem;
  }
}

@media (min-width: 800px) {
  .welcome-grid,
  .ruby-grid,
  .about-layout,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.4rem;
  }

  .cover-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }

  .book-detail {
    grid-template-columns: 14rem 1fr;
    gap: 2.2rem;
    align-items: center;
    padding: 2rem 0;
  }
}

@media (min-width: 1100px) {
  .wrap,
  .header-inner {
    padding-inline: 2rem;
  }
}

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

  .reveal,
  .btn,
  .cover-grid a img {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
