/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', 'Segoe UI', 'Helvetica', sans-serif;
  background: #fbf8f3;
  color: #2c2c2c;
  line-height: 1.6;
  min-height: 100vh;
}

/* Fade-in only when JS is present AND the preloader exists.
   Legal pages without script.js stay fully visible. */
body.has-preloader {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
body.has-preloader.loaded { opacity: 1; }

h1, h2, h3, .book-info h4, .section-heading h2,
.about-heading h2, .contact-section h3, .legal-container h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
}

/* ============================================================
   HEADER  —  book-wall image + frosted glass card
   ============================================================ */
header {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 40px 20px 44px;
  text-align: center;

  background:
    linear-gradient(135deg, rgba(15, 44, 76, 0.55) 0%,
                            rgba(20, 71, 107, 0.50) 55%,
                            rgba(26, 106, 122, 0.55) 100%),
    url('./images/header-bg.jpg') center / cover no-repeat,
    linear-gradient(135deg, #0f2c4c 0%, #14476b 55%, #1a6a7a 100%);
  background-position: 35% center;
}

/* Soft vignette — brightens the book wall on the left,
   darkens the edges slightly for framing */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 30% 50%,
    rgba(15, 44, 76, 0.00) 0%,
    rgba(15, 44, 76, 0.15) 70%,
    rgba(15, 44, 76, 0.40) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Animated drifting glow */
header::after {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(217, 196, 138, 0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(26, 106, 122, 0.25), transparent 45%);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.12); }
}

/* ---- Frosted glass card ---- */
.header-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  /* Real frosted glass — transparent + blurred + saturated */
  background: rgba(253, 251, 247, 0.72);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(217, 196, 138, 0.60);
  border-radius: 18px;
  padding: 34px 44px 30px;

  /* Outer shadow + inner highlight (the "glass lip") */
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(217, 196, 138, 0.25);
}

/* Diagonal light sheen — subtle glass reflection */
.header-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg,
              rgba(255, 255, 255, 0.35) 0%,
              rgba(255, 255, 255, 0.05) 35%,
              transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure card content sits above the sheen */
.header-inner > * {
  position: relative;
  z-index: 1;
}

/* ---- Name: warm gold, editorial serif ---- */
header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.15rem;
  letter-spacing: 0.4px;
  font-weight: 700;
  margin: 0 0 6px;

  /* Gold gradient — bright top, deeper bottom */
  background: linear-gradient(180deg, #d4a961 0%, #b8873a 50%, #8a5f1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #b8873a; /* fallback for very old browsers */

  /* Subtle drop shadow keeps the text crisp on the glass */
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.4))
          drop-shadow(0 1px 2px rgba(138, 95, 30, 0.25));
}

/* ---- Eyebrow: letterspaced uppercase ---- */
.header-eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: #8a7a55;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ---- Gold divider line ---- */
.header-divider {
  width: 100%;
  max-width: 640px;
  height: 1px;
  background: #d9c48a;
  margin: 18px auto 20px;
}

/* ---- Main tagline: bold navy serif ---- */
.header-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 8px;
  line-height: 1.4;
  max-width: 640px;
}

/* ---- Sub-tagline: light grey ---- */
.header-subtagline {
  font-size: 0.9rem;
  font-weight: 400;
  color: #5a6270;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 20px;
}

/* ---- Chips: soft cream pills ---- */
.header-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.header-chips span {
  font-size: 0.72rem;
  letter-spacing: 0.2px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #ece5d5;
  color: #1e3a5f;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease,
              border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.header-chips span:hover {
  transform: translateY(-2px);
  background: #fbf3dd;
  border-color: #d9c48a;
  box-shadow: 0 4px 12px rgba(184, 146, 90, 0.20);
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 35px 20px 50px;
}

/* ============================================================
   SECTION BANDS — full-bleed tinted strips
   ============================================================ */
.section-band {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 60px 20px;
}
.section-band > .band-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
  text-align: center;
  margin: 10px 0 30px;
}
.section-heading h2 {
  font-size: 1.85rem;
  margin-bottom: 8px;
  color: #0f2c4c;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.section-heading h2::after {
  content: '';
  display: block;
  width: 55px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #0f2c4c, #d9c48a, #0f2c4c);
  background-size: 200% 100%;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.section-heading p {
  color: #6b7280;
  font-size: 0.94rem;
  max-width: 650px;
  margin: 14px auto 0;
}
.section-heading.upcoming { margin-top: 10px; }
.section-heading.upcoming h2::after {
  background: linear-gradient(90deg, #6b5b8a, #d9c48a, #6b5b8a);
  background-size: 200% 100%;
}

/* ============================================================
   SHOP ALL BUTTON
   ============================================================ */
.shop-all-wrap {
  margin-top: 22px;
}
.shop-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  background: linear-gradient(135deg, #b8873a, #d9c48a);
  color: #0f2c4c;
  text-decoration: none;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(184, 135, 58, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
}
.shop-all-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transition: left 0.7s ease;
  pointer-events: none;
}
.shop-all-btn:hover::after { left: 100%; }
.shop-all-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(184, 135, 58, 0.45);
  filter: brightness(1.05);
}
.shop-all-btn:active {
  transform: translateY(0);
}
.shop-all-note {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 10px;
  font-style: italic;
}

/* ============================================================
   BOOKS GRID
   ============================================================ */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: start;
}

