/* ============================================================
   Explora Investor Deck — Real botanical motifs (r7)
   --------------------------------------------------------------
   Rethink. Two motif systems now:
   • DARK / jungle slides → two-corner pseudo-element pattern
     (subtle screen-blended fronds tucked off-screen).
   • CREAM / light slides → single SIDE-STRIP per slide.
     A 38%-wide botanical photograph anchored to one side,
     masked to fade into the linen, blended via `darken` so the
     white photo background disappears and only the green leaf
     reads through. Different species per slide (monstera, banana,
     palm, philodendron) alternating sides for a magazine feel.

   This replaces the r6 cream-slide treatment which combined low
   opacity + multiply blend = near-invisible OR oversized leaves
   crowding content.
   ============================================================ */

.slide { isolation:isolate; }

/* =====================================================================
   VIEWPORT-EDGE BLEED — let decorations extend past the slide frame so
   the 16:9 letterbox bars on non-16:9 viewports merge with the slide.
   Inactive slides are visibility:hidden so there's no cross-slide leak.
   ===================================================================== */
.slide { overflow:visible !important; }

/* COVER full-bleed: extend the cover-bg container past the slide so the
   <img object-fit:cover> fills the entire viewport after stage scale. */
.slide-cover .cover-bg {
  inset: -260px -560px !important;
}

/* The original cover-veil (slides-r49 line 9) was a two-layer dark
   gradient dimming the leaf photo for legacy text-contrast. The cover
   wordmark + tagline already read clearly against the photo, so hide
   the veil and let the photograph come through at full brightness. */
.slide-cover .cover-veil { display:none; }

/* =====================================================================
   DARK / JUNGLE slides — corner pseudo-element pattern, sized so the
   leaves bleed into the side / top / bottom letterbox bars on widescreen.
   ===================================================================== */
.slide[data-theme="dark"]:not(.no-leaves),
.slide.jungle,
.slide.dark {
  --leaf-bl-img: url("../assets/img/leaf-real.jpg");
  --leaf-bl-rot: 0deg;
  --leaf-bl-size: 440px;
  --leaf-bl-x: -200px;
  --leaf-bl-y: -160px;

  --leaf-tr-img: url("../assets/img/leaf-real.jpg");
  --leaf-tr-rot: 20deg;
  --leaf-tr-size: 340px;
  --leaf-tr-x: -200px;
  --leaf-tr-y: -220px;
}

.slide[data-theme="dark"]:not(.no-leaves)::before,
.slide.jungle:not(.no-leaves)::before {
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  left:var(--leaf-bl-x);
  bottom:var(--leaf-bl-y);
  width:var(--leaf-bl-size);
  height:var(--leaf-bl-size);
  background:var(--leaf-bl-img) center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse at bottom left, #000 18%, transparent 65%);
          mask-image: radial-gradient(ellipse at bottom left, #000 18%, transparent 65%);
  transform:rotate(var(--leaf-bl-rot));
  opacity:.32;
  mix-blend-mode:screen;
}

.slide[data-theme="dark"]:not(.no-leaves)::after,
.slide.jungle:not(.no-leaves)::after {
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  right:var(--leaf-tr-x);
  top:var(--leaf-tr-y);
  width:var(--leaf-tr-size);
  height:var(--leaf-tr-size);
  background:var(--leaf-tr-img) center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 18%, transparent 65%);
          mask-image: radial-gradient(ellipse at top right, #000 18%, transparent 65%);
  transform:scaleX(-1) rotate(var(--leaf-tr-rot));
  opacity:.22;
  mix-blend-mode:screen;
}

/* =====================================================================
   CREAM / LIGHT slides — single botanical side-strip per slide
   ===================================================================== */

/* Defaults: monstera on the right side, masked to fade left.
   strip-side-r / strip-side-l use a generous negative offset so the leaf
   extends well past the 1280px slide right edge into the cream side bars
   on widescreen monitors. Combined with base-r6's overflow:visible on
   cream slides, the leaf reads as a viewport-edge decoration. */
.slide[data-theme="light"] {
  --strip-img: url("../assets/img/leaves/monstera.jpg");
  --strip-mask-dir: to left;
  --strip-side-r: -320px;
  --strip-side-l: auto;
}

.slide[data-theme="light"]:not(.no-strip)::before {
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  top:-40px;
  bottom:-40px;
  right:var(--strip-side-r);
  left:var(--strip-side-l);
  width:56%;
  background:var(--strip-img) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(var(--strip-mask-dir), #000 22%, transparent 92%);
          mask-image: linear-gradient(var(--strip-mask-dir), #000 22%, transparent 92%);
  opacity:.42;
  filter:saturate(.88) contrast(1.02);
  mix-blend-mode:darken;
}

/* Hide the corner ::after on cream slides — strip replaces both leaves */
.slide[data-theme="light"]::after { display:none; }

/* Per-slide species + side via explicit data attributes on each
   cream slide. Default (no attribute) = monstera on the right. */
.slide[data-leaf="monstera"]     { --strip-img: url("../assets/img/leaves/monstera.jpg"); }
.slide[data-leaf="banana"]       { --strip-img: url("../assets/img/leaves/banana.jpg"); }
.slide[data-leaf="palm"]         { --strip-img: url("../assets/img/leaves/palm.jpg"); }
.slide[data-leaf="philodendron"] { --strip-img: url("../assets/img/leaves/philodendron.jpg"); }
.slide[data-strip="left"]  { --strip-mask-dir: to right; --strip-side-r: auto;   --strip-side-l: -320px; }
.slide[data-strip="right"] { --strip-mask-dir: to left;  --strip-side-r: -320px; --strip-side-l: auto;   }

/* =====================================================================
   Opt-outs and special slides
   ===================================================================== */

/* BMC already has its own .bmc-bg layer — don't double up */
.slide-bmc::before { display:none !important; }

/* Full-bleed photo / video / statement slides */
.slide.no-leaves::before,
.slide.no-leaves::after { display:none !important; }

/* Local Rivals has a busy table in phase 2; lighten the strip there */
.slide-lr::before { opacity:.32 !important; }

@media print {
  .slide::before, .slide::after { opacity:.22 !important; }
}
