/* ============================================================
   MY COMIC — Bubblegum & Orchid (Lightly Bleached Edition)
   Exact colors: Pink #ff95e4 · Purple #ea69ff
   ============================================================ */

:root {
  /* Your exact colors */
  --pink: #ff95e4;
  --purple: #ea69ff;
  
  /* Lighter shades for backgrounds/highlights */
  --pink-light: #ffc4ef;
  --purple-light: #f2b3ff;
  
  /* Deeper shades for shadows, text, and depth */
  --pink-deep: #e066b8;
  --purple-deep: #c43de0;
  
  /* Text color: Slightly lightened warm plum for a softer look */
  --ink: #5a2a63; 
  
  --cream: #fffaf5;
  --card: #ffffff;
  --font-display: 'Bangers', 'Impact', cursive;
  --font-body: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --flip: 0.85s;
}

* { box-sizing: border-box; }
::selection { background: var(--pink-light); color: var(--ink); }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 30px 15px 40px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  isolation: isolate;
  /* Bleached closer to pure white, just a hint of color */
  background:
    linear-gradient(120deg,
      #fff7fb 0%,
      #fcf4ff 25%,
      #fff9fc 50%,
      #f8eeff 75%,
      #fff7fb 100%);
  background-size: 300% 300%;
  animation: bg-shift 22s ease-in-out infinite;
}

@keyframes bg-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

body::before {
  content: "";
  position: fixed;
  inset: -30px;
  z-index: -2;
  background:
    /* Increased opacity to whiten the background image just a little bitty */
    linear-gradient(120deg,
      rgba(255, 247, 251, 0.75) 0%,
      rgba(252, 244, 255, 0.75) 35%,
      rgba(255, 249, 252, 0.75) 65%,
      rgba(248, 238, 255, 0.7) 100%),
    url("images/background.webp") center / cover no-repeat;
  filter: blur(14px) saturate(1.15) brightness(1.05);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.75), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 255, 255, 0.6), transparent 55%);
}

.bubbles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bubble {
  position: absolute;
  bottom: -150px;
  border-radius: 50%;
  opacity: 0.65;
  filter: blur(0.5px);
  object-fit: contain;
  pointer-events: none;
  animation-name: float-up;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes float-up {
  0%   { transform: translateY(0) translateX(0) scale(1);   opacity: 0; }
  10%  { opacity: 0.65; }
  50%  { transform: translateY(-55vh) translateX(30px) scale(1.1); }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-115vh) translateX(-20px) scale(0.9); opacity: 0; }
}

.masthead {
  text-align: center;
  margin-bottom: 30px;
  animation: drop-in 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 7px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--purple-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow:
    0 4px 0 var(--pink),
    0 8px 20px rgba(234, 105, 255, 0.2);
  transform: rotate(-2deg);
}

/* BRIGHT BUBBLY TITLE */
.masthead h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 4.6rem);
  letter-spacing: 0.04em;
  
  /* Bright white fill instead of dark plum */
  color: #ffffff; 
  
  /* Thick purple outline to make it pop against the light background */
  -webkit-text-stroke: 3px var(--purple);
  paint-order: stroke fill;
  
  /* Chunky pink shadow + soft purple outer glow for that 3D comic feel */
  text-shadow:
    4px 4px 0 var(--pink),
    8px 8px 0 rgba(234, 105, 255, 0.25);
    
  transform: rotate(-2deg);
  animation: wiggle 4s ease-in-out infinite;
}

.tagline {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85); /* Whiter */
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(255, 149, 228, 0.1);
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(1deg); }
}

.reader {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 12px;
}
.stage { position: relative; animation: pop-in 0.9s 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }

.book {
  position: relative;
  width: 100%;
  max-width: calc(72vh * 4 / 3);
  aspect-ratio: 4 / 3;
  margin-inline: auto;
  perspective: 2200px;
  cursor: pointer;
  outline: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  animation: float 6s 1.2s ease-in-out infinite;
}
.book:focus-visible { outline: 4px dashed var(--purple); outline-offset: 14px; border-radius: 16px; }

.backboard {
  position: absolute;
  inset: -4% -1.5%;
  z-index: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  box-shadow:
    0 30px 60px rgba(234, 105, 255, 0.3),
    0 10px 30px rgba(255, 149, 228, 0.3),
    inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}
