:root {
  --tint: #edf3ff;
  --bg: #eef3fb;
  --bg-soft: #f6f9ff;
  --surface: #f8fbff;
  --surface-alt: #f2f7ff;
  --text: #0f1724;
  --text-soft: #4c596b;
  --brand: #1b4f8a;
  --brand-strong: #0f3564;
  --accent: #c48a2a;
  --border: #dbe3ef;
  --shadow-lg: 0 28px 70px rgba(12, 28, 50, 0.14);
  --shadow-md: 0 16px 34px rgba(12, 28, 50, 0.1);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgba(27, 79, 138, 0.08), transparent 36%),
    radial-gradient(circle at 94% 12%, rgba(196, 138, 42, 0.06), transparent 30%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

body::before {
  content: "";
  position: fixed;
  inset: -12% -8% auto auto;
  width: 36vw;
  height: 36vw;
  min-width: 260px;
  min-height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(27, 79, 138, 0.18), rgba(27, 79, 138, 0.02) 62%),
    radial-gradient(circle at 70% 70%, rgba(196, 138, 42, 0.14), rgba(196, 138, 42, 0.02) 56%);
  filter: blur(6px);
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(101, 107, 142, 0.035);
  pointer-events: none;
  z-index: -1;
}

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

a {
  color: inherit;
}

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 60px);
  background: rgba(242, 247, 255, 0.88);
  border-bottom: 1px solid rgba(143, 164, 194, 0.22);
  backdrop-filter: blur(14px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 10px 30px rgba(7, 22, 45, 0.12);
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 1.7vw, 1.95rem);
  font-weight: 700;
  color: var(--brand-strong);
  letter-spacing: 0.03em;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.nav-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.nav-links a::after,
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 999px;
  background: linear-gradient(to right, var(--brand), var(--accent));
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-link:hover,
.nav-links a.active,
.nav-link.active {
  color: var(--brand-strong);
  background: rgba(27, 79, 138, 0.08);
  transform: translateY(-1px);
}

.nav-links a:hover::after,
.nav-link:hover::after,
.nav-links a.active::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.hero {
  padding: clamp(82px, 9.2vw, 102px) 18px 6px;
  display: flex;
  justify-content: center;
}

.slideshow-container {
  position: relative;
  width: min(100%, var(--content));
  min-height: clamp(420px, 58vw, 560px);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.992);
  transition:
    opacity 560ms cubic-bezier(0.2, 0.84, 0.24, 1),
    transform 560ms cubic-bezier(0.2, 0.84, 0.24, 1),
    visibility 560ms step-end;
  z-index: 1;
}

.image-card {
  position: relative;
  height: 100%;
  min-height: clamp(420px, 58vw, 560px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(143, 164, 194, 0.24);
  box-shadow: 0 22px 48px rgba(12, 28, 50, 0.15);
  background: linear-gradient(180deg, #f8fbff, #edf4fc);
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity 560ms cubic-bezier(0.2, 0.84, 0.24, 1),
    transform 560ms cubic-bezier(0.2, 0.84, 0.24, 1),
    visibility 0ms;
  z-index: 2;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide.active .image-card img {
  animation: slowZoom 18s ease-in-out infinite alternate;
}

.writer-card {
  min-height: inherit;
  display: grid;
  align-items: stretch;
  gap: clamp(16px, 2.3vw, 28px);
  padding: clamp(18px, 2.5vw, 28px);
  background:
    radial-gradient(circle at 96% 4%, rgba(27, 79, 138, 0.1), transparent 30%),
    linear-gradient(180deg, #f8fbff, #eef4fb);
}

.writer-split {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas: "media copy";
  gap: clamp(16px, 2.3vw, 28px);
  align-items: center;
  padding: 0;
}

.writer-copy {
  grid-area: copy;
  align-self: center;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(6px, 0.8vw, 14px) clamp(4px, 0.4vw, 10px);
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.writer-media {
  grid-area: media;
  align-self: stretch;
  position: relative;
  min-height: clamp(320px, 44vw, 500px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(10, 30, 56, 0.16);
  z-index: 1;
}

.writer-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center 6%;
  transform: none;
}

.writer-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.12), rgba(248, 251, 255, 0.04)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 62px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 62px);
}

.writer-eyebrow {
  margin-bottom: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: #5f7390;
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.writer-copy h1 {
  margin-bottom: 14px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.95rem, 3.4vw, 3.1rem);
  line-height: 1.08;
  text-wrap: balance;
  color: var(--brand-strong);
  text-shadow: none;
}

.writer-copy p {
  max-width: 42ch;
  color: #334863;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.08rem, 1.9vw, 1.42rem);
}

.overlay-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(22px, 4.8vw, 58px);
  background: linear-gradient(92deg, rgba(8, 20, 34, 0.72) 5%, rgba(8, 20, 34, 0.24) 72%);
  color: #fff;
}

.fall-in {
  opacity: 0;
  transform: translateY(-24px);
  filter: blur(3px);
}

.slide.active .fall-in {
  animation: fallIn 780ms cubic-bezier(0.18, 0.9, 0.24, 1) forwards;
  animation-delay: var(--fall-delay, 0ms);
}

.overlay-text h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 5vw, 4.1rem);
  letter-spacing: 0.015em;
  line-height: 1.07;
  text-wrap: balance;
}

