body[data-page="home"] {
  --depth-ink: #10191b;
}

body[data-page="home"] a:focus-visible,
body[data-page="home"] button:focus-visible,
body[data-page="home"] summary:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 5px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 44px;
}

.home-hero {
  min-height: clamp(740px, calc(100svh - 70px), 920px);
  isolation: isolate;
  background: var(--depth-ink);
}

.home-hero.has-hero-image::before {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 18, 20, 0.88) 0%, rgba(10, 18, 20, 0.7) 32%, rgba(10, 18, 20, 0.13) 62%, transparent 84%),
    linear-gradient(0deg, rgba(10, 18, 20, 0.56), transparent 34%);
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-layer {
  position: absolute;
  inset: -3%;
  transform: translate3d(var(--depth-x, 0px), var(--depth-y, 0px), 0);
}

.hero-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-layer-city img {
  transform: scale(1.035);
}

.hero-layer-traveler img,
.hero-layer-records img {
  position: absolute;
  bottom: 0;
  height: auto;
  object-fit: contain;
}

.hero-layer-traveler img {
  transform: scale(0.46);
  transform-origin: 72% 65%;
}

.hero-layer-records img {
  transform: scale(0.62);
  transform-origin: right bottom;
}

.hero-mist {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 67% 27%, rgba(159, 183, 200, 0.17), transparent 33%);
}

.depth-motion-enabled .hero-layer {
  will-change: transform;
}

.home-hero .hero-inner {
  padding: 92px 20px 64px;
}

.home-hero .eyebrow {
  max-width: 490px;
  line-height: 1.7;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.home-hero h1 {
  max-width: 650px;
  font-size: clamp(4.4rem, 6.3vw, 5.8rem);
  line-height: 1.01;
  margin: 24px 0;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.22);
}

.home-hero .hero-copy {
  max-width: 500px;
  font-size: 1.03rem;
  line-height: 1.8;
  color: #e0dbce;
}

.home-hero .hero-tagline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.5;
  color: var(--paper);
}

.home-hero .actions {
  max-width: 600px;
  gap: 12px;
  margin-top: 28px;
}

body[data-page="home"] .button {
  gap: 10px;
  border-radius: 2px;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-hero .button.primary {
  background: #eaddc3;
  border-color: #eaddc3;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.22);
}

.home-hero .button.secondary {
  border-color: rgba(242, 235, 220, 0.55);
  background: rgba(16, 25, 27, 0.4);
}

.hero-price {
  max-width: 550px;
  margin: 22px 0 0;
  font-size: 0.95rem;
  color: #d9d5ca;
}

.hero-price a {
  color: #e7c994;
  text-underline-offset: 4px;
}

.home-hero .offer-note {
  max-width: 510px;
  margin-top: 9px;
  font-size: 0.77rem;
  color: #c9c7bd;
}

.hero-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  max-width: 680px;
  margin-top: 46px;
  font-size: 0.76rem;
  color: #d3cfc2;
}

.hero-footnote a {
  color: var(--paper);
  text-decoration: none;
}

.hero-footnote a span {
  margin-left: 10px;
  color: var(--lamp);
}

#first-book,
#three-series,
#power-and-records {
  scroll-margin-top: 100px;
}

.writ-image-band {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--iron);
}

.writ-image-band img {
  display: block;
  width: 100%;
  height: clamp(280px, 31vw, 390px);
  object-fit: cover;
  object-position: center 31%;
}

@media (max-width: 860px) {
  .writ-image-band img {
    height: auto;
  }
}

.first-book-section {
  position: relative;
  padding: 94px 20px;
  background:
    radial-gradient(ellipse at 22% 38%, rgba(201, 155, 81, 0.16), transparent 46%),
    linear-gradient(110deg, #eee5d4, #f5efe3);
  border-bottom: 1px solid var(--line);
}

.first-book-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 62px;
}

.first-book-grid > * {
  min-width: 0;
}

.book-stage {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 30px 24px 0;
}

.book-stage::after {
  content: "";
  position: absolute;
  width: 78%;
  height: 28px;
  bottom: 42px;
  background: rgba(23, 22, 21, 0.27);
  border-radius: 50%;
  filter: blur(16px);
  transform: rotate(-4deg);
}

.book-link {
  display: block;
  position: relative;
  z-index: 1;
  width: clamp(220px, 22vw, 300px);
  perspective: 1100px;
}

.book-object {
  display: block;
  position: relative;
  transform: rotateY(-17deg) rotateZ(-4deg);
  transform-style: preserve-3d;
  transition: transform 350ms ease;
  box-shadow: 15px 18px 35px rgba(36, 29, 20, 0.2);
}

.book-object img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  border-radius: 1px 3px 3px 1px;
  box-shadow: inset 4px 0 8px rgba(0, 0, 0, 0.5);
}

.book-object::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: -17px;
  width: 17px;
  background: repeating-linear-gradient(0deg, #ddd4c3 0 2px, #b8ad97 2px 3px);
  transform: skewY(-7deg);
  transform-origin: left;
  border-right: 3px solid #1f2323;
}

.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12px;
  width: 13px;
  background: linear-gradient(90deg, #111818, #313a38 55%, #141919);
  transform: skewY(8deg);
  border-radius: 2px 0 0 2px;
}

.book-caption {
  position: relative;
  z-index: 1;
  margin: 40px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--road);
}

.first-book-copy .eyebrow,
.series-section > .container > .section-heading .eyebrow {
  color: var(--seal);
  margin-bottom: 18px;
}

.first-book-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(2.8rem, 4.2vw, 4rem);
}