.emboss {
  position: absolute;
  left: 25%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.bulk {
  position: absolute;
  top: 1.2%;
  bottom: 1.2%;
  width: 49%;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.bulk-right {
  left: 50%;
  border-radius: 2px 10px 10px 2px;
  background: linear-gradient(90deg, #f5ead3, #fff8e9 12%, #fbf3de);
  box-shadow:
    0 3px 0 -1px #ebe0c6,
    0 6px 0 -2px #ddd1b2,
    0 9px 0 -3px #cfc3a5,
    0 18px 26px rgba(255, 149, 228, 0.2);
}
.bulk-left {
  right: 50%;
  border-radius: 10px 2px 2px 10px;
  background: linear-gradient(270deg, #f5ead3, #fff8e9 12%, #fbf3de);
  box-shadow:
    0 3px 0 -1px #ebe0c6,
    0 6px 0 -2px #ddd1b2,
    0 9px 0 -3px #cfc3a5,
    0 18px 26px rgba(234, 105, 255, 0.2);
  opacity: 0;
  transform: scaleX(0.96);
}
.book.open-left .bulk-left { opacity: 1; transform: none; }

.floor-shadow {
  position: absolute;
  left: 4%; right: 4%; bottom: -26px;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(234, 105, 255, 0.25), transparent 68%);
  filter: blur(4px);
}

.page {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 50%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform var(--flip) cubic-bezier(0.35, 0.1, 0.25, 1);
  will-change: transform;
}
.page.flipped { transform: rotateY(-180deg); }

.front,
.back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid #e8dcc2;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.front {
  border-radius: 2px 10px 10px 2px;
  box-shadow: 3px 4px 14px rgba(255, 149, 228, 0.2);
}
.back {
  transform: rotateY(180deg);
  border-radius: 10px 2px 2px 10px;
  background: #f5ead3;
  box-shadow: -3px 4px 14px rgba(234, 105, 255, 0.2);
}

.face-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.front::after,
.back::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.front::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.03) 7%, transparent 15%),
    linear-gradient(270deg, rgba(0, 0, 0, 0.04), transparent 4%);
}
.back::after {
  background:
    linear-gradient(270deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.03) 7%, transparent 15%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04), transparent 4%);
}

.spine {
  position: absolute;
  top: -1%;
  bottom: -1%;
  left: 50%;
  width: 34px;
  transform: translateX(-50%);
  z-index: 600;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent,
    rgba(234, 105, 255, 0.4) 44%,
    rgba(234, 105, 255, 0.55) 50%,
    rgba(234, 105, 255, 0.4) 56%,
    transparent);
}

.face-paper { display: grid; place-items: center; }
.print-mark {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 2;
  color: rgba(234, 105, 255, 0.35);
  transform: rotate(-8deg);
}

.locked {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2vh, 14px);
  padding: clamp(16px, 4vw, 30px);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2), transparent 45%), /* Added a touch of white */
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.15), transparent 45%),
    linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  overflow: hidden;
}
.locked::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2.5px dashed rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  pointer-events: none;
}
.sparkles {
  font-size: clamp(1.4rem, 4vh, 2rem);
  letter-spacing: 0.3em;
  animation: bob 2s ease-in-out infinite;
}
.locked h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(74, 26, 84, 0.2);
}
.locked p {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.78rem, 2.4vw, 0.95rem);
  line-height: 1.55;
  font-weight: 500;
}
.mini-buy {
  padding: 11px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--purple-deep);
  font-weight: 700;
  font-size: clamp(0.76rem, 2.3vw, 0.92rem);
  text-decoration: none;
  border: 2.5px solid #fff;
  box-shadow:
    0 4px 0 rgba(74, 26, 84, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mini-buy:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 0 rgba(74, 26, 84, 0.1), 0 12px 24px rgba(0, 0, 0, 0.15); }
.mini-buy:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(74, 26, 84, 0.1); }
.locked-cta {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.68rem, 2vw, 0.8rem);
  font-weight: 600;
  animation: nudge 1.6s ease-in-out infinite;
}

.corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52px;
  height: 52px;
  z-index: 998;
  pointer-events: none;
  transition: opacity 0.4s;
}
.corner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(315deg, rgba(255, 149, 228, 0.25) 46%, transparent 47%);
}
.corner::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #fff, #f5ead3 55%, #e8dcc2);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  transform-origin: bottom right;
  animation: corner-lift 1.8s ease-in-out infinite;
}
.book.at-end .corner { opacity: 0; }

.progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}
.dots { display: flex; gap: 10px; }
.dot {
  width: 13px; height: 13px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
  box-shadow: 0 2px 6px rgba(255, 149, 228, 0.2);
}
.dot:hover { transform: scale(1.3); }
.dot.active {
  background: var(--purple);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(234, 105, 255, 0.25), 0 3px 10px rgba(234, 105, 255, 0.3);
  transform: scale(1.25);
}
.dot:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

.page-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85); /* Whiter */
  padding: 4px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hint {
  margin: 10px 0 0;
  min-height: 20px;
  text-align: center;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.7;
}

.offer { max-width: 430px; margin: 44px auto 0; }
.offer-card {
  position: relative;
  padding: 32px 24px 28px;
  background: #fff;
  border-radius: 28px;
  box-shadow:
    0 20px 44px rgba(234, 105, 255, 0.15),
    0 8px 20px rgba(255, 149, 228, 0.15),
    inset 0 0 0 3px rgba(255, 255, 255, 0.9);
  transform: rotate(-1deg);
  transition: transform 0.35s ease;
  overflow: hidden;
}
.offer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, var(--pink-light) 4px, transparent 5px),
    radial-gradient(circle at 85% 15%, var(--pink) 3px, transparent 4px),
    radial-gradient(circle at 90% 85%, var(--purple-light) 4px, transparent 5px),
    radial-gradient(circle at 10% 90%, var(--purple) 3px, transparent 4px),
    radial-gradient(circle at 50% 5%, var(--pink-deep) 3px, transparent 4px);
  opacity: 0.5; /* Slightly faded confetti */
  pointer-events: none;
}
.offer-card:hover { transform: rotate(0deg) translateY(-4px) scale(1.01); }

.sticker {
  position: absolute;
  font-family: var(--font-display);
  font-size: 2rem;
  pointer-events: none;
  animation: spin 8s linear infinite;
}
.sticker-a { top: -8px; right: 14px; color: var(--pink); text-shadow: 2px 2px 0 var(--purple); transform: rotate(15deg); }
.sticker-b { bottom: 10px; left: 14px; color: var(--purple); text-shadow: 2px 2px 0 var(--pink); animation-direction: reverse; }
.sticker-c { top: 50%; right: -6px; color: var(--purple-light); text-shadow: 2px 2px 0 var(--pink-deep); }

.offer-head { position: relative; text-align: center; margin-bottom: 18px; }
.offer-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--pink-deep), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.offer-head p { margin: 0; color: #7a5a85; font-size: 0.92rem; font-weight: 500; }

.perks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; position: relative; }
.perks li {
  position: relative;
  padding: 10px 14px 10px 44px;
  background: #ffffff; /* Pure white now */
  border-radius: 14px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 500;
  border: 1.5px solid rgba(255, 149, 228, 0.2);
}
.perks li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
}