.overlay-text p {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.24rem, 2.4vw, 1.95rem);
  max-width: 650px;
}

.split-slide {
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas: "media copy";
  gap: clamp(16px, 2.3vw, 28px);
  padding: clamp(18px, 2.5vw, 28px);
  background:
    radial-gradient(circle at 96% 4%, rgba(27, 79, 138, 0.1), transparent 30%),
    linear-gradient(180deg, #f8fbff, #eef4fb);
}

.split-slide .split-media {
  grid-area: media;
}

.split-slide .split-copy {
  grid-area: copy;
}

.split-slide-reverse {
  grid-template-areas: "copy media";
}

.split-media {
  position: relative;
  min-height: clamp(320px, 44vw, 500px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(10, 30, 56, 0.16);
}

.split-slide .split-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.split-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(6px, 0.8vw, 14px) clamp(4px, 0.4vw, 10px);
  color: var(--text);
}

.split-copy h1 {
  font-family: "Playfair Display", serif;
  color: var(--brand-strong);
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.08;
}

.split-copy p {
  color: #334863;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.08rem, 1.9vw, 1.42rem);
  max-width: 42ch;
}

.slide.active .split-copy > * {
  opacity: 0;
  transform: translateY(12px);
  animation: splitRise 560ms cubic-bezier(0.2, 0.84, 0.24, 1) forwards;
}

.slide.active .writer-media img {
  animation: writerBuild 980ms cubic-bezier(0.2, 0.84, 0.24, 1) both;
}

.slide.active .writer-media::after {
  animation: legoGridBuild 980ms steps(8, end) both;
}

.slide.active .split-copy > *:nth-child(1) { animation-delay: 80ms; }
.slide.active .split-copy > *:nth-child(2) { animation-delay: 150ms; }
.slide.active .split-copy > *:nth-child(3) { animation-delay: 220ms; }
.slide.active .split-copy > *:nth-child(4) { animation-delay: 290ms; }

.split-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: #5f7390 !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 700;
}

.split-slide-events .split-media img {
  object-position: center;
}

.hero-buttons {
  margin-top: 8px;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  top: -32px;
  transform: translateX(-50%);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6f7f95;
  animation: bob 1.9s ease-in-out infinite;
}

.dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(143, 164, 194, 0.34);
  backdrop-filter: blur(10px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(23, 63, 109, 0.35);
  transition: transform 240ms ease, background-color 240ms ease, width 240ms ease, opacity 240ms ease;
  cursor: pointer;
  opacity: 0.88;
}

.dot:hover {
  background: rgba(23, 63, 109, 0.58);
  transform: translateY(-1px);
}

.dot.active {
  width: 22px;
  background: linear-gradient(to right, var(--brand), var(--accent));
  opacity: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #2f6ca9);
  box-shadow: 0 10px 26px rgba(20, 63, 114, 0.26);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(20, 63, 114, 0.32);
  filter: saturate(1.1);
}

