.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  color: var(--ivory);
  overflow: hidden;
  padding: calc(var(--header-h) + 2rem) 0 5rem;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(
      60% 50% at 82% 18%,
      rgba(226, 160, 82, 0.55),
      transparent 70%
    ),
    radial-gradient(90% 70% at 15% 100%, var(--green), transparent 65%),
    linear-gradient(
      180deg,
      #1d4a5c 0%,
      var(--teal) 28%,
      var(--forest-2) 70%,
      var(--forest) 100%
    );
}
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0;
  transition: opacity 2.4s ease;
}
#hero-canvas.ready {
  opacity: 1;
}
#hero-canvas canvas {
  width: 100%;
  height: 100%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(17, 42, 27, 0.72) 0%,
    rgba(17, 42, 27, 0.25) 55%,
    transparent 100%
  );
}
.hero-title {
  font-size: var(--fs-hero);
  max-width: 11ch;
  margin-bottom: 0.35em;
}
.hero-lede {
  font-size: clamp(1.05rem, 1vw + 0.95rem, 1.35rem);
  max-width: 46ch;
  color: rgba(247, 242, 230, 0.9);
}
.hero-foot {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 242, 230, 0.75);
}
.reflect-art {
  aspect-ratio: 4/5;
}
.reflect-art .leafy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(247, 242, 230, 0.35);
}
.reflect-art .leafy svg {
  width: 62%;
}
.meet {
  background: var(--paper);
}
.podcast-feature {
  overflow: hidden;
}
.podcast-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    50% 60% at 85% 20%,
    rgba(226, 160, 82, 0.22),
    transparent 70%
  );
}
.podcast-feature .wrap {
  position: relative;
}
.podcast-art {
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--coral), var(--green) 70%);
  display: grid;
  place-items: center;
  color: var(--ivory);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.quote {
  background: var(--forest-2);
  color: var(--ivory);
  text-align: center;
  overflow: hidden;
}
.quote blockquote {
  margin: 0 auto;
  max-width: 22ch;
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  line-height: 1.1;
}
.quote .rule {
  width: 120px;
  height: 2px;
  background: var(--gold);
  margin: 2rem auto;
}
.connect-card h3 {
  margin-top: 0.8rem;
}
.closing {
  text-align: center;
  background: linear-gradient(180deg, var(--forest), var(--teal));
  color: var(--ivory);
}
.closing h2 {
  max-width: 16ch;
  margin-inline: auto;
}
.closing .btn-row {
  justify-content: center;
}
.head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.head-row h2 {
  margin: 0;
  max-width: 18ch;
}

.hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(226, 160, 82, 0.5),
    transparent
  );
  z-index: -1;
  animation: sun 9s ease-in-out infinite;
}
@keyframes sun {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}
.mist {
  position: absolute;
  z-index: -1;
  inset: auto -25% -10% -25%;
  height: 55%;
  pointer-events: none;
  filter: blur(28px);
  background:
    radial-gradient(
      40% 55% at 30% 60%,
      rgba(247, 242, 230, 0.2),
      transparent 70%
    ),
    radial-gradient(
      35% 50% at 72% 45%,
      rgba(247, 242, 230, 0.14),
      transparent 70%
    );
}
.mist-1 {
  animation: drift 26s ease-in-out infinite alternate;
}
.mist-2 {
  bottom: 10%;
  height: 40%;
  opacity: 0.7;
  animation: drift 38s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from {
    transform: translateX(-6%);
  }
  to {
    transform: translateX(8%);
  }
}
.hero-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(226, 160, 82, 0.3),
    transparent
  );
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.8s;
}
.hero-glow.on {
  opacity: 1;
}
.hero-rule {
  display: block;
  width: clamp(90px, 14vw, 180px);
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 0 0 1.6rem;
  transform-origin: left;
}
.marquee {
  overflow: hidden;
  background: var(--forest-2);
  color: var(--ivory);
  padding: 1.4rem 0;
  border-block: 1px solid rgba(226, 160, 82, 0.25);
}
.marquee-track {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  width: max-content;
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1;
  white-space: nowrap;
}
.marquee-track span::after {
  content: "\2766";
  margin-left: clamp(2rem, 5vw, 4rem);
  color: var(--gold);
  font-style: normal;
  font-size: 0.5em;
  vertical-align: middle;
}

.hero-marquee {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  align-content: center;
  gap: 1rem;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.07;
}
.hm-row {
  display: flex;
  width: max-content;
  animation: hm-slide 70s linear infinite;
}
.hm-row.rev {
  animation-direction: reverse;
}
.hm-group {
  display: flex;
  gap: 3rem;
  padding-right: 3rem;
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(5rem, 16vw, 14rem);
  line-height: 1;
  white-space: nowrap;
}
@keyframes hm-slide {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hm-row {
    animation: none;
  }
}

