/* ===========================================================
   NALLUR TRAVELS — INTERACTIVE TRAVEL E-BOOK
   Layout: header → book → CTA bar, never overlapping, no scroll
   =========================================================== */

:root{
  /* --- Color tokens --- */
  --backdrop-1: #0a201e;
  --backdrop-2: #123430;
  --paper: #f6efe0;
  --paper-2: #efe4cd;
  --ink: #1d2b26;
  --ink-soft: #556059;
  --gold: #ab8552;
  --gold-light: #d9bd8b;
  --brick: #9c3b2e;
  --brick-light: #c1584a;
  --whatsapp-green: #25D366;
  --frame-dark: #0e2321;
  --shadow-deep: rgba(4, 12, 11, 0.6);
  --shadow-soft: rgba(4, 12, 11, 0.28);

  /* --- Type --- */
  --font-display: 'Fraunces', serif;
  --font-body: 'Public Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-tamil: 'Noto Sans Tamil', 'Noto Serif Tamil', Latha, Vijaya, sans-serif;

  --book-radius: 6px;

  /* --- Desktop vertical budget (header + book + CTA = 100svh) --- */
  --stage-top: 6px;
  --logo-d: 64px;
  --hdr-pad: 4px;
  --hdr-mb: 6px;
  --hdr-h: calc(var(--stage-top) + var(--logo-d) + (var(--hdr-pad) * 2) + var(--hdr-mb));

  --cta-d-h: 44px;       /* desktop CTA button height */
  --cta-bottom: 10px;    /* CTA distance from screen bottom */
  --cta-gap: 16px;       /* free space between book and CTA */

  --nav-btn-w: 46px;     /* Prev / Next button width */

  --book-h: max(340px, calc(100svh - var(--hdr-h) - var(--cta-d-h) - var(--cta-bottom) - var(--cta-gap)));
  --book-w: min(calc(100vw - 2 * (var(--nav-btn-w) + 16px)), calc(var(--book-h) * 1.4));

  /* Mobile only (overridden below) */
  --cta-h: 80px;
}

/* Short laptop screens: slimmer header + CTA so the book gets more height */
@media (min-width: 768px) and (max-height: 759px){
  :root{
    --stage-top: 4px;
    --logo-d: 48px;
    --hdr-pad: 2px;
    --hdr-mb: 4px;
    --cta-d-h: 40px;
    --cta-bottom: 8px;
    --cta-gap: 10px;
  }
}

/* Wide screens: Prev / Next show their text labels */
@media (min-width: 1400px){
  :root{ --nav-btn-w: 112px; }
}

*, *::before, *::after{ box-sizing: border-box; }