@keyframes fallIn {
  from {
    opacity: 0;
    transform: translateY(-24px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes writerBuild {
  0% {
    transform: scale(1.11);
    filter: blur(8px) saturate(0.88);
  }
  65% {
    transform: scale(1.03);
    filter: blur(1px) saturate(1);
  }
  100% {
    transform: scale(1);
    filter: blur(0) saturate(1);
  }
}

@keyframes legoGridBuild {
  0% {
    opacity: 0.95;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }
}

.btn:focus-visible {
  outline: 3px solid rgba(196, 138, 42, 0.52);
  outline-offset: 2px;
}

.btn-outline {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.secondary-btn {
  background: #dfeaf8;
  color: #1d4d86;
  border: 1px solid rgba(27, 79, 138, 0.24);
  box-shadow: none;
}

.secondary-btn:hover {
  background: #d2e3f7;
  color: #143b69;
  box-shadow: none;
}

.section {
  width: min(var(--content), calc(100% - 28px));
  margin: 12px auto;
  padding: clamp(22px, 4.2vw, 44px) clamp(16px, 3.2vw, 38px);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 247, 255, 0.98));
  border: 1px solid rgba(143, 164, 194, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
}

body > .section:first-of-type:not(.hero-title):not(.success-card):not(.books-checkout) {
  margin-top: 98px;
}

.section h2,
.section h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.95rem, 3.5vw, 3rem);
  color: var(--brand-strong);
  margin-bottom: 14px;
  text-wrap: balance;
}

.section p {
  color: var(--text-soft);
  max-width: 74ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-title {
  margin-top: 94px;
  background:
    linear-gradient(130deg, rgba(27, 79, 138, 0.12), rgba(196, 138, 42, 0.09)),
    var(--surface);
}

.section-divider,
.section-separator {
  width: min(var(--content), calc(100% - 28px));
  margin: 4px auto;
  height: 34px;
  display: grid;
  place-items: center;
}

.section-separator span {
  width: min(72%, 760px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(76, 89, 107, 0.46), transparent);
}

.section-divider::after {
  content: "+";
  color: rgba(76, 89, 107, 0.52);
  font-size: 1.15rem;
}

.author-preview-container,
.author-bio .bio-container {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
}

.author-preview-image,
.author-bio .author-image,
.more-author-section img {
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(8, 21, 42, 0.2);
  border: 1px solid rgba(143, 164, 194, 0.3);
}

.author-preview-image {
  width: 100%;
  max-width: 300px;
  justify-self: center;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.author-preview-text,
.author-bio .bio-text {
  text-align: left;
}

.author-preview-text p,
.author-bio .bio-text p,
.more-author-section p,
.testimonial {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.1rem, 2.1vw, 1.32rem);
}

.contact p {
  margin-bottom: 16px;
}

#contact-form {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

input,
textarea,
#customerEmail {
  width: 100%;
  font: inherit;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus,
#customerEmail:focus {
  outline: none;
  border-color: rgba(27, 79, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.14);
}

#status-message {
  margin-top: 16px;
  color: var(--brand-strong);
  font-weight: 500;
}

.books-grid,
.blogs-grid,
.testimonial-grid {
  width: min(var(--content), calc(100% - 28px));
  margin: 10px auto;
  display: grid;
  gap: clamp(12px, 1.8vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.book-card,
.blog-card,
.testimonial {
  background: linear-gradient(180deg, #fff, var(--surface-alt));
  border: 1px solid rgba(143, 164, 194, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 32px rgba(8, 21, 42, 0.1);
  padding: 16px;
  text-align: left;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.book-card:hover,
.blog-card:hover,
.testimonial:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px rgba(8, 21, 42, 0.16);
}

.blog-card,
.book-card,
.testimonial {
  position: relative;
  overflow: hidden;
}

.blog-card::before,
.book-card::before,
.testimonial::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(27, 79, 138, 0.08), transparent 46%);
  opacity: 0;
  transition: opacity 0.26s ease;
  pointer-events: none;
}

.blog-card:hover::before,
.book-card:hover::before,
.testimonial:hover::before {
  opacity: 1;
}

.book-card img,
.blog-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 50% 10%, rgba(27, 79, 138, 0.1), transparent 56%),
    linear-gradient(180deg, rgba(227, 236, 248, 0.95), rgba(241, 246, 253, 0.96));
  padding: 10px;
}

