/*--------------------------------------------------------------
# HERO SECTION — FINAL REWRITE
--------------------------------------------------------------*/

/* ------------------------------
   1. HERO STRUCTURE / LAYOUT
------------------------------ */

.hero {
  padding: 0; /* important: do NOT push content down */
  position: relative;
  overflow: hidden;
}

.hero-ember {
  --background-color: #f9f6f2;
  --heading-color: #2b1a38;
  --accent-color: #e4b7a0;
  --surface-color: #fbeadf;
  --default-color: #3d2e4d;
  --contrast-color: #ffffff;

  position: relative;
  min-height: 100vh; /* ensures hero fills screen and video begins at top */
  overflow: hidden;
  color: var(--default-color);

  /* soft transparent gradient so video shows from the top */
background: linear-gradient(
  180deg,
  rgba(249, 246, 242, 0.82) 0%,
  rgba(251, 234, 223, 0.75) 45%,
  rgba(228, 183, 160, 0.42) 100%
);
}

.hero-ember .container {
  position: relative;
  z-index: 1;

  /* apply spacing INSIDE the hero, not on the hero wrapper */
  padding-top: clamp(6rem, 10vw, 7.5rem);
  padding-bottom: clamp(4rem, 6vw, 5rem);
}

/* ------------------------------
   2. TYPOGRAPHY / TITLE / SUBTITLE
------------------------------ */

.hero .book-hero-content h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--heading-color);
  line-height: 1.2;
}

.hero .book-hero-content .book-subtitle {
  font-family: var(--default-font);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: color-mix(in srgb, var(--heading-color), transparent 20%);
  margin-bottom: 1.5rem;
  font-weight: 500;
  line-height: 1.5;
}

.hero .book-hero-content .book-description {
  font-family: var(--default-font);
  margin-bottom: 2rem;
  color: var(--default-color);
  font-size: clamp(1rem, 1.8vw, 1.05rem);
  line-height: 1.65;
}


/* ------------------------------
   3. CTA BUTTONS
------------------------------ */

.hero .book-hero-content .hero-cta {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1rem);
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (max-width: 48em) {
  .hero .book-hero-content .hero-cta {
    justify-content: center;
  }
}

.hero .book-hero-content .hero-cta .btn-outline {
  padding: clamp(0.8rem, 2vw, 1rem) clamp(2.1rem, 4vw, 2.5rem);
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  font-family: var(--nav-font);
  border-radius: 9999px;

  /* exact sampled color */
  background-color: rgb(196,153,136);
  color: #ffffff;

  /* subtle structure using same base tone */
  border: 0.125rem solid color-mix(in srgb, rgb(196,153,136), #000 20%);

  transition: all 0.3s ease;
}

.hero .book-hero-content .hero-cta .btn-outline:hover {
  background-color: color-mix(in srgb, rgb(196,153,136), #fff 18%);
  border-color: color-mix(in srgb, rgb(196,153,136), #fff 28%);
  color: #ffffff;
  transform: translateY(-0.2rem);
}
/* ------------------------------
   4. BOOK COVER / GLOW
------------------------------ */

.hero .book-cover {
  position: relative;
  max-width: 25rem;
  transition: transform 0.6s ease;
  filter: drop-shadow(0 0.25rem 1.25rem rgba(0, 0, 0, 0.15));
}

.hero .book-cover img {
  width: 100%;
  border-radius: 0.75rem;
  z-index: 1;
  position: relative;
}

.hero .book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  background: radial-gradient(
    circle at 50% 55%,
    color-mix(in srgb, var(--accent-color), transparent 60%) 0%,
    transparent 70%
  );
  opacity: 0;
  transform: scale(0.95);
  filter: blur(1.5rem);
  transition: opacity 0.6s ease, transform 0.8s ease, filter 0.8s ease;
}

.hero .book-cover:hover::after {
  opacity: 0.8;
  transform: scale(1.06);
  filter: blur(1.75rem);
}


/* ------------------------------
   5. GLOWING EMBERS FLOATING BG
------------------------------ */

.hero-ember .glow-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-ember .glow-container .ball {
  --delay: 0s;
  --size: 0.4;
  --speed: 22s;

  width: calc(120% * var(--size));
  aspect-ratio: 1;
  border-radius: 50%;
  position: absolute;
  opacity: 0.4;

  background: radial-gradient(
    circle at 30% 30%,
    #eec3a8 0%,
    #f5b6a3 35%,
    #e5a1a9 70%,
    transparent 100%
  );

  filter: blur(8vw);
  mix-blend-mode: screen;
  animation: ember-loop var(--speed) infinite linear;
  animation-delay: var(--delay);
}

@keyframes ember-loop {
  0%   { transform: translate3d(0%, 60%, 0) rotate(0deg); }
  20%  { transform: translate3d(35%, 20%, 0) rotate(72deg); }
  40%  { transform: translate3d(80%, 70%, 0) rotate(144deg); }
  60%  { transform: translate3d(60%, 95%, 0) rotate(216deg); }
  80%  { transform: translate3d(20%, 80%, 0) rotate(288deg); }
  100% { transform: translate3d(0%, 60%, 0) rotate(360deg); }
}


/* ------------------------------
   6. GLOBAL FIXED VIDEO BACKGROUND
------------------------------ */

.global-video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -5;
  overflow: hidden;
  pointer-events: none;
}

.global-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}


