/* ============================================
   BUMI / BLOOM — Pages (Playful Homepage)
   ============================================ */

/* ---- Hero Section (.hero-playful) ---- */
.hero-playful {
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
  text-align: center;
  /* Slide the hero up behind the transparent header so it reads as an overlay.
     Extra top padding keeps the hero content clear of the header. */
  margin-top: calc(-1 * var(--header-height));
  padding: calc(var(--space-12) + var(--header-height)) 0 0;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  margin-bottom: var(--space-12);
}

.hero-playful__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.hero-playful__badge {
  display: inline-block;
  background: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.hero-playful__title {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  color: var(--color-dark);
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 2;
  max-width: 18ch;
}

/* Reference-style word play: one red word, one script word on a peach
   swash, and a hand-drawn squiggle under the final word. */
.hero-title__word--accent {
  color: var(--color-red);
}

.hero-title__script {
  position: relative;
  z-index: 0;
  padding: 0 0.08em;
}
.hero-title__script::before {
  content: '';
  position: absolute;
  inset: 6% -6% 2% -6%;
  background: var(--color-peach);
  opacity: 0.75;
  border-radius: 48% 52% 55% 45% / 62% 55% 45% 38%;
  transform: rotate(-2deg);
  z-index: -1;
}

.hero-title__underlined {
  position: relative;
  display: inline-block;
}
.hero-title__squiggle {
  position: absolute;
  left: 0;
  bottom: -0.22em;
  width: 100%;
  height: 0.26em;
  color: var(--color-red);
  opacity: 0.55;
  overflow: visible;
}

.hero-playful__subtitle {
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-dark);
  opacity: 0.8;
  margin-bottom: var(--space-8);
  max-width: 52ch;
}

.hero-playful__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.hero-playful .hero-chips {
  justify-content: center;
}

@media (max-width: 1024px) {
  .hero-playful__title {
    font-size: var(--text-4xl);
  }
}

/* ---- Hero arch card fan ---- */
.hero-arch-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 1.6vw, 22px);
  margin-top: var(--space-12);
  padding: 0 var(--container-padding) var(--space-8);
}

.hero-arch-card {
  --card-w: clamp(150px, 17vw, 230px);
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  aspect-ratio: 3 / 4;
  padding: 8px;
  border-radius: calc(var(--card-w) / 2) calc(var(--card-w) / 2) var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* Standalone rotate/translate properties (same pattern as paper.css)
     so the rise-in animation and hover lift don't clobber the arc. */
  rotate: 0deg;
  translate: 0 0;
  transition: rotate var(--duration-normal) var(--ease-smooth),
              translate var(--duration-normal) var(--ease-smooth);
  animation: archRise 700ms var(--ease-smooth) backwards;
}

.hero-arch-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--card-w) / 2 - 6px) calc(var(--card-w) / 2 - 6px) calc(var(--radius-lg) - 6px) calc(var(--radius-lg) - 6px);
}

/* Character cards: crayon friends sit ON the colour, not behind a photo */
.hero-arch-card--character img {
  object-fit: contain;
  padding: 12%;
}

.hero-arch-card--peach { background: var(--color-peach); }
.hero-arch-card--pink  { background: var(--color-pink); }
.hero-arch-card--blue  { background: var(--color-blue); }

/* Gentle arc: edges tilted & lower, center card tallest */
.hero-arch-card:nth-child(1) { rotate: -5deg;   translate: 0 18px; animation-delay: 0.05s; }
.hero-arch-card:nth-child(2) { rotate: -2.5deg; translate: 0 6px;  animation-delay: 0.15s; }
.hero-arch-card:nth-child(3) { --card-w: clamp(170px, 19vw, 260px); animation-delay: 0.25s; }
.hero-arch-card:nth-child(4) { rotate: 2.5deg;  translate: 0 6px;  animation-delay: 0.35s; }
.hero-arch-card:nth-child(5) { rotate: 5deg;    translate: 0 18px; animation-delay: 0.45s; }

.hero-arch-card:hover {
  rotate: 0deg;
  translate: 0 -6px;
}

@keyframes archRise {
  from { opacity: 0; translate: 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-arch-card { animation: none; transition: none; }
}

/* Mobile: the fan becomes a swipeable strip */
@media (max-width: 768px) {
  .hero-arch-row {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-4);
    scrollbar-width: none;
  }
  .hero-arch-row::-webkit-scrollbar { display: none; }
  .hero-arch-card,
  .hero-arch-card:nth-child(3) {
    --card-w: 150px;
    scroll-snap-align: center;
  }
  .hero-arch-card:nth-child(n) {
    rotate: 0deg;
    translate: 0 0;
  }
}

/* ---- Style Cards Section ---- */
.style-cards-section {
  background: var(--color-white);
}

.style-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .style-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Collections Section ---- */
.collections-section {
  background: var(--bg-primary);
  border-radius: 40px;
  padding: var(--space-16) 0;
  margin: var(--space-12) 0;
}