/* -----------------------------------------------------------
   NO PAGE SCROLL — ever
----------------------------------------------------------- */
html{
  height: 100%;
  overflow: hidden;
}
body{
  margin: 0;
  height: 100%;
  min-height: 100svh;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: #bd0335;
  background-image: url("../assets/banner/NT - Banner.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body.no-scroll{ overflow: hidden; }

img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }
h1,h2,h3{ font-family: var(--font-display); margin: 0; }
p{ margin: 0; }

:focus-visible{
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.6em;
}
.eyebrow--gold{ color: var(--gold-light); }
.eyebrow--brick{ color: var(--brick); }

/* ===========================================================
   COVER
   =========================================================== */
.cover{
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 2vh 12px 96px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.cover__frame{
  position: relative;
  display: inline-block;
  max-width: 96vw;
  max-height: calc(100svh - 120px);
  min-width: min(96vw, 340px);
  min-height: min(calc(100svh - 120px), 480px);
  border-radius: var(--book-radius);
  overflow: hidden;
  line-height: 0;
  border: none;
  cursor: pointer;
}
.cover__image{
  display: block;
  width: auto;
  height: auto;
  max-width: 96vw;
  max-height: calc(100svh - 120px);
  object-fit: contain;
  background: var(--frame-dark);
  cursor: pointer;
}
.cover__ink{
  position: absolute; inset: 0;
  pointer-events: none;
}
.cover.is-closing{
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  pointer-events: none;
}
.cover.is-hidden{ display: none; }

/* ===========================================================
   OPEN-BOOK BUTTON (on the cover)
   =========================================================== */
.open-book{
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 14px;
  min-width: 200px;
  background: transparent;
  border: none;
  border-radius: 18px;
  box-shadow: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
  overflow: visible;
  transition: transform 0.18s ease;
}
.open-book:active{ transform: translateX(-50%) scale(0.97); }

.open-book__label{
  position: relative;
  display: inline-block;
  color: #ffffff !important;
  font-family: var(--font-tamil);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  text-shadow: 0 2px 3px rgba(0,0,0,0.95), 0 4px 8px rgba(0,0,0,0.65);
  animation: tamilTitleIn 4s ease-in-out infinite;
}
.open-book__label::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 72px;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #e8c65b 20%, #fff1a3 50%, #e8c65b 80%, transparent);
  transform-origin: center;
  animation: tamilAccent 2.8s ease-in-out infinite;
}
@keyframes tamilTitleIn{
  0%, 100%{ opacity: 0.88; letter-spacing: 0.04em; }
  50%{ opacity: 1; letter-spacing: 0.075em; }
}
@keyframes tamilAccent{
  0%, 100%{ width: 45px; opacity: 0.55; }
  50%{ width: 95px; opacity: 1; }
}
.open-book__arrow{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #05146e;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.65);
  animation: tamilArrow 1.7s cubic-bezier(.45,0,.55,1) infinite;
}
.open-book__arrow svg{ display: block; width: 20px; height: 20px; overflow: visible; }
@keyframes tamilArrow{
  0%{ transform: translateY(-2px); }
  50%{ transform: translateY(4px); }
  100%{ transform: translateY(-2px); }
}
@media (min-width: 901px){
  .open-book{ bottom: 30px; min-width: 224px; padding: 12px 26px 16px; }
  .open-book__label{ font-size: 20px; }
  .open-book__arrow{ width: 46px; height: 46px; }
  .open-book__arrow svg{ width: 22px; height: 22px; }
}
@media (max-width: 900px){
  .open-book{ bottom: 0; min-width: 190px; padding: 9px 16px 12px; gap: 9px; }
  .open-book__label{
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-shadow: 0 2px 3px rgba(0,0,0,1), 0 4px 8px rgba(0,0,0,0.8);
  }
  .open-book__label::after{ bottom: -6px; width: 60px; }
  .open-book__arrow{ width: 36px; height: 36px; }
  .open-book__arrow svg{ width: 18px; height: 18px; }
}

/* ===========================================================
   HOME + SHARE BUTTONS
   =========================================================== */
.home-btn{
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(10,32,30,0.82);
  border: 1.5px solid #ffffff;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.home-btn:hover{
  background: rgba(10,32,30,0.96);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}
.home-btn:active{ transform: scale(0.96); }
.home-btn svg{ flex: none; width: 20px; height: 20px; color: #fff; }
.home-btn__label{ white-space: nowrap; }
body.book-open .home-btn{ display: flex; }

.share-group{
  position: fixed;
  top: 18px;
  left: 76px;
  z-index: 20;
}
.share-toggle{
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  background: rgba(6,16,15,0.78);
  border: 1.5px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.share-toggle svg{ width: 18px; height: 18px; flex: none; }
.share-toggle__label{ display: none; }
.share-toggle:hover{ background: rgba(6,16,15,0.92); transform: translateY(-2px); }
.share-toggle:active{ transform: scale(0.94); }

.share-menu{
  position: absolute;
  top: 52px; left: 0;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(6,16,15,0.92);
  border: 1.5px solid rgba(217,189,139,0.35);
  box-shadow: 0 14px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.share-group.is-open .share-menu{
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.share-menu__item{
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.share-menu__item svg{ width: 20px; height: 20px; flex: none; }
.share-menu__item:hover{ background: rgba(255,255,255,0.08); transform: translateX(2px); }
.share-menu__item--whatsapp svg{ color: #25D366; }
.share-menu__item--facebook svg{ color: #1877F2; }

/* ===========================================================
   BOOK HEADER (logo + title)
   =========================================================== */
.book-header{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: max-content;
  max-width: 92%;
  margin: 0 auto 12px;
  padding: 4px;
}
.book-header__logo{
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55);
}
.book-header--no-logo .book-header__logo{ display: none; }

.cover-header{ display: none; }
.cover-header .book-header__text{ align-items: center; }

.book-header__text{
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.book-header__title{
  margin: 0;
  color: #fffdf5;
  font-family: var(--font-display), Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(125,95,35,0.7), 0 4px 10px rgba(0,0,0,0.85);
}
.mobile-logo-div{ display: flex; justify-content: center; }

/* ===========================================================
   BOOK STAGE
   =========================================================== */
.book-stage{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  flex-direction: column; align-items: center; justify-content: flex-start;
  padding: var(--stage-top) 12px 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.book-stage.is-active{ display: flex; }
.book-stage.is-visible{ opacity: 1; transform: translateY(0); }

.book{
  position: relative;
  perspective: 2400px;
  width: 100%;
  max-width: 720px;
}

/* ---- Two-page spread (desktop / tablet) ---- */
.spread{
  position: relative;
  display: flex;
  transform-style: preserve-3d;
  border-radius: var(--book-radius);
  box-shadow: 0 30px 60px var(--shadow-deep), 0 6px 16px var(--shadow-soft);
}
.page{
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  aspect-ratio: 7 / 10;          /* fixed page shape = stable layout */
  background: var(--paper);
  overflow: hidden;
}
.page--left{ border-radius: var(--book-radius) 0 0 var(--book-radius); }
.page--right{ border-radius: 0 var(--book-radius) var(--book-radius) 0; }

/* Each page is a size "container": text on the right page is sized in
   cqw (% of page width) so everything scales with the book and fits. */
.page__inner{
  position: absolute; inset: 0;
  background: #ffffff;
  padding: 0 !important;
  container-type: inline-size;
}

.spine-shadow{ position: absolute; top: 0; bottom: 0; width: 40px; pointer-events: none; z-index: 3; }
.spine-shadow--left{ right: 0; background: linear-gradient(to right, transparent, rgba(0,0,0,0.16)); }
.spine-shadow--right{ left: 0; background: linear-gradient(to left, transparent, rgba(0,0,0,0.16)); }

/* ---- Poster (left page) — full image, never cropped ---- */
.poster{
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
  background: var(--frame-dark);
  display: flex; align-items: center; justify-content: center;
}
.poster img{
  position: absolute; inset: 0; width: 100%; height: 100%;
  box-sizing: border-box;
  /*object-fit: contain;*/
  object-position: center;
  background: #ffffff;
  padding: 4cqw;
}
.poster__fallback{
  display: none;
  position: relative; z-index: 1; width: 100%; padding: 18px;
  color: var(--paper);
}
.poster__fallback .eyebrow{ color: rgba(246,239,224,0.75); }
.poster__fallback h3{ font-size: 1.4rem; font-weight: 500; line-height: 1.05; }
.poster.poster--broken{ background: linear-gradient(155deg, var(--backdrop-2), var(--gold) 140%); }
.poster.poster--broken img{ display: none; }
.poster.poster--broken .poster__fallback{ display: block; }
.poster__label{
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,0.75);
  background: rgba(10,25,23,0.35); padding: 4px 8px; border-radius: 3px;
}

/* ---- Poster loading spinner ---- */
.poster__loader{
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.poster.poster--loaded .poster__loader{ opacity: 0; pointer-events: none; }
.poster__spinner{
  width: 34px; height: 34px;
  border: 3px solid rgba(29,43,38,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: poster-spin 0.8s linear infinite;
}
@keyframes poster-spin{ to{ transform: rotate(360deg); } }

/* ---- Destination (right page) — NO SCROLL, scales with the page ---- */
.destination{
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 3cqw;
  padding: 5cqw 5cqw 4cqw 6cqw;
  overflow: hidden;
}
.destination__image{
  position: relative;
  flex: 1 1 0;                 /* takes whatever height the text leaves */
  min-height: 18cqw;
  max-height: 38cqw;
  border-radius: 1cqw;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.16);
  background: var(--paper-2);
  display: flex; align-items: center; justify-content: center;
}
.destination__image img{ width: 100%; height: 100%; object-fit: cover; object-position: top; }
.destination__image.img-broken img{ display: none; }
.destination__image.img-broken{ background: linear-gradient(155deg, var(--backdrop-2), var(--gold) 140%); }

.destination__body{
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.destination__country{ color: var(--ink-soft); }
.destination__name{
  font-size: 6cqw;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.2cqw;
}
.destination__duration{
  font-family: var(--font-mono);
  font-size: 2.5cqw;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.8cqw;
}
.destination__desc{
  font-size: 3.6cqw;
  line-height: 1.38;
  color: var(--ink-soft);
  margin-bottom: 2.2cqw;
}
.destination__highlights{
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.1cqw;
  font-size: 3.5cqw;
  line-height: 1.28;
}
.destination__highlights li{ display: flex; align-items: baseline; gap: 2cqw; }
.destination__highlights li::before{
  content: "";
  width: 1.2cqw; height: 1.2cqw; border-radius: 50%;
  background: var(--brick); flex: none; transform: translateY(-0.3cqw);
}

/* Ticket stub is hidden in the markup */
.ticket{ display: none !important; }

.btn{
  border: none; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.02em;
  min-height: 44px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active{ transform: scale(0.97); }

/* ===========================================================
   POSTER SHOP LINK — "Click Here" (saree posters)
   =========================================================== */
.poster__shop-link{
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #03105d;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px 10px 11px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1;
  overflow: hidden;
  border: 1px solid rgba(120,145,255,0.4);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 14px rgba(70,100,255,0.4);
  animation: shopGlowBreathe 2.8s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.poster__shop-link::before{
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: skewX(-20deg);
  animation: shopShimmer 2.6s ease-in-out infinite;
}
.poster__shop-link:hover{
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45), 0 0 20px rgba(70,100,255,0.6);
}
.poster__shop-link:hover .poster__shop-link__icon{ transform: translateX(2px); }
.poster__shop-link:active{ transform: scale(0.96); }
.poster__shop-link__icon{
  width: 16px; height: 16px; flex: none; color: #ffffff;
  position: relative; z-index: 1;
  transition: transform 0.2s ease;
}
.poster__shop-link__text{ white-space: nowrap; color: #ffffff; position: relative; z-index: 1; }

@keyframes shopShimmer{
  0%{ left: -60%; }
  60%, 100%{ left: 130%; }
}
@keyframes shopGlowBreathe{
  0%, 100%{ box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 14px rgba(70,100,255,0.4); }
  50%{ box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 22px rgba(70,100,255,0.7); }
}

/* Old inline WhatsApp strip is not used any more */
.whatsapp-inline{ display: none !important; }

/* ===========================================================
   MOBILE SINGLE PAGE — poster only
   =========================================================== */
.single-page{ display: none; position: relative; }
.single-page__inner{
  background: var(--frame-dark);
  border-radius: var(--book-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: var(--mobile-poster-ratio, 3 / 4);
  max-height: 78svh;
}
.mobile-card{ display: flex; flex-direction: column; min-height: 0; height: 100%; }
.mobile-card--poster{ display: flex; flex-direction: column; height: 100%; }
.mobile-card--poster .mobile-card__poster{
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--frame-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-card--poster .mobile-card__poster img{
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px;   /* must match MOBILE_POSTER_PAD in app.js */
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}
.mobile-card--poster .mobile-card__poster.img-broken{
  background: linear-gradient(155deg, var(--backdrop-2), var(--gold) 140%);
}
.mobile-card--poster .mobile-card__poster.img-broken img{ display: none; }
.mobile-card--poster .mobile-card__poster .poster__label{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(10,25,23,0.35);
  padding: 4px 8px;
  border-radius: 3px;
}
.mobile-card--poster .mobile-card__poster .poster__loader{ background: var(--frame-dark); }
.mobile-card--poster .mobile-card__poster .poster__spinner{
  border-color: rgba(255,255,255,0.18);
  border-top-color: var(--gold-light);
}
.mobile-card--poster .mobile-card__poster.poster--loaded .poster__loader{
  opacity: 0;
  pointer-events: none;
}

/* ===========================================================
   PAGE-TURN FLAP (shared mechanics)
   =========================================================== */
.flap-layer{ position: absolute; inset: 0; pointer-events: none; }
.flap{
  position: absolute; top: 0; bottom: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.flap__face{
  position: absolute; inset: 0;
  background: var(--paper);
  backface-visibility: hidden;
  overflow: hidden;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
}
.flap__face--back{ transform: rotateY(180deg); }
.flap__shade{
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.28), transparent 40%);
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
.flap__edge{
  position: absolute; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,0.18), transparent);
  pointer-events: none;
}
.flap--right{
  left: 50%; width: 50%;
  transform-origin: left center;
  border-radius: 0 var(--book-radius) var(--book-radius) 0;
}
.flap--right .flap__edge{ left: 0; }
.flap--right.is-turning{ transition: transform 0.72s cubic-bezier(.55,.06,.3,1); }
.flap--right.is-turning .flap__shade{ opacity: 1; }

.flap--left{
  left: 0; width: 50%;
  transform-origin: right center;
  border-radius: var(--book-radius) 0 0 var(--book-radius);
}
.flap--left .flap__edge{ right: 0; }
.flap--left.is-turning{ transition: transform 0.72s cubic-bezier(.55,.06,.3,1); }
.flap--left.is-turning .flap__shade{ opacity: 1; }

.flap--mobile{ left: 0; width: 100%; }
.flap--mobile.flap--forward{ transform-origin: left center; }
.flap--mobile.flap--backward{ transform-origin: right center; }
.flap--mobile.is-turning{ transition: transform 0.6s cubic-bezier(.55,.06,.3,1); }
.flap--mobile.is-turning .flap__shade{ opacity: 1; }

/* ===========================================================
   PAGE INDICATOR (hidden)
   =========================================================== */
.stamp{ display: none; }

/* ===========================================================
   NAV CONTROLS (Prev / Next)
   =========================================================== */
.nav-controls{
  position: fixed;
  z-index: 2;
  display: flex;
  gap: 14px;
  pointer-events: none;
}
.nav-btn{
  pointer-events: auto;
  background: #fcaf02;
  border: 1px solid rgba(217,189,139,0.35);
  color: #ffffff;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.8rem; letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.nav-btn:hover{ background: #fcaf02; }
.nav-btn:active{ transform: scale(0.96); }
.nav-btn[disabled]{ opacity: 0.3; pointer-events: none; }
.nav-btn svg{ color: #fff; width: 18px; height: 18px; flex: none; }

/* ===========================================================
   ENQUIRY MODAL
   =========================================================== */
.modal{
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal.is-open{ opacity: 1; pointer-events: auto; }
.modal__backdrop{
  position: absolute; inset: 0;
  background: rgba(6,16,15,0.6);
  backdrop-filter: blur(2px);
}
.modal__panel{
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  max-height: 88svh; overflow-y: auto;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  padding: 26px 22px 28px;
  transform: translateY(16px);
  transition: transform 0.28s ease;
}
.modal.is-open .modal__panel{ transform: translateY(0); }
@media (min-width: 640px){
  .modal{ align-items: center; }
  .modal__panel{ border-radius: 14px; }
}
.modal__close{
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid rgba(29,43,38,0.15);
  font-size: 1.1rem; line-height: 1; color: var(--ink-soft);
}
.modal__title{ font-size: 1.5rem; font-weight: 500; margin-bottom: 18px; }

.enquiry-form{ display: flex; flex-direction: column; gap: 14px; }
.field{ display: flex; flex-direction: column; gap: 6px; font-size: 0.78rem; color: var(--ink-soft); }
.field em{ font-style: italic; opacity: 0.7; }
.field input, .field textarea{
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  border: 1px solid rgba(29,43,38,0.18); border-radius: 8px;
  padding: 11px 12px; background: #fff; resize: vertical;
}
.field input:focus, .field textarea:focus{ outline: none; border-color: var(--gold); }
.field-row{ display: flex; gap: 12px; }
.field-row .field{ flex: 1; }
.btn--send{
  background: var(--brick); color: var(--paper);
  text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.06em;
  margin-top: 4px;
}
.btn--send:hover{ background: var(--brick-light); }
.enquiry-form__note{ font-size: 0.72rem; color: var(--ink-soft); text-align: center; }
.enquiry-form.is-sent .field, .enquiry-form.is-sent .btn--send{ display: none; }
.form-success{ display: none; text-align: center; padding: 18px 0; font-family: var(--font-display); }
.enquiry-form.is-sent + .form-success{ display: block; }

/* ===========================================================
   CTA BAR — Enquiry Now | Nallur Shoppe  (compact)
   =========================================================== */
.cta-bar{
  position: fixed;
  left: 0; right: 0;
  bottom: var(--cta-bottom);
  z-index: 8;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  pointer-events: none;
}
.cta-btn{
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: var(--cta-d-h);
  padding: 4px 14px 4px 5px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4), 0 0 12px rgba(255,255,255,0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.cta-btn:hover{ transform: translateY(-2px); filter: brightness(1.08); }
.cta-btn:active{ transform: scale(0.97); }

.cta-btn--enquiry{
  background: linear-gradient(90deg, #0f9d4a, #25D366);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4), 0 0 14px rgba(37,211,102,0.55);
}
.cta-btn--shop{
  background: linear-gradient(90deg, #ff9a14, #e0243c);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4), 0 0 14px rgba(255,140,40,0.45);
}
.cta-btn__icon{
  flex: none;
  width: calc(var(--cta-d-h) - 10px);
  height: calc(var(--cta-d-h) - 10px);
  border-radius: 50%;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.cta-btn__icon svg{ width: 18px; height: 18px; }
.cta-btn--enquiry .cta-btn__icon{ color: #25D366; }
.cta-btn--shop .cta-btn__icon{ color: #ff8a00; }

.cta-btn__text{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}
.cta-btn__text strong{ font-size: 12px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; }
.cta-btn__text small{ font-size: 10px; font-weight: 500; opacity: 0.95; white-space: nowrap; }
.cta-btn__chev{ flex: none; width: 14px; height: 14px; }
.cta-btn__chev svg{ width: 100%; height: 100%; }

/* ===========================================================
   DESKTOP / TABLET (768px and up)
   Header → book → CTA, each in its own space, nothing overlaps
   =========================================================== */
@media (min-width: 768px){

  .book-header{
    margin: 0 auto var(--hdr-mb);
    padding: var(--hdr-pad);
    gap: 14px;
  }
  .book-header__logo{ width: var(--logo-d); height: var(--logo-d); }

  .book{
    width: var(--book-w);
    max-width: none;
  }

  /* Prev / Next sit just outside the book, level with its middle */
  .nav-controls{
    left: 50%;
    right: auto;
    bottom: auto;
    top: calc(var(--hdr-h) + var(--book-w) / 2.8);
    width: calc(var(--book-w) + 2 * (var(--nav-btn-w) + 16px));
    transform: translate(-50%, -50%);
    justify-content: space-between;
    padding: 0;
  }
  .nav-btn{ width: var(--nav-btn-w); padding: 0; }
  .nav-btn span{ display: none; }
}
@media (min-width: 1400px){
  .nav-btn span{ display: inline; }
}

/* ===========================================================
   PHONES (767px and below) — poster only, one-row header
   =========================================================== */
@media (max-width: 767px){

  :root{
    --cta-h: 72px;
    --m-hdr-h: 84px;
    --m-logo: 72px;
    --m-icon: 34px;
    --m-icon-gap: 8px;
    --m-edge: 10px;
  }

  .spread{ display: none; }
  .single-page{ display: block; width: 100%; }
  .book{ max-width: 420px; }

  /* Cover */
  .cover{
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px calc(var(--cta-h) + 6px);
    justify-content: center;
  }
  .cover-header{
    display: flex;
    position: relative;
    z-index: 2;
    gap: 10px;
    margin-bottom: 4px;
  }
  .cover-header .book-header__logo{ width: 80px; height: 80px; }
  .cover__frame{
    max-height: calc(100svh - 96px - var(--cta-h) - 22px);
    min-height: 0;
  }
  .cover__image{
    max-width: 92vw;
    max-height: calc(100svh - 96px - var(--cta-h) - 22px);
  }

  /* Book stage */
  .book-stage{
    padding: 0 10px var(--cta-h);
  }
  .single-page__inner{
    max-height: calc(100svh - var(--m-hdr-h) - 8px - var(--cta-h) - 14px);
  }

  /* Header: logo (left) | title (center) | icons (right) */
  #bookHeader{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: var(--m-hdr-h);
    margin: 0 0 8px;
    padding: 0 calc(var(--m-icon) * 2 + var(--m-icon-gap) + var(--m-edge) * 2) 0 2px;
  }
  #bookHeader .mobile-logo-div{ flex: none; }
  #bookHeader .book-header__logo{ width: var(--m-logo); height: var(--m-logo); }
  #bookHeader .book-header__text{
    flex: 1;
    min-width: 0;
    align-items: center;
    justify-content: center;
  }
  #bookHeader .book-header__title,
  .cover-header .book-header__title{
    display: block;
    font-size: clamp(1.05rem, 5.4vw, 1.4rem);
    letter-spacing: 0;
    white-space: nowrap;
  }

  /* Share + Home icons */
  .share-group{
    top: calc((var(--m-hdr-h) - var(--m-icon)) / 2);
    right: calc(var(--m-edge) + var(--m-icon) + var(--m-icon-gap));
    left: auto;
  }
  .home-btn{
    top: calc((var(--m-hdr-h) - var(--m-icon)) / 2);
    right: var(--m-edge);
    left: auto;
    width: var(--m-icon);
    height: var(--m-icon);
    padding: 0;
    gap: 0;
    border-radius: 50%;
  }
  .home-btn:hover{ transform: none; }
  .home-btn__label{ display: none; }
  .share-toggle{ width: var(--m-icon); height: var(--m-icon); }
  .share-toggle svg,
  .home-btn svg{ width: 16px; height: 16px; }
  .share-menu{
    top: calc(100% + 8px);
    right: 0;
    left: auto;
  }

  /* Prev / Next centred on the poster (top set by app.js) */
  .nav-controls{
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    justify-content: space-between;
    padding: 0 8px;
    transition: top 0.25s ease;
  }
  .nav-btn{
    min-height: 40px;
    width: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    gap: 0;
  }
  .nav-btn span{ display: none; }
  .nav-btn svg{ width: 16px; height: 16px; }

  /* Shop link on saree posters */
  .poster__shop-link{ padding: 8px 14px 8px 10px; font-size: 0.72rem; right: 15px; bottom: 60px; }
  .poster__shop-link__icon{ width: 14px; height: 14px; }

  /* CTA: two buttons side by side */
  .cta-bar{ bottom: 20px; gap: 8px; padding: 0 8px; }
  .cta-btn{
    width: calc(50% - 4px);
    min-height: 52px;
    gap: 7px;
    padding: 5px 8px 5px 5px;
  }
  .cta-btn__icon{ width: 32px; height: 32px; }
  .cta-btn__icon svg{ width: 18px; height: 18px; }
  .cta-btn__chev{ display: none; }
  .cta-btn__text small{ line-height: 1.15; white-space: normal; }
}

@media (min-width: 481px) and (max-width: 767px){
  .book{ max-width: 1200px; }
}

@media (max-width: 374px){
  :root{
    --cta-h: 68px;
    --m-hdr-h: 74px;
    --m-logo: 62px;
    --m-icon: 30px;
    --m-icon-gap: 6px;
    --m-edge: 8px;
  }
  #bookHeader{ gap: 6px; }
  .cover-header .book-header__logo{ width: 70px; height: 70px; }
  .share-toggle svg,
  .home-btn svg{ width: 14px; height: 14px; }
}

/* ===========================================================
   REDUCED MOTION
   =========================================================== */
@media (prefers-reduced-motion: reduce){
  .flap--right.is-turning, .flap--left.is-turning, .flap--mobile.is-turning{
    transition-duration: 0.01ms;
  }
  .cover.is-closing{ transition-duration: 0.01ms; }
  .book-stage.is-visible{ transition-duration: 0.01ms; }
}