/* ------------------------------
   7. RESPONSIVE
------------------------------ */

@media (max-width: 62em) {
  .hero-ember .container {
    padding-top: clamp(4.5rem, 10vw, 6.25rem);
  }
}

@media (max-width: 48em) {
  .hero {
    text-align: center;
  }

  .hero .book-cover {
    margin: 2.5rem auto 0;
  }
}

/* =========================================================
   HERO — Left stack feels embedded (glass scrim + depth)
   Paste after: /* HERO SECTION — FINAL REWRITE
========================================================= */

/* 1) Give the whole left content stack a soft glass scrim */
.hero-ember .book-hero-content{
  position: relative;
  isolation: isolate; /* keeps blend/filters contained */
}

.hero-ember .book-hero-content::before{
  content:"";
  position:absolute;
  z-index:-1;
  left: clamp(-1.25rem, -2vw, -2rem);
  right: clamp(-1.25rem, -2vw, -2rem);
  top: clamp(-1.25rem, -2vw, -2rem);
  bottom: clamp(-1.5rem, -3vw, -2.5rem);

  border-radius: clamp(1.25rem, 2vw, 1.75rem);

  /* transparent scrim so video/embers bleed through */
  background:
    radial-gradient(120% 85% at 20% 15%,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.18) 55%,
      rgba(255,255,255,0.08) 100%),
    linear-gradient(180deg,
      rgba(251,234,223,0.18) 0%,
      rgba(228,183,160,0.10) 100%);

  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);

  border: 1px solid rgba(255,255,255,0.28);

  /* layered shadow = depth */
  box-shadow:
    0 10px 30px rgba(15, 10, 25, 0.10),
    0 2px 10px rgba(15, 10, 25, 0.08);
}

/* 2) Upgrade the small card itself */
.hero-ember .glass-panel{
  position: relative;
  overflow: hidden;
  border-radius: clamp(1rem, 1.8vw, 1.4rem);

  /* more transparent so the video reads through */
  background: rgba(255,255,255,0.22);

  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);

  border: 1px solid rgba(255,255,255,0.30);

  /* “real object” shadow stack */
  box-shadow:
    0 18px 40px rgba(18, 10, 30, 0.16),
    0 6px 16px rgba(18, 10, 30, 0.10),
    0 1px 2px rgba(18, 10, 30, 0.10);

  padding: clamp(1.1rem, 2.2vw, 1.6rem);
}