.collection-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Promo Banner Section ---- */
.promo-banner-section {
  padding: var(--space-12) 0;
}

.promo-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(135deg, var(--color-cream), var(--color-yellow));
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.promo-banner__content {
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.promo-banner__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  margin-bottom: var(--space-4);
  line-height: var(--lh-tight);
}

.promo-banner__text {
  font-size: var(--text-lg);
  color: var(--color-dark);
  margin-bottom: var(--space-8);
  opacity: 0.9;
}

.promo-banner__image {
  position: relative;
  min-height: 300px;
}

.promo-banner__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

@media (max-width: 768px) {
  .promo-banner {
    grid-template-columns: 1fr;
  }
  .promo-banner__image {
    order: -1;
  }
  .promo-banner__content {
    padding: var(--space-8);
    align-items: center;
    text-align: center;
  }
  .promo-banner__title {
    font-size: var(--text-3xl);
  }
}

/* ---- Why Choose Us Section ---- */
.why-choose-section {
  background: var(--color-white);
  padding: var(--space-16) 0;
}

.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
}

.why-choose-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-6);
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.why-choose-item:hover {
  transform: translateY(-5px);
}

.why-choose-item__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  flex-shrink: 0;
}

.why-choose-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}

.why-choose-item__text {
  font-size: var(--text-sm);
  color: var(--color-dark);
  opacity: 0.8;
  line-height: var(--lh-relaxed);
}

@media (max-width: 768px) {
  .why-choose-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Testimonials Section ---- */
.testimonials-section {
  background: var(--color-cream);
  padding: var(--space-16) 0;
  border-radius: 40px;
  margin: var(--space-12) 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- CTA Banner Section ---- */
.cta-banner-section {
  padding: var(--space-12) 0;
}

.cta-banner-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cta-banner__left {
  background: var(--color-green);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.cta-banner__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: var(--space-8);
  line-height: var(--lh-tight);
}

.cta-banner__right {
  background: var(--color-yellow);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cta-banner__label {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}

.cta-banner__discount {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}

.cta-banner__discount span {
  color: var(--color-coral);
}

.cta-banner__code-label {
  font-size: var(--text-sm);
  color: var(--color-dark);
  margin-bottom: var(--space-4);
}

.cta-banner__code {
  background: var(--color-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-family: monospace;
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  border: 2px dashed var(--color-dark);
}

@media (max-width: 768px) {
  .cta-banner-grid {
    grid-template-columns: 1fr;
  }
  .cta-banner__left {
    padding: var(--space-8);
    align-items: center;
    text-align: center;
  }
  .cta-banner__right {
    padding: var(--space-8);
  }
}

/* ---- Hero character decorations ---- */
.hero-characters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-character {
  position: absolute;
  width: clamp(72px, 10vw, 128px);
  height: auto;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  animation: float 7s ease-in-out infinite alternate;
}

.hero-character--dino {
  display: none;
}

.hero-character--bunny {
  right: 6%;
  top: 6%;
  animation-delay: 1.5s;
}

.hero-character--whale {
  display: none;
}

@media (max-width: 1024px) {
  .hero-character--bunny { right: 4%; top: 4%; }
}

/* ---- Age tile character avatar ---- */
.age-tile {
  position: relative;
}

.age-tile__character {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  padding: 4px;
  z-index: 2;
}

.age-tile__character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Friends strip ---- */
.friends-section {
  background: var(--color-cream-light);
  border-radius: 40px;
  padding: var(--space-16) 0;
  margin: var(--space-12) 0;
}

.friends-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
}

.friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  transition: transform var(--transition-normal) var(--ease-bounce);
}

.friend-card:hover {
  transform: translateY(-6px) scale(1.05);
}

.friend-card__avatar {
  width: clamp(96px, 12vw, 140px);
  height: clamp(96px, 12vw, 140px);
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  padding: var(--space-2);
  overflow: hidden;
}

.friend-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.friend-card__name {
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  color: var(--color-dark);
  margin: 0;
}

@media (max-width: 768px) {
  .friends-grid { gap: var(--space-4); }
  .friend-card__name { font-size: var(--text-base); }
}

/* ---- Newsletter Section ---- */
.newsletter {
  background: var(--color-pink);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  max-width: 800px;
  margin: var(--space-12) auto;
  box-shadow: var(--shadow-sm);
}

.newsletter__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  margin-bottom: var(--space-4);
}

.newsletter__text {
  font-size: var(--text-lg);
  color: var(--color-dark);
  opacity: 0.8;
  margin-bottom: var(--space-8);
}

.newsletter__form {
  display: flex;
  gap: var(--space-3);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter__form .input {
  flex: 1;
  border-radius: var(--radius-pill);
  border: none;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.newsletter__form .input:focus {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .newsletter__form {
    flex-direction: column;
  }
}
