/* ================================================================
   Playful Hero Section
   Scoped under .playful-hero
   ================================================================ */

/* ── Tokens ── */
.playful-hero {
  --ph-orange: #F97316;
  --ph-orange-dark: #EA580C;
  --ph-iron: #1C1917;
  --ph-cream: #FFF7ED;
  --ph-slate: rgba(28, 25, 23, 0.6);
  --ph-whisper: #E5E7EB;
  --ph-white: #ffffff;
  --ph-radius: 16px;
  --ph-font-heading: 'Crimson Pro', Georgia, serif;
  --ph-font-ui: 'Poppins', -apple-system, sans-serif;
}

/* ── Container ── */
.playful-hero {
  padding: 4em 0;
  position: relative;
}

.playful-hero--light {
  background: transparent;
  color: var(--ph-iron);
}

.playful-hero--dark {
  background: var(--ph-iron);
  color: var(--ph-cream);
}

/* ── Grid Layout ── */
.playful-hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3em;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2em;
}

/* ── Left Column: Content ── */
.playful-hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

/* ── Heading ── */
.playful-hero__heading {
  font-family: var(--ph-font-heading);
  font-size: var(--text-2xl, 50px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.playful-hero--light .playful-hero__heading {
  color: var(--ph-iron);
}

.playful-hero--dark .playful-hero__heading {
  color: var(--ph-cream);
}

/* Annotation spans — rough-notation adds inline SVGs */
.playful-hero__heading [data-annotation] {
  position: relative;
  white-space: nowrap;
}

/* ── Subheading ── */
.playful-hero__subheading {
  font-family: var(--ph-font-heading);
  font-size: var(--text-m, 17px);
  line-height: 1.6;
  margin: 0;
  max-width: 540px;
}

.playful-hero--light .playful-hero__subheading {
  color: var(--ph-slate);
}

.playful-hero--dark .playful-hero__subheading {
  color: rgba(255, 247, 237, 0.7);
}

/* ── Buttons ── */
.playful-hero__buttons {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Right Column: Visual ── */
.playful-hero__visual {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  align-items: center;
}

/* ── Phone Mockup ── */
.playful-hero__phone {
  width: 320px;
  height: 640px;
  max-width: 100%;
  background: var(--ph-white);
  border-radius: 40px;
  border: 3px solid var(--ph-iron);
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
}

.playful-hero--dark .playful-hero__phone {
  background: #2A2522;
  border-color: rgba(255, 247, 237, 0.3);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 24px 48px rgba(0, 0, 0, 0.2);
}

/* Notch */
.playful-hero__phone-notch {
  width: 120px;
  height: 28px;
  background: var(--ph-iron);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
}

.playful-hero--dark .playful-hero__phone-notch {
  background: var(--ph-cream);
}

/* ── Chat ── */
.playful-hero__chat {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.playful-hero__chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ph-whisper);
}

.playful-hero__chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ph-orange);
  color: var(--ph-white);
  font-family: var(--ph-font-ui);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.playful-hero__chat-name {
  font-family: var(--ph-font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--ph-iron);
}

.playful-hero__chat-messages {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.playful-hero__chat-messages::-webkit-scrollbar {
  display: none;
}

/* ── Chat Bubbles ── */
.playful-hero__msg {
  font-family: var(--ph-font-ui);
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 85%;
  word-break: break-word;
  text-align: left;
  /* Animation initial state */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.playful-hero__msg--visible {
  opacity: 1;
  transform: translateY(0);
}

/* User bubble */
.playful-hero__msg--user {
  background: var(--ph-orange);
  color: var(--ph-white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Assistant bubble */
.playful-hero__msg--assistant {
  background: #F1F1F1;
  color: var(--ph-iron);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* ── Image Gallery ── */
.playful-hero__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75em;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

/* Single image: full width, no grid split */
.playful-hero__gallery--single {
  grid-template-columns: 1fr;
}

.playful-hero__gallery-img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.playful-hero__gallery-img--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .playful-hero__grid {
    grid-template-columns: 1fr;
    gap: 2em;
    text-align: center;
  }

  .playful-hero__content {
    align-items: center;
  }

  .playful-hero__subheading {
    max-width: 100%;
  }

  .playful-hero__buttons {
    justify-content: center;
  }

  .playful-hero__heading {
    font-size: var(--text-xl, 38px);
  }

  .playful-hero__phone {
    width: 280px;
    height: 560px;
  }

  .playful-hero__gallery {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .playful-hero {
    padding: 2em 0;
  }

  .playful-hero__grid {
    padding: 0 1em;
  }

  .playful-hero__heading {
    font-size: var(--text-l, 28px);
  }

  .playful-hero__buttons {
    flex-direction: column;
    width: 100%;
  }

  .playful-hero__buttons .bricks-button {
    width: 100%;
    text-align: center;
  }
}