/* ============================================================
   BOOK CARD
   ============================================================ */
.book-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15, 44, 76, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  border-top: 4px solid #0f2c4c;
  overflow: hidden;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15, 44, 76, 0.18),
              0 0 0 1px rgba(217, 196, 138, 0.25);
}
.book-card.color-1 { border-top-color: #b8873a; }
.book-card.color-2 { border-top-color: #2c6e8f; }
.book-card.color-3 { border-top-color: #3a7d5e; }
.book-card.color-4 { border-top-color: #8a5a3c; }
.book-card.color-5 { border-top-color: #6b5b8a; }
.book-card.color-6 { border-top-color: #1a6a7a; }

.book-card.upcoming-card {
  background: linear-gradient(160deg, #f7f3fb 0%, #efe8f5 100%);
  border-top-style: dashed;
  border-top-width: 4px;
  border-top-color: #6b5b8a;
  box-shadow: 0 6px 24px rgba(107, 91, 138, 0.12);
}
.book-card.upcoming-card:hover {
  box-shadow: 0 20px 50px rgba(107, 91, 138, 0.20),
              0 0 0 1px rgba(107, 91, 138, 0.20);
}

/* ============================================================
   BOOK IMAGE AREA
   ============================================================ */
.book-image-wrap {
  background: linear-gradient(135deg, #f4f6f9, #e8edf2);
  padding: 50px 20px 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 420px;
}
.book-card.upcoming-card .book-image-wrap {
  background: linear-gradient(135deg, #f4f1ea, #eee8f5);
}

/* ============================================================
   FLIP CONTAINER
   ============================================================ */
.book-flip {
  position: relative;
  width: 220px;
  height: 330px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 15px 35px rgba(15, 44, 76, 0.25);
  border-radius: 4px;
}
.book-card:hover .book-flip {
  transform: rotateY(180deg);
}

.book-front,
.book-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-front img,
.book-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-back {
  transform: rotateY(180deg);
}

.placeholder-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: bold;
  color: #fff;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  line-height: 1.3;
  padding: 20px;
  text-align: center;
}

/* ============================================================
   BADGES & RIBBON
   ============================================================ */
.coming-soon-ribbon {
  position: absolute;
  top: 24px;
  left: 12px;
  background: linear-gradient(135deg, #6b5b8a, #8a7bb0);
  color: #fff;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 7px 18px;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(107, 91, 138, 0.35);
  white-space: nowrap;
  animation: pulseRibbon 2.4s ease-in-out infinite;
}
@keyframes pulseRibbon {
  0%, 100% { box-shadow: 0 4px 12px rgba(107, 91, 138, 0.35); }
  50%      { box-shadow: 0 4px 20px rgba(107, 91, 138, 0.60); }
}

.stage-badge {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #6b5b8a;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 5;
  border: 1.5px solid #c9bde0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  white-space: nowrap;
}

.page-count-badge {
  position: absolute;
  top: 24px;
  right: 20px;
  background: rgba(15, 44, 76, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 20px;
  z-index: 5;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  text-transform: uppercase;
}

/* ============================================================
   BOOK INFO PANEL
   ============================================================ */
.book-info {
  padding: 25px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.book-info h4 {
  font-size: 1.35rem;
  color: #0f2c4c;
  line-height: 1.3;
  font-weight: 700;
}
.book-info .subtitle {
  color: #6b7280;
  font-size: 0.93rem;
  font-style: italic;
}
.book-info .description {
  color: #4b5563;
  font-size: 0.94rem;
  margin-top: 5px;
  line-height: 1.55;
 /* NEW LINES TO TRUNCATE TEXT */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-info {
  font-size: 0.83rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* ============================================================
   BOOK METADATA
   ============================================================ */
.book-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8f6f0;
  border-left: 3px solid #d9c48a;
  border-radius: 6px;
  font-size: 0.76rem;
  color: #4b5563;
  letter-spacing: 0.2px;
}
.book-metadata span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.book-metadata .meta-label {
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.6px;
}
.book-metadata .meta-value {
  color: #0f2c4c;
  font-weight: 600;
}

/* ============================================================
   BOOK META STRIP
   ============================================================ */
.book-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}
.price {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f2c4c;
  font-family: 'Fraunces', Georgia, serif;
}
.stock {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.in-stock {
  background: #e3f0e8;
  color: #2b6e4a;
  border: 1px solid #b8d8c4;
}
.out-stock {
  background: #fbe9e9;
  color: #a53030;
  border: 1px solid #ecc4c4;
}

/* ============================================================
   BUY BUTTON
   ============================================================ */
.buy-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #0f2c4c, #1a6a7a);
  color: #fff;
  text-decoration: none;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: 0 6px 16px rgba(15, 44, 76, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.buy-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}
.buy-btn:hover::after { left: 100%; }
.buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 44, 76, 0.35);
  filter: brightness(1.08);
}
.buy-btn:active { transform: translateY(0); }
.buy-note {
  font-size: 0.66rem;
  color: #9ca3af;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ============================================================
   UPCOMING META STRIP
   ============================================================ */
.upcoming-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0d8ec;
}
.upcoming-meta .expected {
  font-size: 0.88rem;
  color: #6b5b8a;
  font-weight: 600;
}
.upcoming-note {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #ece5f5;
  color: #6b5b8a;
  border: 1px solid #c9bde0;
}

/* ============================================================
   ABOUT THE AUTHOR
   ============================================================ */
.about-section {
  margin-top: 0;
  background: linear-gradient(160deg, #ffffff 0%, #fdf6ec 100%);
  border-radius: 16px;
  padding: 55px 50px;
  box-shadow: 0 12px 40px rgba(15, 44, 76, 0.08);
  position: relative;
  overflow: hidden;
  border-top: 4px solid #0f2c4c;
}
.about-section::before {
  content: '"';
  position: absolute;
  top: -40px; right: 30px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18rem;
  color: rgba(15, 44, 76, 0.04);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
}
.about-heading {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}
.about-heading .eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #b8873a;
  font-weight: 700;
  margin-bottom: 10px;
}
.about-heading h2 {
  font-size: 2.3rem;
  color: #0f2c4c;
  font-weight: 700;
}
.about-heading .divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #0f2c4c, #d9c48a);
  margin: 16px auto 0;
  border-radius: 3px;
}
.about-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 45px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.author-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f2c4c, #1a6a7a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d9c48a;
  font-size: 4rem;
  font-weight: 700;
  font-family: 'Fraunces', Georgia, serif;
  box-shadow: 0 12px 32px rgba(15, 44, 76, 0.25);
  position: relative;
  overflow: hidden;
  letter-spacing: 2px;
  transition: box-shadow 0.3s ease;
}
.author-photo:hover {
  box-shadow: 0 16px 42px rgba(184, 135, 58, 0.35),
              0 0 0 2px rgba(217, 196, 138, 0.5);
}
.author-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.author-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(217,196,138,0.15), transparent 60%);
  pointer-events: none;
}
.author-role {
  text-align: center;
  margin-top: 16px;
  font-size: 0.78rem;
  color: #b8873a;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.about-text p {
  color: #4b5563;
  font-size: 0.98rem;
  margin-bottom: 16px;
  text-align: justify;
  line-height: 1.7;
}
.about-text p:first-of-type {
  font-size: 1.02rem;
  color: #2c3e50;
}
.about-text p:first-of-type::first-letter {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 3.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.9;
  padding: 4px 10px 0 0;
  color: #0f2c4c;
}
.about-highlight {
  margin-top: 22px;
  padding: 20px 24px;
  background: #fbf6ea;
  border-left: 4px solid #b8873a;
  border-radius: 8px;
}
.about-highlight .hl-label {
  font-size: 0.7rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #b8873a;
  font-weight: 700;
  margin-bottom: 8px;
}
.about-highlight p {
  color: #4b5563;
  font-size: 0.94rem;
  margin: 0;
  text-align: left;
  line-height: 1.65;
}
.about-highlight p::first-letter { all: unset; }
.about-highlight strong { color: #0f2c4c; }
.rti-callout {
  margin-top: 18px;
  padding: 18px 22px;
  background: #eef4f5;
  border-radius: 8px;
  border-left: 4px solid #1a6a7a;
  font-size: 0.93rem;
  color: #1f4d57;
  line-height: 1.65;
}
.rti-callout strong { color: #0f2c4c; }
.reader-invite {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.94rem;
  color: #6b7280;
  font-style: italic;
}
.about-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 20px;
  background: #0f2c4c;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 18px rgba(15, 44, 76, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}
.about-email::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.7s ease;
  pointer-events: none;
}
.about-email:hover::after { left: 100%; }
.about-email:hover {
  transform: translateY(-2px);
  background: #14476b;
  box-shadow: 0 10px 26px rgba(15, 44, 76, 0.35);
}

/* ============================================================
   REVIEWS / PRAISE — INVERTED NAVY VARIANT
   ============================================================ */
.reviews-heading {
  margin-top: 0;
}
.reviews-heading h2 {
  color: #ffffff;
}
.reviews-heading h2::after {
  background: linear-gradient(90deg, #d9c48a, #f0dfa8, #d9c48a);
  background-size: 200% 100%;
}
.reviews-heading p {
  color: #c9d4dd;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 10px;
}
.review-card {
  position: relative;
  background: linear-gradient(160deg, #0f2c4c 0%, #14476b 100%);
  border-radius: 14px;
  padding: 32px 28px 26px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.30);
  border-top: 3px solid #d9c48a;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.40),
              0 0 0 1px rgba(217, 196, 138, 0.30);
}
.review-quote-mark {
  position: absolute;
  top: 8px;
  left: 20px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 4.5rem;
  line-height: 1;
  color: rgba(217, 196, 138, 0.45);
  pointer-events: none;
}
.review-quote {
  color: #e8eef3;
  font-size: 0.96rem;
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 20px;
  padding-top: 20px;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}
.review-attribution {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
  margin-top: auto;
}
.review-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}
.review-role {
  font-size: 0.78rem;
  color: #d9c48a;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-top: 4px;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  margin-top: 0;
  background: linear-gradient(160deg, #ffffff 0%, #fdf6ec 100%);
  border-radius: 16px;
  padding: 50px 40px;
  color: #2c3e50;
  text-align: center;
  box-shadow: 0 12px 40px rgba(15, 44, 76, 0.08);
  border-top: 4px solid #0f2c4c;
  position: relative;
  overflow: hidden;
}
.contact-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,196,138,0.18), transparent 70%);
  pointer-events: none;
}
.contact-section h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #0f2c4c;
  font-weight: 700;
}
.contact-section > p {
  margin-bottom: 32px;
  font-size: 0.98rem;
  color: #6b7280;
  font-style: italic;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-item {
  background: #ffffff;
  border: 1px solid #ece5d5;
  border-radius: 12px;
  padding: 24px 20px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.contact-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: #d9c48a;
  transition: width 0.25s ease;
}
.contact-item:hover::before { width: 6px; }
.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 44, 76, 0.12);
  border-color: #d9c48a;
}
.contact-item:nth-child(1)::before { background: #2c6e8f; }
.contact-item:nth-child(2)::before { background: #b8873a; }
.contact-item.whatsapp-item {
  background: #e7f7ee;
  border-color: #b8e0c8;
}
.contact-item.whatsapp-item::before { background: #25D366; }
.contact-item.whatsapp-item:hover {
  border-color: #25D366;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.20);
}
.contact-item.whatsapp-item .label { color: #128C7E; }
.contact-item.whatsapp-item .value a { color: #075E54; }
.contact-item.whatsapp-item .value a:hover {
  color: #128C7E;
  border-bottom-color: #128C7E;
}
.contact-item .icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 10px;
}
.contact-item .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #b8873a;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact-item .value {
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-word;
  color: #0f2c4c;
}
.contact-item .value a {
  color: #0f2c4c;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.contact-item .value a:hover {
  color: #1a6a7a;
  border-bottom-color: #1a6a7a;
}

/* ============================================================
   BULK ORDERS CALLOUT
   ============================================================ */
.bulk-orders {
  margin-top: 40px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fbf6ea, #fefaf0);
  border: 1px dashed #d9c48a;
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.bulk-orders .bulk-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.bulk-orders .bulk-text strong {
  display: block;
  font-size: 1.02rem;
  color: #0f2c4c;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.bulk-orders .bulk-text p {
  font-size: 0.92rem;
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 45px 20px 50px;
  color: #c9d4dd;
  font-size: 0.88rem;
  background: linear-gradient(160deg, #0f2c4c 0%, #14476b 100%);
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 3px;
  background: linear-gradient(90deg, transparent, #d9c48a, transparent);
  border-radius: 3px;
}
.footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: #c9d4dd;
}
.footer-tagline {
  margin-top: 10px;
  font-style: italic;
  color: #d9c48a;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  font-family: 'Fraunces', Georgia, serif;
}
.footer-legal-links {
  margin: 12px 0;
  font-size: 0.82rem;
}
.footer-legal-links a {
  color: #c9d4dd;
  text-decoration: none;
  margin: 0 6px;
  transition: color 0.2s;
}
.footer-legal-links a:hover {
  color: #d9c48a;
  text-decoration: underline;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0f2c4c, #1a6a7a);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 44, 76, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, filter 0.2s;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.book-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease-out forwards;
}
.book-card:nth-child(1) { animation-delay: 0.05s; }
.book-card:nth-child(2) { animation-delay: 0.15s; }
.book-card:nth-child(3) { animation-delay: 0.25s; }
.book-card:nth-child(4) { animation-delay: 0.35s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Generic scroll-reveal hook */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  background: #fbf8f3;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s, visibility 0.4s;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
#preloader img {
  width: 80px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 860px) {
  .about-layout { grid-template-columns: 1fr; gap: 30px; }
  .author-photo { max-width: 180px; margin: 0 auto; }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 600px) {

  /* ---- Header on mobile: book wall + glass card ---- */
  header {
    padding: 26px 14px 30px;
    background:
      linear-gradient(135deg, rgba(15, 44, 76, 0.55) 0%,
                              rgba(20, 71, 107, 0.50) 55%,
                              rgba(26, 106, 122, 0.60) 100%),
      url('./images/header-bg.jpg') center / cover no-repeat,
      linear-gradient(135deg, #0f2c4c 0%, #14476b 50%, #1a6a7a 100%);
    background-position: 35% center;
  }

  /* Keep the animated glow subtle on mobile */
  header::after {
    inset: -10%;
    animation-duration: 18s;
  }

  /* Glass card — slightly more opaque for legibility on small screens */
  .header-inner {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    background: rgba(253, 251, 247, 0.82);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(217, 196, 138, 0.60);
    border-radius: 16px;
    padding: 24px 20px 22px;
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.85),
      inset 0 -1px 0 rgba(217, 196, 138, 0.25);
  }
  .header-inner::before {
    border-radius: 16px;
  }

  header h1 { font-size: 1.7rem; }
  .header-eyebrow { font-size: 0.62rem; letter-spacing: 2.2px; }
  .header-divider { margin: 14px auto 16px; }
  .header-tagline { font-size: 1rem; }
  .header-subtagline { font-size: 0.82rem; }
  .header-chips span { font-size: 0.66rem; padding: 4px 10px; }

  /* ---- Section bands ---- */
  .section-band { padding: 45px 16px; }

  /* ---- About section ---- */
  .about-section { padding: 35px 24px; margin-top: 0; }
  .about-heading h2 { font-size: 1.8rem; }
  .about-text p:first-of-type::first-letter { font-size: 2.4rem; }

  /* ---- Section headings ---- */
  .section-heading h2 { font-size: 1.6rem; }

  /* ---- Shop All button ---- */
  .shop-all-btn { padding: 12px 24px; font-size: 0.88rem; }
  .shop-all-note { font-size: 0.74rem; }

  /* ---- Contact section ---- */
  .contact-section { padding: 35px 20px; }
  .contact-section h3 { font-size: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }

  /* ---- Book card image area ---- */
  .book-image-wrap {
    padding: 35px 16px 60px;
    min-height: 360px;
  }
  .book-flip {
    width: 180px;
    height: 270px;
  }
  .page-count-badge {
    font-size: 0.65rem;
    padding: 5px 10px;
    top: 20px;
    right: 14px;
  }
  .coming-soon-ribbon {
    font-size: 0.62rem;
    padding: 6px 14px;
    top: 20px;
    left: 12px;
  }
  .stage-badge {
    font-size: 0.62rem;
    bottom: 20px;
    padding: 4px 11px;
  }

  /* ---- Book meta strip ---- */
  .book-meta { flex-direction: column; align-items: stretch; gap: 12px; }
  .price { text-align: center; }
  .buy-wrap { align-items: center; }
  .buy-btn { width: 100%; justify-content: center; }

  .upcoming-meta { flex-direction: column; gap: 10px; align-items: center; }

  /* ---- Back to top ---- */
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }

  /* ---- Bulk orders callout ---- */
  .bulk-orders { flex-direction: column; gap: 12px; text-align: center; }
  .bulk-orders .bulk-icon { font-size: 1.6rem; }

  /* ---- Reviews ---- */
  .reviews-grid { grid-template-columns: 1fr; gap: 20px; }
  .review-card { padding: 26px 22px 22px; }
  .reviews-heading { margin-top: 0; }

  /* ---- Footer ---- */
  footer { padding: 35px 16px 40px; }
}
/* ============================================================
   CART ICON (floating button, top-right)
   ============================================================ */
.cart-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f2c4c, #1a6a7a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9000;
  box-shadow: 0 8px 24px rgba(15, 44, 76, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cart-icon:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 30px rgba(15, 44, 76, 0.45);
}
.cart-icon-symbol {
  font-size: 1.3rem;
  line-height: 1;
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #d9c48a;
  color: #0f2c4c;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  transition: transform 0.2s;
}
.cart-count.bump {
  transform: scale(1.35);
}

/* ============================================================
   CART OVERLAY (dim background when panel is open)
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 44, 76, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 9001;
  backdrop-filter: blur(2px);
}
.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   CART PANEL (slides in from right)
   ============================================================ */
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #fdfbf7;
  box-shadow: -12px 0 40px rgba(15, 44, 76, 0.25);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9002;
  display: flex;
  flex-direction: column;
}
.cart-panel.open {
  transform: translateX(0);
}

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid #ece5d5;
  background: linear-gradient(135deg, #0f2c4c, #14476b);
  color: #fff;
}
.cart-panel-header h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
}
.cart-close {
  background: transparent;
  border: none;
  color: #d9c48a;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  transition: transform 0.2s;
}
.cart-close:hover { transform: scale(1.2); }

.cart-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.cart-empty {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f0e9dc;
  gap: 12px;
}
.cart-item-info { flex: 1; }
.cart-item-title {
  font-weight: 600;
  color: #0f2c4c;
  font-size: 0.94rem;
  margin-bottom: 4px;
}
.cart-item-meta {
  font-size: 0.82rem;
  color: #6b7280;
}
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.cart-item-price {
  font-weight: 700;
  color: #0f2c4c;
  font-size: 0.94rem;
}
.cart-item-remove {
  background: transparent;
  border: none;
  color: #b8873a;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.cart-item-remove:hover { color: #a53030; }

.cart-panel-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid #ece5d5;
  background: #fbf6ea;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f2c4c;
  margin-bottom: 14px;
}
.cart-checkout-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #b8873a, #d9c48a);
  color: #0f2c4c;
  border: none;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 8px 24px rgba(184, 135, 58, 0.35);
}
.cart-checkout-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 30px rgba(184, 135, 58, 0.45);
}

/* ============================================================
   ADD TO CART BUTTON (on book cards)
   ============================================================ */
.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #b8873a, #d9c48a);
  color: #0f2c4c;
  border: none;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(184, 135, 58, 0.30);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  white-space: nowrap;
}
.add-to-cart-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(184, 135, 58, 0.40);
}
.add-to-cart-btn.added {
  background: linear-gradient(135deg, #2b6e4a, #3a7d5e);
  color: #fff;
}

/* ============================================================
   MOBILE ADJUSTMENTS
   ============================================================ */
@media (max-width: 600px) {
  .cart-icon {
    width: 44px;
    height: 44px;
    top: 14px;
    right: 14px;
  }
  .cart-icon-symbol { font-size: 1.1rem; }
  .cart-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.66rem;
  }
  .cart-panel { width: 100%; max-width: 100%; }
}
