:root {
  --ink: #142231;
  --ink-soft: #334150;
  --muted: #65707b;
  --red: #a63a37;
  --red-dark: #812b29;
  --blue: #173f5f;
  --gold: #b78a3f;
  --white: #ffffff;
  --wash: #f6f8fa;
  --line: #dfe4e8;
  --line-dark: #c8d0d7;
  --page: min(92vw, 1320px);
  --shadow: 0 22px 65px rgba(24, 35, 47, 0.12);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 750;
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: var(--page);
  min-height: 5.25rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 780;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.4vw, 2.4rem);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-link,
.series-toggle {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0.4rem 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-link:hover,
.series-toggle:hover {
  border-bottom-color: currentColor;
}

.series-dropdown {
  position: relative;
}

.series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chevron {
  font-size: 1.1rem;
  transition: transform 160ms ease;
}

.series-dropdown.is-open .chevron {
  transform: rotate(180deg);
}

.series-menu {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  display: grid;
  width: min(23rem, 86vw);
  padding: 0.55rem;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.5rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

.series-dropdown.is-open .series-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.series-menu-link {
  padding: 0.85rem 0.9rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.series-menu-link + .series-menu-link {
  border-top: 1px solid var(--line);
}

.series-menu-link:hover {
  background: var(--wash);
  color: var(--red);
}

.nav-shop {
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--ink);
  transition: background 150ms ease, color 150ms ease;
}

.nav-shop:hover {
  background: var(--ink);
  color: var(--white);
}

.menu-button {
  display: none;
  border: 1px solid var(--line-dark);
  padding: 0.55rem 0.75rem;
  background: var(--white);
  color: var(--ink);
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.15rem;
  border: 0;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--red);
  color: var(--white);
}

.button-primary:hover {
  background: var(--red-dark);
}

.button-outline {
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
}

.button-outline:hover {
  background: var(--ink);
  color: var(--white);
}

.home-hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.97) 27%, rgba(255, 255, 255, 0.78) 43%, rgba(255, 255, 255, 0.08) 70%),
    url("/assets/hero/library-table-hero.webp");
  background-position: center;
  background-size: cover;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: var(--page);
  min-height: 690px;
  margin: 0 auto;
  align-items: center;
}

.home-hero-copy {
  width: min(43rem, 52%);
  padding: 5.5rem 0 4.5rem;
}

.home-hero-copy h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3.7rem, 6.5vw, 7.3rem);
  font-weight: 780;
  letter-spacing: -0.07em;
  line-height: 0.91;
}

.home-hero-copy h1 em {
  color: var(--red);
  font-style: normal;
  font-weight: 500;
}

.home-hero-copy > p:not(.eyebrow) {
  max-width: 38rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  margin-top: 2.25rem;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.home-intro {
  width: var(--page);
  margin: 0 auto;
  padding: 5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.home-intro h2,
.catalogue-heading h2,
.mailing-copy h2,
.about-copy h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 4.25rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.home-intro > p:last-child,
.catalogue-heading > p,
.about-copy > p {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.collection-list {
  display: grid;
  width: var(--page);
  margin: 0 auto;
  gap: 1.1rem;
  padding-bottom: 6rem;
}

.collection-row {
  position: relative;
  min-height: 315px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

.collection-row > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.collection-copy {
  position: relative;
  z-index: 1;
  display: flex;
  width: 45%;
  min-height: 315px;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  padding: 2.25rem clamp(1.5rem, 3vw, 3.5rem) 2.25rem 1.5rem;
}

.collection-number {
  margin: 0 0 0.5rem;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.collection-copy h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3.1rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.collection-copy > p:not(.collection-number) {
  max-width: 34rem;
  margin: 1rem 0 1.3rem;
  color: var(--muted);
}

.row-link,
.buy-link,
.text-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--red);
  font-weight: 800;
}

.row-link:hover,
.buy-link:hover,
.text-link:hover {
  color: var(--red-dark);
}

.series-hero {
  position: relative;
  display: grid;
  min-height: 515px;
  overflow: hidden;
  align-items: center;
  background: var(--white);
}

.series-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-hero-video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: min(70%, 920px);
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.series-hero.has-video::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.82) 55%, #ffffff 69%);
  content: "";
  pointer-events: none;
}

.series-hero-copy {
  position: relative;
  z-index: 1;
  width: min(92vw, 1320px);
  margin: 0 auto;
  padding: 4rem 0;
}

.series-hero-copy > div {
  width: 45%;
  margin-left: auto;
}

.series-hero h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 6.3rem);
  font-weight: 770;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.series-hero-copy p:not(.eyebrow) {
  max-width: 38rem;
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
}

.series-hero-actions {
  display: flex;
  margin-top: 1.8rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.breadcrumb {
  width: var(--page);
  margin: 0 auto;
  padding: 1.1rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb a {
  border-bottom: 1px solid var(--line-dark);
}

.catalogue {
  width: var(--page);
  margin: 0 auto;
  padding: 5.5rem 0 6rem;
}

.catalogue-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.65fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.catalogue-heading p {
  margin: 0;
}

.catalogue-count {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.2vw, 2rem);
}

.book-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.book-card:hover {
  border-color: var(--line-dark);
  box-shadow: 0 18px 45px rgba(20, 34, 49, 0.1);
  transform: translateY(-3px);
}

.book-cover {
  display: flex;
  min-height: 450px;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 1.2rem 0.5rem;
  background: linear-gradient(to bottom, #fbfcfd, #ffffff);
}

.book-cover img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 15px 16px rgba(25, 34, 45, 0.12));
}