.upcoming-book-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  margin-bottom: 14px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(27, 79, 138, 0.08),
      rgba(27, 79, 138, 0.08) 12px,
      rgba(27, 79, 138, 0.14) 12px,
      rgba(27, 79, 138, 0.14) 24px
    );
}

.upcoming-book .btn[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
  box-shadow: none;
}

.book-card h3,
.blog-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.46rem;
  color: var(--brand-strong);
  margin-bottom: 8px;
}

.book-card p,
.blog-card p,
.book-description,
.book-reviews {
  color: var(--text-soft);
}

.price {
  color: var(--brand-strong);
  font-weight: 700;
  margin: 6px 0;
}

.reviews {
  font-size: 0.94rem;
  margin-top: 8px;
  margin-bottom: 14px;
  color: #6f7f95;
}

.testimonials {
  background: transparent;
  box-shadow: none;
  border: none;
  margin-bottom: 10px;
}

.testimonial {
  text-align: left;
}

.testimonial span {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  color: var(--brand-strong);
}

.books-checkout {
  background: transparent;
  border: none;
  box-shadow: none;
  padding-top: 4px;
}

.checkout-card {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 24px);
  align-items: start;
}

.checkout-media {
  display: grid;
  gap: 10px;
}

.checkout-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(143, 164, 194, 0.35);
  box-shadow: 0 16px 32px rgba(8, 21, 42, 0.15);
}

.checkout-details {
  display: grid;
  gap: 10px;
  text-align: left;
}

.checkout-details h3 {
  font-family: "Playfair Display", serif;
  color: var(--brand-strong);
  font-size: 1.8rem;
}

.email-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
}

#readPreview {
  background: linear-gradient(120deg, var(--accent), #d69c41);
  box-shadow: 0 10px 24px rgba(167, 116, 32, 0.32);
  width: 100%;
  margin-top: 0;
}

#buyBook {
  width: max-content;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  place-items: center;
  background: rgba(7, 19, 36, 0.6);
  padding: 20px;
}

.preview-modal.show {
  display: grid;
}

.preview-content {
  width: min(960px, 100%);
  height: min(84vh, 880px);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
}

.preview-content h2 {
  font-family: "Playfair Display", serif;
  color: var(--brand-strong);
  padding-right: 38px;
}

.preview-note {
  color: #6f7f95;
  margin-bottom: 6px;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.close-preview {
  position: absolute;
  right: 18px;
  top: 16px;
  color: #607086;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.success-card {
  max-width: 720px;
  margin-top: 102px;
}

.success-icon {
  margin: 0 auto 14px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  font-size: 2.4rem;
  color: #fff;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, #0e7a4d, #40a978);
  box-shadow: 0 12px 26px rgba(20, 110, 73, 0.25);
}

.success-message {
  font-size: 1.05rem;
}

.receipt-box {
  margin: 24px auto 30px;
  max-width: 520px;
  text-align: left;
  background: var(--surface-alt);
  border: 1px solid rgba(143, 164, 194, 0.35);
  border-radius: 12px;
  padding: 16px;
}

.author-bio .author-image {
  width: min(100%, 320px);
  justify-self: center;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.author-bio .bio-text {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.about-biography-card {
  width: min(var(--content), calc(100% - 16px));
  margin: 8px auto 16px;
  padding: clamp(26px, 4vw, 52px) clamp(20px, 3.6vw, 44px);
  max-height: min(86vh, 900px);
  overflow: hidden;
}

.about-biography-card .bio-container {
  align-items: stretch;
  height: 100%;
}

.about-biography-card .author-image {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: min(74vh, 760px);
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center top;
}

.about-biography-card .bio-text {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.about-biography-card .bio-scroll {
  min-height: 0;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding-right: 10px;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 79, 138, 0.5) rgba(143, 164, 194, 0.2);
}

.about-biography-card .bio-scroll::-webkit-scrollbar {
  width: 8px;
}

.about-biography-card .bio-scroll::-webkit-scrollbar-track {
  background: rgba(143, 164, 194, 0.2);
  border-radius: 999px;
}

.about-biography-card .bio-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), #2f6ca9);
  border-radius: 999px;
}

.support-button-container {
  margin-top: 24px;
}

.more-author-section {
  width: min(920px, calc(100% - 28px));
  margin: 18px auto 30px;
  padding: clamp(22px, 3.2vw, 34px);
  background: var(--surface);
  border: 1px solid rgba(143, 164, 194, 0.24);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-xl);
  text-align: center;
}