/* ---- Hero book showcase ---- */
.hero-books {
  position: absolute;
  z-index: 2;
  right: clamp(2.5rem, 11vw, 11rem); /* distance from the right edge */
  top: var(--header-h, 72px);
  bottom: 3.5rem;
  margin-block: auto;
  height: max-content;
  /* bigger covers, but never taller than the screen allows */
  width: clamp(
    190px,
    min(26vw, calc((100svh - var(--header-h, 72px) - 12rem) / 1.5)),
    340px
  );
  perspective: 1100px;
}
.hb-stack {
  display: grid;
  width: 100%;
}
.hb-slide {
  grid-area: 1/1;
  display: grid;
  gap: 1.2rem;
  justify-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px) rotateY(-32deg) scale(0.93);
  transform-origin: left center;
  transition:
    opacity 0.9s ease,
    transform 1.2s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.hb-slide.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.hb-slide.is-out {
  transform: translateY(-24px) rotateY(26deg) scale(0.95);
}
.hb-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 6px 12px 12px 6px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(247, 242, 230, 0.12),
    inset 6px 0 8px -4px rgba(0, 0, 0, 0.35);
}
.hb-slide.is-on .hb-cover {
  animation: hb-bob 5s ease-in-out infinite;
}
.hb-cover em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font: italic 600 1.5rem/1.15 var(--font-head);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.hb-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.22),
    transparent 38%
  );
  pointer-events: none;
}
.hb-meta {
  display: grid;
  gap: 0.3rem;
}
.hb-meta small {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.hb-meta strong {
  font: 600 1.4rem/1.15 var(--font-head);
}
.hb-go {
  font-size: 0.9rem;
  color: var(--gold);
}
@keyframes hb-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@media (max-width: 860px) {
  .hero {
    align-content: center;
  }
  .hero-books {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    margin: 1.5rem auto 0;
    width: 190px;
  }
  .hb-meta small,
  .hb-go {
    display: none;
  }
  .hb-meta strong {
    font-size: 1.05rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb-slide {
    transition: none;
  }
  .hb-slide.is-on .hb-cover {
    animation: none;
  }
}

/* ---- Featured books: one row of four, no hover effects ---- */
.home-books {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}
.hbook {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}
.hbook,
.hbook * {
  transition: none;
}
.hbook:hover {
  color: inherit;
  text-decoration: none;
}
/* every book gets the same tall slot; the square children's book sits at the bottom of it */
.hbook-shelf {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 2/3;
}
.hbook-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow:
    0 18px 36px -16px rgba(17, 42, 27, 0.5),
    inset 5px 0 7px -4px rgba(0, 0, 0, 0.35);
}
.hbook.is-square .hbook-cover {
  aspect-ratio: 1;
}
.hbook-cover em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font: italic 600 1.2rem/1.15 var(--font-head);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.hbook-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hbook-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.2),
    transparent 38%
  );
  pointer-events: none;
}
.hbook-meta {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}
.hbook-meta small {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.hbook-meta strong {
  font: 600 1.25rem/1.2 var(--font-head);
}
@media (max-width: 560px) {
  .home-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Podcast section: newest episode ---- */
.pf-note {
  opacity: 0.8;
}
.pf-latest {
  margin: 1.4rem 0 1.2rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--gold);
}
.pf-meta {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.pf-latest h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}
.pf-latest p:last-child {
  margin: 0;
}
.podcast-art {
  position: relative;
  overflow: hidden;
}
.podcast-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Blog section: three newest posts ---- */
.home-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}
.hpost {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(17, 42, 27, 0.12);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
}
.hpost-img {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.hpost-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hpost-body {
  flex: 1;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.6rem;
  padding: 1.4rem 1.6rem 1.6rem;
}
.hpost h3 {
  margin: 0;
}
.hpost p {
  margin: 0;
}
.hpost-meta {
  font-size: 0.85rem;
  opacity: 0.7;
}
.hpost-more {
  font-weight: 600;
  color: var(--green);
}
.home-note {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  opacity: 0.75;
}
@media (max-width: 900px) {
  .home-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .home-posts {
    grid-template-columns: 1fr;
  }
}

.flipbook-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: #171714;
}

.flipbook-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hb-cover.is-square {
  aspect-ratio: 1 / 1;
}
.media.frankfurt-cover {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2550 / 3300 !important;
  overflow: hidden;
}

.media.frankfurt-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}