.book-intro {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.45;
  color: #4f4337;
}

.first-book-copy > p {
  max-width: 55ch;
}

.book-offer {
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--seal);
  padding-left: 16px;
  margin-top: 28px;
}

.book-offer span {
  font-size: 0.92rem;
  color: #5c5145;
}

.first-book-copy .button.primary {
  background: var(--iron);
  border-color: var(--iron);
  color: var(--paper);
}

.first-book-copy .button.secondary {
  color: var(--ink);
  background: transparent;
}

.book-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 26px;
  font-size: 0.88rem;
}

.book-guide-links a {
  text-underline-offset: 5px;
}

.series-section {
  padding-top: 86px;
  padding-bottom: 94px;
  background: #e4dac8;
}

.series-section .section-heading {
  max-width: 800px;
  margin-bottom: 36px;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.series-card {
  --scene-color: #182b26;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--paper);
  background: var(--scene-color);
  border: 1px solid rgba(23, 22, 21, 0.24);
  box-shadow: 0 16px 30px rgba(40, 31, 20, 0.13);
}

.series-foundation {
  --scene-color: #29272a;
}

.series-three-suns {
  --scene-color: #192c3b;
}

.series-image {
  position: relative;
  height: 235px;
  overflow: hidden;
}

.series-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.series-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--scene-color), transparent 52%);
}

.series-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 26px 28px;
}

.series-body .card-role {
  color: #dfba78;
  margin: 6px 0 16px;
  font-size: 0.71rem;
  letter-spacing: 0.07em;
}

.series-body h3 {
  margin: 0 0 18px;
  font-size: 1.9rem;
  line-height: 1.12;
}

.series-body > p:not(.card-role) {
  margin: 0 0 20px;
  font-size: 0.94rem;
  line-height: 1.75;
  color: #d1d4cc;
}

.series-books {
  margin: auto 0 22px;
  font-size: 0.86rem;
  color: #dcd3c0;
}

.series-books summary {
  cursor: pointer;
  padding: 8px 0;
  min-height: 40px;
}

.series-books .book-list {
  margin-top: 10px;
}

.series-body .button {
  background: rgba(242, 235, 220, 0.06);
  border-color: rgba(242, 235, 220, 0.45);
  padding: 12px;
  font-size: 0.84rem;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body[data-page="home"] .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.15);
  }

  .book-link:hover .book-object,
  .book-link:focus-visible .book-object {
    transform: rotateY(-8deg) rotateZ(-2deg) translateY(-4px);
  }

  .series-card:hover .series-image img {
    transform: scale(1.045);
  }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .home-hero h1 {
    max-width: 560px;
  }

  .first-book-grid {
    gap: 40px;
  }

  .series-grid {
    gap: 16px;
  }

  .series-body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .series-body h3 {
    font-size: 1.65rem;
  }
}

@media (max-width: 860px) {
  body[data-page="home"] .nav-wrap {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body[data-page="home"] .brand {
    max-width: calc(100% - 84px);
    font-size: 1rem;
  }

  .has-depth-js .nav-toggle {
    display: inline-flex;
  }

  body[data-page="home"] .nav-links {
    flex-basis: 100%;
    padding-top: 8px;
  }

  .has-depth-js .nav-links:not(.is-open) {
    display: none;
  }

  .home-hero {
    min-height: 800px;
  }

  .home-hero .hero-inner {
    padding: 66px 24px 150px;
  }

  .home-hero h1 {
    max-width: 560px;
    font-size: clamp(3.2rem, 8.5vw, 4.4rem);
  }

  .home-hero.has-hero-image::before {
    background:
      linear-gradient(90deg, rgba(10, 18, 20, 0.82), rgba(10, 18, 20, 0.5) 60%, rgba(10, 18, 20, 0.18)),
      linear-gradient(0deg, rgba(10, 18, 20, 0.08), rgba(10, 18, 20, 0.3) 70%);
  }

  .hero-layer img {
    object-position: 75% center;
  }

  .hero-layer-traveler img {
    transform-origin: 82% 70%;
  }

  .hero-layer-records img {
    transform: scale(0.5);
  }

  .first-book-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 46px;
  }

  .first-book-copy {
    max-width: 620px;
    margin: 0 auto;
  }

  .book-link {
    width: min(245px, 100%);
  }

  .book-stage::after {
    width: 300px;
    max-width: 85%;
  }

  .series-grid {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin: 0 auto;
    gap: 30px;
  }

  .series-image {
    height: 285px;
  }

  .series-body h3 {
    font-size: 2rem;
  }
}

@media (max-width: 560px) {
  .home-hero .hero-inner {
    padding: 52px 20px 170px;
  }

  .home-hero h1 {
    font-size: clamp(2.6rem, 12vw, 3rem);
    margin-top: 22px;
    max-width: 370px;
  }

  .home-hero .hero-tagline {
    font-size: 1.28rem;
  }

  .home-hero .hero-copy:not(.hero-tagline) {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .home-hero .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .hero-price {
    font-size: 0.86rem;
  }

  .hero-footnote {
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    font-size: 0.69rem;
  }

  .first-book-section,
  .series-section {
    padding: 64px 20px;
  }

  .first-book-grid {
    gap: 36px;
  }

  .first-book-copy h2 {
    font-size: 2.8rem;
  }

  .book-intro {
    font-size: 1.25rem;
  }

  .series-image {
    height: 225px;
  }

  .series-body {
    padding: 0 24px 26px;
  }

  .series-body h3 {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-layer,
  .book-object,
  .series-image img,
  body[data-page="home"] .button {
    transition: none;
    will-change: auto;
  }
}