.price {
  position: relative;
  padding: 20px 14px;
  margin-bottom: 18px;
  background: #ffffff; /* Pure white now */
  border: 2.5px dashed var(--pink);
  border-radius: 18px;
  text-align: center;
}
.price span, .price small { display: block; color: #7a5a85; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.price strong {
  display: block;
  margin: 6px 0;
  font-family: var(--font-display);
  font-size: 3.2rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price small { letter-spacing: 0.02em; text-transform: none; font-size: 0.82rem; }

.buy {
  display: block;
  padding: 18px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  font-family: 'Fredoka', sans-serif; /* Clean, readable font */
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border: 3px solid #fff;
  box-shadow:
    0 6px 0 var(--purple-deep),
    0 12px 24px rgba(234, 105, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.buy:hover { 
  transform: translateY(-3px) scale(1.02); 
  box-shadow: 0 9px 0 var(--purple-deep), 0 18px 30px rgba(234, 105, 255, 0.35); 
}
.buy:active { 
  transform: translateY(3px); 
  box-shadow: 0 2px 0 var(--purple-deep), 0 6px 12px rgba(234, 105, 255, 0.2); 
}

/* Make the "(FREE POSTAGE)" part slightly smaller and softer */
.buy br + * { 
  /* This targets the text after the <br> if we used spans, but since it's just text, 
     we can just let it inherit or use a span in HTML if needed. 
     For now, the simple <br> works perfectly with the line-height! */
}
.buy svg { flex: none; }

.offer.hot .buy { animation: glow 1.4s ease-in-out infinite; }

.note { margin: 14px 0 0; text-align: center; color: #7a5a85; font-size: 0.8rem; line-height: 1.5; font-weight: 500; position: relative; }

footer { margin-top: 48px; text-align: center; color: var(--ink); font-size: 0.85rem; font-weight: 600; opacity: 0.7; }
footer a { color: var(--purple); text-decoration: none; font-weight: 700; border-bottom: 2px dashed var(--pink); padding-bottom: 1px; }
footer a:hover { color: var(--pink-deep); }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(0.92); } 70% { transform: scale(1.02); } 100% { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes corner-lift { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14) translate(-2px, -2px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow {
  0%, 100% { box-shadow: 0 6px 0 var(--purple-deep), 0 12px 24px rgba(234, 105, 255, 0.25); }
  50%      { box-shadow: 0 6px 0 var(--purple-deep), 0 12px 36px rgba(255, 196, 239, 0.5), 0 0 40px rgba(255, 149, 228, 0.4); }
}

.book.shake { animation: shake 0.35s ease; }

/* ============================================================
   DESKTOP LAYOUT
   ============================================================ */
@media (min-width: 1024px) {
  body { padding: 50px 40px 60px; }
  .masthead { margin-bottom: 48px; }
  
  /* BRIGHT BUBBLY TITLE (DESKTOP) */
  .masthead h1 {
    font-size: clamp(4rem, 7vw, 6rem);
    -webkit-text-stroke: 4px var(--purple);
    text-shadow:
      5px 5px 0 var(--pink),
      10px 10px 0 rgba(234, 105, 255, 0.25);
  }
  
  .eyebrow { font-size: 0.82rem; padding: 9px 22px; }
  .tagline { font-size: 1.1rem; padding: 8px 20px; }
  .layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1400px;
    margin-inline: auto;
  }
  .reader { max-width: none; padding-inline: 0; }
  .book { max-width: 720px; animation: float 7s 1.2s ease-in-out infinite; }
  .backboard { inset: -5% -2%; border-radius: 22px; }
  .spine { width: 42px; }
  .progress { margin-top: 40px; gap: 14px; }
  .page-label { font-size: 1.3rem; padding: 6px 20px; }
  .hint { font-size: 1rem; }
  .offer {
    margin: 0;
    position: sticky;
    top: 40px;
    align-self: start;
    max-width: none;
  }
  .offer-card { padding: 40px 34px 34px; border-radius: 32px; transform: rotate(-0.8deg); }
  .offer-head h2 { font-size: clamp(2rem, 3vw, 2.6rem); }
  .offer-head p { font-size: 1rem; }
  .perks li { font-size: 1rem; padding: 14px 16px 14px 50px; }
  .perks li::before { font-size: 1.3rem; left: 14px; }
  .price strong { font-size: 3.8rem; }
  .buy { font-size: 1.35rem; padding: 20px 18px; }
  .note { font-size: 0.88rem; }
  .sticker { font-size: 2.6rem; }
  footer { margin-top: 70px; font-size: 0.95rem; }
}

@media (min-width: 1440px) {
  .layout { gap: 80px; max-width: 1500px; }
  .book { max-width: 820px; }
}

@media (min-width: 1800px) {
  body { padding: 70px 60px 80px; }
  .layout { gap: 100px; max-width: 1700px; }
  .book { max-width: 900px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body { padding: 40px 30px 50px; }
  .masthead h1 { font-size: clamp(3.5rem, 9vw, 5rem); }
  .reader { max-width: 640px; }
  .book { max-width: 600px; }
  .offer { max-width: 520px; }
  .offer-card { padding: 36px 30px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  body { animation: none; }
}

/* =========================================
   FIX: Prevent locked page content from overflowing on mobile
   ========================================= */

/* 1. The Root Fix: Force flex containers to respect their height limits */
.front, 
.locked {
  min-height: 0; /* This stops flex items from bursting out of their parents */
}

/* 2. Mobile Tweaks: Shrink the content slightly so it fits perfectly on small screens */
@media (max-width: 767px) {
  .locked {
    padding: 12px 10px; /* Reduce padding */
    gap: 6px;           /* Reduce space between elements */
  }
  
  .sparkles {
    font-size: 1.2rem;  /* Smaller stars */
    margin-bottom: 2px;
  }
  
  .locked h2 {
    font-size: 1.25rem; /* Smaller heading */
    margin: 0;
    line-height: 1.2;
  }
  
  .locked p {
    font-size: 0.75rem; /* Smaller paragraph */
    margin: 0;
    line-height: 1.4;
  }
  
  .mini-buy {
    padding: 8px 12px;  /* Smaller button */
    font-size: 0.72rem;
    margin: 2px 0;
  }
  
  .locked-cta {
    font-size: 0.65rem; /* Smaller bottom text */
  }
}