/* inner highlight + subtle vignette to avoid “flat sticker” */
.hero-ember .glass-panel::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:
    radial-gradient(circle at 18% 18%,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.08) 42%,
      rgba(255,255,255,0.00) 70%);
  pointer-events:none;
}

.hero-ember .glass-panel::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(120% 90% at 80% 110%,
      rgba(0,0,0,0.10) 0%,
      rgba(0,0,0,0.00) 55%);
  pointer-events:none;
}

/* 3) Micro-lift interaction (keeps it feeling “designed”) */
@media (hover:hover){
  .hero-ember .glass-panel{
    transition: transform .35s ease, box-shadow .35s ease;
    transform: translateY(0);
  }
  .hero-ember .glass-panel:hover{
    transform: translateY(-4px);
    box-shadow:
      0 26px 55px rgba(18, 10, 30, 0.18),
      0 10px 22px rgba(18, 10, 30, 0.12),
      0 1px 2px rgba(18, 10, 30, 0.10);
  }
}

/* 4) Optional: faint noise (adds “print” texture; keeps it from looking digital-flat)
   If you already have a noise asset, swap the url. If not, delete this block. */
.hero-ember .glass-panel{
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.18), transparent 55%),
    radial-gradient(circle at 90% 120%, rgba(0,0,0,0.08), transparent 55%);
  background-blend-mode: overlay;
}

/* 5) Give the title/subtitle a tiny atmospheric separation */
.hero-ember .book-hero-content h1,
.hero-ember .book-hero-content .book-subtitle{
  text-shadow: 0 10px 28px rgba(18, 10, 30, 0.16);
}


@media (max-width: 600px) {

  /* Remove column padding that is pushing the panel left */
  #hero .col-lg-5 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Structural true centering */
  #hero .glass-panel {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 90% !important;
    
    /* Optical centering correction */
    transform: translateX(6px);
  }
}

/* =========================================================
   HERO — Align book cover higher (match left card top)
   Paste AFTER existing hero CSS
========================================================= */

/* 1) Top-align the two columns on desktop */
@media (min-width: 992px){
  #hero .row.align-items-center{
    align-items: flex-start !important;
  }
}

/* 2) Nudge the cover upward + slightly left */
@media (min-width: 992px){
  #hero .book-cover{
    transform: translate(-2rem, -3rem); /* left, up */
  }
}

/* =========================================================
   HERO — Reduce bottom padding on the inner glass panel
   Paste AFTER existing styles
========================================================= */

#hero .glass-panel{
  /* If you already have padding set elsewhere, this overrides it */
  padding-bottom: clamp(1.1rem, 2.2vw, 1.5rem) !important;
}

/* Optional: if the *paragraph* is adding extra bottom space */
#hero .glass-panel .book-description{
  margin-bottom: 0 !important;
} 

/* =========================================================
   HERO — Force larger H1 (wins specificity battles)
   Paste at the VERY END of your CSS
========================================================= */
#hero.hero.hero-ember .container .book-hero-content h1{
  font-size: clamp(2.8rem, 5.6vw, 6rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

/* =========================================================
   HERO — Author line treatment (centered + styled)
   Paste AFTER existing hero CSS
========================================================= */

/* Center + refine the author heading */
#hero .glass-panel h3{
  text-align: center;
  margin: 0 0 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: color-mix(in srgb, var(--heading-color, #2b1a38), #000 10%);
}

/* Optional: add a subtle divider line underneath */
#hero .glass-panel h3::after{
  content: "";
  display: block;
  width: clamp(3.5rem, 10vw, 5rem);
  height: 2px;
  margin: 0.6rem auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent-color, #e4b7a0), #fff 25%),
    transparent
  );
  opacity: 0.85;
}

/* =========================================================
   HERO — Author line (bigger + bolder, still centered)
   Paste AFTER the previous h3 styles
========================================================= */

#hero .glass-panel h3{
  font-size: clamp(1.25rem, 2.2vw, 1.65rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  margin: 0 0 1rem !important;
}