.book-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem 1.5rem 1.55rem;
}

.book-label {
  margin: 0 0 0.55rem;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-card h3 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.65rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.book-subtitle {
  min-height: 2.8em;
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.4;
}

.book-teaser {
  display: -webkit-box;
  min-height: 6.3em;
  margin: 1rem 0 1.25rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.buy-link {
  margin-top: auto;
  font-size: 0.9rem;
}

.mailing-section {
  display: grid;
  width: var(--page);
  margin: 0 auto 5.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: 4rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.mailing-copy h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 3.3vw, 3.45rem);
}

.mailing-copy > p:last-child {
  max-width: 37rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

.mailing-form {
  display: grid;
  gap: 0.8rem;
}

.mailing-form label {
  display: grid;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.mailing-form input[type="email"] {
  width: 100%;
  min-height: 3.4rem;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  padding: 0.75rem 0.9rem;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
}

.mailing-form input[type="email"]:focus {
  border-color: var(--ink);
  outline: 2px solid rgba(183, 138, 63, 0.28);
  outline-offset: 0;
}

.mailing-form .button {
  width: fit-content;
}

.mailing-form .button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-status {
  min-height: 1.5rem;
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-status.is-success {
  color: #23633f;
}

.form-status.is-error {
  color: var(--red-dark);
}

.form-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.about-page {
  width: var(--page);
  margin: 0 auto;
}

.about-hero {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding: 5rem 0;
}

.author-portrait {
  display: grid;
  min-height: 560px;
  place-items: center;
  margin: 0;
  background: var(--white);
}

.author-portrait img {
  display: block;
  width: min(84%, 32rem);
  height: auto;
}

.about-copy h1 {
  max-width: 13ch;
}

.about-copy > p {
  max-width: 46rem;
}

.about-copy .text-link {
  margin-top: 1.2rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-inner {
  display: grid;
  width: var(--page);
  min-height: 8rem;
  margin: 0 auto;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-inner p {
  margin: 0;
}

.footer-brand {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .home-hero {
    min-height: 610px;
    background-position: 62% center;
  }

  .home-hero-inner {
    min-height: 610px;
  }

  .home-hero-copy {
    width: min(37rem, 60%);
  }

  .home-hero-copy h1 {
    max-width: 13ch;
  }

  .collection-copy {
    width: 53%;
  }

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

  .series-hero-copy > div {
    width: 50%;
  }
}

@media (max-width: 780px) {
  .header-inner {
    min-height: 4.7rem;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 4.7rem 0 auto;
    display: none;
    max-height: calc(100vh - 4.7rem);
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    padding: 0.9rem 4vw 1.3rem;
  }

  .nav-open .site-nav {
    display: flex;
  }

  .nav-link,
  .series-toggle,
  .nav-shop {
    width: 100%;
    padding: 0.9rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .series-toggle {
    justify-content: space-between;
  }

  .series-menu {
    position: static;
    display: none;
    width: 100%;
    padding: 0 0 0 0.8rem;
    border: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .series-dropdown.is-open .series-menu {
    display: grid;
    transform: none;
  }

  .series-menu-link {
    padding: 0.75rem 0.4rem;
  }

  .home-hero {
    min-height: 700px;
    background-image:
      linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.97) 37%, rgba(255, 255, 255, 0.72) 58%, rgba(255, 255, 255, 0.08) 100%),
      url("/assets/hero/library-table-hero-mobile.webp");
    background-position: 64% center;
  }

  .home-hero-inner {
    min-height: 700px;
    align-items: flex-start;
    padding: 3.8rem 0 0;
  }

  .home-hero-copy {
    width: 100%;
    padding: 0;
  }

  .home-hero-copy h1 {
    font-size: clamp(3.25rem, 15vw, 5.5rem);
  }

  .collection-row {
    min-height: 520px;
  }

  .collection-row > img {
    height: 270px;
    object-position: left top;
  }

  .collection-copy {
    width: 100%;
    min-height: 250px;
    margin-top: 270px;
    padding: 1.65rem;
    background: var(--white);
  }

  .series-hero {
    min-height: 660px;
    align-items: end;
  }

  .series-hero-image {
    height: 320px;
    object-position: left top;
  }

  .series-hero-video {
    width: 100%;
    height: 320px;
    object-position: center center;
  }

  .series-hero.has-video::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 190px, #ffffff 320px);
  }

  .series-hero-copy {
    padding: 330px 0 3.4rem;
  }

  .series-hero-copy > div {
    width: 100%;
  }

  .series-hero h1 {
    max-width: 16ch;
    font-size: clamp(2.8rem, 12vw, 4.6rem);
  }

  .catalogue {
    padding-top: 4rem;
  }

  .catalogue-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mailing-section {
    grid-template-columns: 1fr;
    padding: 3.2rem 0;
  }

  .about-hero {
    grid-template-columns: 1fr;
    padding: 3.5rem 0 4.5rem;
  }

  .author-portrait {
    width: 100%;
    min-height: 440px;
    max-width: 28rem;
    margin-inline: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 2rem 0;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 1rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .hero-actions,
  .series-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .series-hero-actions .button {
    width: 100%;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-cover {
    min-height: 410px;
  }

  .book-cover img {
    height: 380px;
  }

  .mailing-form .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .series-hero-video {
    display: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
