/* ==========================================================================
   Two-Col Showcase
   - per-column BG colors (brand tints)
   - image or WYSIWYG per column
   - optional centered sticker w/ multiple animations
   - reveal-friendly
   ========================================================================== */

.acf-two-col-showcase {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.acf-two-col-showcase .twocol-inner { margin-inline: auto; }

.acf-two-col-showcase .twocol-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* Column wrappers */
.acf-two-col-showcase .twocol-col {
  position: relative;
  min-height: 310px;
  display: flex;
  align-items: stretch;
}
.acf-two-col-showcase.valign-top .twocol-col .col-inner { align-items: flex-start; }
.acf-two-col-showcase.valign-center .twocol-col .col-inner { align-items: center; }
.acf-two-col-showcase.valign-bottom .twocol-col .col-inner { align-items: flex-end; }

.acf-two-col-showcase .col-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
}

/* WYSIWYG text */
.acf-two-col-showcase .twocol-content { max-width: 40ch; padding: 2rem 4.5rem; }
.acf-two-col-showcase .twocol-content p:last-child { margin-bottom: 0; }

/* Images: keep aspect without stretching */
.acf-two-col-showcase .twocol-image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* BACKGROUND TINTS — project palette */
.bg-white   { background: #ffffff; }
.bg-ivory   { background: #fffaf0; }
.bg-mint    { background: #edf7f7; }
.bg-peach   { background: #fff0d9; }
.bg-sand    { background: #f5e0b0; }
.bg-seafoam { background: #d6f5eb; }
.bg-teal    { background: #8ac9c2; }
.bg-gold    { background: #f0b040; }
.bg-red     { background: #ba3357; }

/* Center Sticker (optional) */
.acf-two-col-showcase .twocol-sticker {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  z-index: 3;
  opacity: 0;              /* 👈 hidden by default */
  transform: scale(0.9);   /* small shrink-in effect */
  transition: opacity 0.3s ease, transform 0.3s ease;
  transition-delay: .5s;  /* 👈 delay before sticker appears */
}
.acf-two-col-showcase .twocol-sticker.revealed {
  opacity: 1;
  transform: scale(1);
}

.acf-two-col-showcase .twocol-sticker .sticker-img {
  width: var(--sticker-size, 140px);
  height: var(--sticker-size, 140px);
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2));
  will-change: transform;
}

/* === Sticker animation options (default + alternates) === */
/* 0) default gentle float */
@media (prefers-reduced-motion: no-preference) {
  .acf-two-col-showcase .twocol-sticker.sticker-animate:not([class*="sticker--"]) .sticker-img {
    animation: stickerFloat 5.5s ease-in-out infinite;
  }
}
@keyframes stickerFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-6px) rotate(-1.5deg); }
}

/* 1) orbit */
@media (prefers-reduced-motion: no-preference) {
  .acf-two-col-showcase .twocol-sticker.sticker-animate.sticker--orbit .sticker-img {
    animation: stickerOrbit 7s ease-in-out infinite;
  }
}
@keyframes stickerOrbit {
  0%   { transform: translate(0,0) rotate(0deg); }
  25%  { transform: translate(6px,-4px) rotate(1deg); }
  50%  { transform: translate(0,-8px) rotate(0deg); }
  75%  { transform: translate(-6px,-4px) rotate(-1deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

/* 2) bobble */
@media (prefers-reduced-motion: no-preference) {
  .acf-two-col-showcase .twocol-sticker.sticker-animate.sticker--bobble .sticker-img {
    animation: stickerBobble 4.75s ease-in-out infinite;
    transform-origin: 50% 55%;
  }
}
@keyframes stickerBobble {
  0%,100% { transform: translateY(0) rotate(0) scale(1); }
  35%     { transform: translateY(-4px) rotate(-1deg) scale(1.015); }
  70%     { transform: translateY(2px)  rotate(1deg)  scale(0.995); }
}

/* 3) sway */
@media (prefers-reduced-motion: no-preference) {
  .acf-two-col-showcase .twocol-sticker.sticker-animate.sticker--sway .sticker-img {
    transform-origin: 50% 10%;
    animation: stickerSway 6.25s ease-in-out infinite;
  }
}
@keyframes stickerSway {
  0%,100% { transform: rotate(0deg) translateY(0); }
  25%     { transform: rotate(2.2deg) translateY(-2px); }
  50%     { transform: rotate(0deg) translateY(0); }
  75%     { transform: rotate(-2.2deg) translateY(-2px); }
}

/* 4) pulse */
@media (prefers-reduced-motion: no-preference) {
  .acf-two-col-showcase .twocol-sticker.sticker-animate.sticker--pulse .sticker-img {
    animation: stickerPulse 5.25s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0,0,0,.15), 0 0 0 rgba(0,0,0,0);
  }
}
@keyframes stickerPulse {
  0%,100% { transform: scale(1);   box-shadow: 0 10px 30px rgba(0,0,0,.15), 0 0 0 rgba(0,0,0,0); }
  50%     { transform: scale(1.02); box-shadow: 0 12px 36px rgba(0,0,0,.20), 0 0 12px rgba(0,0,0,.06); }
}

/* Reduced motion: freeze */
@media (prefers-reduced-motion: reduce) {
  .acf-two-col-showcase .twocol-sticker.sticker-animate .sticker-img { animation: none !important; }
}

/* Ensure sticker doesn't overlap text awkwardly on small screens */
@media (max-width: 900px) {
  .acf-two-col-showcase .twocol-sticker { margin: 1rem 0; }
  .acf-two-col-showcase .twocol-sticker .sticker-img {
    width: var(--sticker-size-mobile, var(--sticker-size, 140px));
    height: var(--sticker-size-mobile, var(--sticker-size, 140px));
  }
}

/* Responsive: stack columns on mobile */
@media (max-width: 900px) {
  .acf-two-col-showcase .twocol-grid { grid-template-columns: 1fr; }
  .acf-two-col-showcase .twocol-col + .twocol-col {
    border-top: 1px solid rgba(0,0,0,0.06);
  }
  .acf-two-col-showcase .twocol-col {
    min-height: 270px;
  }
  /* Hide sticker if toggle is active */
 .twocol-sticker.hide-mobile { display: none !important; }
 .acf-two-col-showcase .twocol-content {
    max-width: 100ch;
    padding: 2rem 2.5rem;
}
}

  .acf-two-col-showcase .twocol-content { max-width: 50ch; }
}

/* Reveal safety */
.acf-two-col-showcase .twocol-col.reveal .col-inner { will-change: transform, opacity; }

/* ==========================================================================
   Sticker reveal delay integration
   When the section hits reveal (via your reveal.js), add `.revealed` to .twocol-sticker
   ========================================================================== */
.acf-two-col-showcase.revealed .twocol-sticker,
.acf-two-col-showcase .reveal.revealed + .twocol-sticker {
  opacity: 1;
  transform: scale(1);
}
.acf-two-col-showcase .col-2 .twocol-content {
    max-width: 40ch;
    margin: auto;
}
.acf-two-col-showcase .col-1 .twocol-content {
    max-width: 40ch;
    margin: auto;
}