/* Optional: slightly stronger divider if you're using it */
#hero .glass-panel h3::after{
  width: clamp(4.25rem, 12vw, 6rem) !important;
  opacity: 0.95 !important;
}


/* =========================================================
   HERO — Tablet + Phone adjustments
   - Hide book cover on <= 991px (tablet + phone)
   - Add safe spacing above CTA so it never covers content
   Paste AFTER existing hero CSS
========================================================= */

/* 1) Hide the right-side cover column on tablet + phone */
@media (max-width: 991.98px){
  #hero .book-cover,
  #hero .col-lg-3,           /* if you changed to col-lg-3 */
  #hero .col-lg-4{           /* if you still have col-lg-4 */
    display: none !important;
  }
}

/* 2) Ensure button has breathing room everywhere */
#hero .hero-cta{
  margin-top: clamp(1.1rem, 3vw, 1.8rem) !important;
  padding-top: clamp(0.25rem, 1vw, 0.75rem) !important;
}

/* Tablet: center content + keep rhythm nice */
@media (max-width: 991.98px){
  #hero.hero-ember .book-hero-content{
    text-align: center;
  }

  #hero.hero-ember .hero-cta{
    justify-content: center;
    margin-top: clamp(1.25rem, 3.5vw, 2rem) !important;
  }
}

/* Phone: a touch more vertical spacing */
@media (max-width: 575.98px){
  #hero.hero-ember .hero-cta{
    margin-top: 1.4rem !important;
  }
}


/* =========================================================
   HERO — Push CTA button lower (all breakpoints)
   Paste AFTER existing hero CSS
========================================================= */

#hero .hero-cta{
  margin-top: clamp(1.75rem, 4vw, 2.6rem) !important;
}

/* Tablet */
@media (max-width: 991.98px){
  #hero .hero-cta{
    margin-top: clamp(2rem, 5vw, 3rem) !important;
  }
}

/* Phone */
@media (max-width: 575.98px){
  #hero .hero-cta{
    margin-top: 2.25rem !important;
  }
}

/* Optional: add a touch of bottom breathing room inside the main card */
#hero .book-hero-content{
  padding-bottom: clamp(0.25rem, 1vw, 0.75rem);
}

/* =========================================================
   HERO — Mobile equal side gutters (fix left-edge flush card)
   Paste AFTER existing hero CSS
========================================================= */

@media (max-width: 575.98px){

  /* Make sure the container has equal padding on both sides */
  #hero.hero-ember .container{
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* If a row/column is stripping the left gutter, restore it */
  #hero.hero-ember .row{
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #hero.hero-ember .col-lg-5{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Ensure the main hero card is centered with equal margins */
  #hero.hero-ember .book-hero-content{
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
  }

  /* If your big card is a pseudo “panel” wrapper, lock it to the same inset */
  #hero.hero-ember .book-hero-content > *{
    max-width: 100%;
  }
}
/* =========================================================
   HERO — Equal side gutters for PHONE + TABLET
   Fixes full-bleed hero card on iPad / tablets
   Paste AFTER existing hero CSS
========================================================= */

@media (max-width: 991.98px){

  /* 1) Give the hero container real, equal padding */
  #hero.hero-ember .container{
    padding-left: clamp(1rem, 3vw, 1.75rem) !important;
    padding-right: clamp(1rem, 3vw, 1.75rem) !important;
  }

  /* 2) Stop the Bootstrap row gutters from “escaping” the container */
  #hero.hero-ember .row{
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 3) Remove column padding so your card math is predictable */
  #hero.hero-ember .col-lg-5{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 4) FORCE the big hero card to respect the gutter
        (this is the bulletproof part) */
  #hero.hero-ember .book-hero-content{
    width: 100% !important;
    max-width: calc(100% - clamp(0rem, 0vw, 0rem)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* If the rounded “outer card” is a specific element inside book-hero-content,
     this ensures it can’t go flush-left/right */
  #hero.hero-ember .book-hero-content > :first-child{
    margin-left: auto !important;
    margin-right: auto !important;
  }
}