/* ============================================================
   CFO Babies — home "fun" layer (collage, motion, magenta accents)
   Depends on tokens.css + home.css. Loads AFTER home.css.
   ============================================================ */

/* Alias to the canonical brand token (no hardcoded hex, dark-mode safe) */
:root {
  --fun-magenta: var(--color-babies);
  --fun-magenta-soft: color-mix(in oklab, var(--color-babies) 8%, transparent);
}

/* ============ 1. SECTION COLOR-BLOCKING (rhythm) ============ */
.fun-band {
  background:
    radial-gradient(120% 80% at 100% 0%, var(--fun-magenta-soft), transparent 60%),
    var(--color-surface-offset, #f3f0ec);
  border-block: 1px solid var(--color-divider);
  padding-block: var(--space-16);
  margin-inline: calc(-1 * var(--space-4));
  padding-inline: var(--space-4);
}
@media (min-width: 880px) {
  .fun-band { margin-inline: calc(-1 * var(--space-12)); padding-inline: var(--space-12); }
}

/* ── Colorful hero collage ── */
.hero-collage {
  display: grid;
  gap: var(--space-4);
}

.collage-card {
  position: relative;
  margin: 0;
  padding: 10px;
  min-height: 150px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(20, 30, 30, 0.12);
  background: var(--color-surface-2);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: collage-float 6s ease-in-out infinite;
}
.collage-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Happy, on-brand colored tiles + playful tilt */
.collage-card--pink {
  background: var(--color-babies-soft);
  border-color: var(--color-babies);
  transform: rotate(-4deg);
}
.collage-card--teal {
  background: #d9efef;
  border-color: var(--color-brand-teal);
  transform: rotate(3deg);
  animation-delay: 1.2s;
}
.collage-card--blue {
  background: #dfe6f5;
  border-color: var(--color-cfo-blue);
  transform: rotate(-2deg);
  animation-delay: 2.4s;
}

.collage-card:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.03);
  box-shadow: 0 16px 40px rgba(20, 30, 30, 0.18);
  z-index: 2;
}

/* Colorful fallback: if the meme image fails, show its caption on the colored tile */
.collage-card::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-base);
  line-height: 1.25;
  color: var(--color-text);
}
.collage-card:has(img[style*="visibility: hidden"])::after { display: flex; }

@keyframes collage-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .collage-card { animation: none; }
}

/* Desktop: collage floats right, stacked and overlapping slightly */
@media (min-width: 980px) {
  .hero { max-width: 1120px; padding-right: 420px; }
  .hero-collage {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 300px;
    margin: 0;
  }
  .collage-card { width: 240px; }
  .collage-card--teal { margin-left: auto; margin-top: -28px; }
  .collage-card--blue { margin-top: -28px; }
}

/* Mobile: show the collage below the hero text as a fun row */
@media (max-width: 979px) {
  .hero-collage {
    grid-template-columns: repeat(3, 1fr);
    margin-top: var(--space-8);
  }
  .collage-card { min-height: 0; }
}
/* ============ 2b. "MEET THE TOXIC CFO" CARD ============ */
.hero-meet {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  width: fit-content;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.hero-meet:hover {
  border-color: var(--color-babies);
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: var(--shadow-lg);
}
.hero-meet img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--color-surface-offset);
}
.hero-meet-copy { display: flex; flex-direction: column; line-height: 1.2; }
.hero-meet-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}
.hero-meet-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text);
}
.hero-cta-fun { margin-top: var(--space-4); margin-bottom: var(--space-6); }
.hero-cta-fun .btn { font-size: var(--text-sm); padding-block: var(--space-2); }

/* ============ 3. BREAK THE UNIFORM GRID ============ */
.franchise-card.franchise-feature {
  grid-column: span 2;
  min-height: 260px;
  flex-direction: row;
  align-items: stretch;
  gap: var(--space-5);
}
.franchise-card.franchise-feature .franchise-thumb {
  flex: 0 0 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  align-self: center;
}
.franchise-card.franchise-feature .franchise-thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.franchise-card.franchise-feature .franchise-body { display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
@media (max-width: 660px) {
  .franchise-card.franchise-feature { grid-column: span 1; flex-direction: column; }
  .franchise-card.franchise-feature .franchise-thumb { flex: none; width: 100%; }
}
.franchise-card .cat-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: var(--cat, var(--color-brand-teal));
  vertical-align: middle;
}
.franchise-card.franchise-babies { --cat: var(--fun-magenta); }

/* ============ 4. BOLDER MAGENTA + LIVE PULSE ============ */
.franchise-live .franchise-status {
  background: var(--fun-magenta);
  color: #fff;
  animation: live-pulse 2.2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 54, 131, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(211, 54, 131, 0); }
}
.franchise-cta { color: var(--fun-magenta) !important; }
.section-title::after {
  content: '';
  display: block;
  width: 56px; height: 3px;
  margin-top: var(--space-3);
  background: var(--fun-magenta);
  border-radius: 2px;
}
.franchise-card:hover { transform: translateY(-4px) rotate(-0.4deg); }

/* ============ 5. SCROLL REVEAL ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============ 6. CONFETTI CANVAS ============ */
#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

/* ===== BABIES CTA BUTTON (pink — celebration) ===== */
.btn-babies { background: var(--color-babies); color: #fff; border-color: var(--color-babies); }
.btn-babies:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-md); }




/* ============================================================
   MIGRATED FROM INLINE — fun/motion accents (home only)
   ============================================================ */

/* Distinguish the Toxic CFO band from the Franchises band below it */
.fun-band:has(#toxic-cfo) {
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in oklab, var(--color-babies) 10%, transparent), transparent 55%),
    var(--color-surface-2);
}

/* Global reduced-motion kill-switch (was in inline) */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .bonus-band [data-reveal] { transition: none; }
}