#paystackForm {
  max-width: 560px;
  margin: 18px auto 0;
  display: grid;
  gap: 10px;
}

#paystackForm input {
  width: 100%;
}

.more-author-section img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
}

.reader-container {
  width: min(860px, 100%);
  margin: 0 auto;
}

.reader-image {
  margin: 16px auto 18px;
  width: min(700px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(143, 164, 194, 0.3);
  box-shadow: 0 12px 26px rgba(8, 21, 42, 0.16);
}

.reader-content {
  color: #2a3544;
  font-size: 1.07rem;
  white-space: pre-line;
  line-height: 1.82;
}

.blog-meta {
  color: #6f7f95;
  margin-top: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.like-section {
  margin-top: 24px;
  margin-bottom: 20px;
}

.comments {
  margin-top: 24px;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

#commentEmail {
  margin-bottom: 10px;
}

.events-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
  align-items: start;
  text-align: left;
}

.events-calendar-card,
.events-booking-card {
  border: 1px solid rgba(143, 164, 194, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f5f9ff);
  padding: 14px;
}

.events-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.events-toolbar h2 {
  text-align: center;
  font-family: "Playfair Display", serif;
  color: var(--brand-strong);
  margin: 0;
  font-size: 1.32rem;
}

.events-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.events-weekdays span {
  text-align: center;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6780a1;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.event-day {
  border: 1px solid rgba(143, 164, 194, 0.35);
  border-radius: 10px;
  min-height: 68px;
  background: #fff;
  color: #2f4564;
  padding: 6px;
  display: grid;
  gap: 4px;
  align-content: start;
  cursor: pointer;
}

.event-day .day-num {
  font-weight: 700;
  font-size: 0.95rem;
}

.event-day .day-meta {
  font-size: 0.68rem;
  color: #637996;
}

.event-day.has-slots {
  background: linear-gradient(180deg, #f0f7ff, #f8fbff);
  border-color: rgba(27, 79, 138, 0.45);
}

.event-day.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(196, 138, 42, 0.5);
}

.event-day-empty {
  background: transparent;
  border-style: dashed;
  opacity: 0.35;
  cursor: default;
}

.events-selection {
  color: #607b9a;
  margin-bottom: 10px;
}

.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.slot-btn {
  border: 1px solid rgba(27, 79, 138, 0.32);
  background: #fff;
  color: #184578;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 600;
  cursor: pointer;
}

.slot-btn.active {
  background: linear-gradient(120deg, var(--brand), #2f6ca9);
  color: #fff;
}

.event-booking-form {
  display: grid;
  gap: 10px;
}

.events-status {
  margin-top: 10px;
  color: #5f7794;
}

.comment-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.comment-identity input[type="checkbox"] {
  width: auto;
}

.comments h3 {
  font-family: "Playfair Display", serif;
  color: var(--brand-strong);
  margin-bottom: 10px;
}

#commentsContainer {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

#commentsContainer > div {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

#readPageBtn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1250;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, #0f3564, #1b4f8a);
  box-shadow: 0 10px 24px rgba(10, 33, 61, 0.34);
}

footer {
  margin-top: 24px;
  padding: 20px 20px 24px;
  text-align: center;
  color: #6f7f95;
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slowZoom {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.08);
  }
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splitRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-18px, 14px, 0) scale(1.08);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, 6px);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .navbar {
    position: sticky;
    top: 0;
    padding: 12px 14px;
    gap: 10px;
  }

  .navbar.scrolled {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links li {
    flex: 0 0 auto;
  }

  .nav-links a,
  .nav-link {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 7px 12px;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-title {
    margin-top: 12px;
  }

  body > .section:first-of-type:not(.hero-title):not(.success-card):not(.books-checkout) {
    margin-top: 12px;
  }

  .author-preview-container,
  .author-bio .bio-container,
  .checkout-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-preview-text,
  .author-bio .bio-text,
  .checkout-details {
    text-align: center;
  }

  .about-biography-card {
    max-height: none;
  }

  .about-biography-card .author-image {
    max-height: 440px;
  }

  .about-biography-card .bio-text {
    grid-template-rows: auto auto auto;
  }

  .about-biography-card .bio-scroll {
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 10px;
    text-align: left;
  }

  .checkout-media {
    max-width: 340px;
    margin: 0 auto;
  }

  #buyBook {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .checkout-details h3 {
    font-size: 1.65rem;
  }

  .scroll-indicator {
    display: none;
  }

  .events-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .logo {
    width: 100%;
    font-size: 1.5rem;
  }

  .navbar {
    gap: 8px;
  }

  .nav-links {
    gap: 6px;
  }

  .hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  .slideshow-container {
    min-height: clamp(560px, 92vw, 740px);
  }

  .image-card {
    min-height: inherit;
  }

  .section,
  .books-grid,
  .blogs-grid,
  .testimonial-grid,
  .more-author-section {
    width: calc(100% - 16px);
  }

  .overlay-text {
    padding: 18px;
    gap: 10px;
  }

  .overlay-text h1 {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .overlay-text p {
    font-size: clamp(1rem, 4.7vw, 1.25rem);
  }

  .split-slide {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "copy";
    min-height: inherit;
  }

  .split-slide-reverse {
    grid-template-areas:
      "media"
      "copy";
  }

  .split-copy {
    padding: 4px;
  }

  .split-copy h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .split-copy p {
    font-size: clamp(1rem, 4.5vw, 1.2rem);
    max-width: 100%;
  }

  .writer-split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "copy";
    min-height: inherit;
  }

  .writer-media {
    min-height: clamp(280px, 52vw, 360px);
    border-radius: 20px;
  }

  .writer-copy {
    padding: 4px;
  }

  .dots {
    bottom: 14px;
  }

  .section {
    padding: clamp(20px, 6vw, 34px) 14px;
  }

  .section h2,
  .section h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .book-card,
  .blog-card,
  .testimonial {
    padding: 14px;
  }

  .checkout-media {
    max-width: 100%;
  }

  #readPreview,
  #buyBook,
  #contact-form .btn,
  #paystackForm .btn,
  .comments .btn {
    width: 100%;
    max-width: none;
  }

  .preview-modal {
    padding: 10px;
  }

  .preview-content {
    height: min(90vh, 740px);
    padding: 14px;
    gap: 8px;
  }

  .success-card {
    margin-top: 14px;
  }

  #readPageBtn {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
  }
}

@media (max-width: 520px) {
  .navbar {
    padding: 10px 10px;
  }

  .hero {
    padding-left: 8px;
    padding-right: 8px;
  }

  .slideshow-container {
    min-height: clamp(520px, 108vw, 680px);
  }

  .section,
  .books-grid,
  .blogs-grid,
  .testimonial-grid,
  .more-author-section {
    width: calc(100% - 10px);
  }

  .image-card {
    min-height: inherit;
  }

  .writer-split {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: inherit;
  }

  .writer-copy {
    max-width: 100%;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 14px;
    backdrop-filter: none;
  }

  .writer-media {
    min-height: clamp(240px, 56vw, 320px);
    border-radius: 16px;
  }

  .writer-copy h1 {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .writer-copy p {
    font-size: clamp(1rem, 4.7vw, 1.2rem);
    max-width: 100%;
  }

  .author-preview-image,
  .author-bio .author-image {
    max-width: 250px;
  }

  .preview-content h2 {
    font-size: 1.32rem;
  }

  .preview-note {
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
