/**
 * Tala Cosmetics — Cinematic full-bleed hero + transparent header on homepage
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&display=swap');

body.page-home {
  --tala-cine-h: clamp(70dvh, 82dvh, 90dvh);
}

/* Homepage header: solid bar (always visible) */
body.page-home .sitebar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 246, 241, 0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(76, 44, 38, 0.08) !important;
  border-bottom: 1px solid rgba(232, 213, 213, 0.85) !important;
}

body.page-home .tala-promo {
  position: relative;
  z-index: 1001;
}

body.page-home .tala-cine {
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.tala-cine {
  position: relative;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: var(--tala-cine-h, 82dvh);
  min-height: 420px;
  max-height: 900px;
  isolation: isolate;
  touch-action: pan-y pinch-zoom;
}

.tala-cine__slides {
  position: absolute;
  inset: 0;
}

.tala-cine__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--tala-cine-transition, 900ms) ease, visibility var(--tala-cine-transition, 900ms);
  z-index: 0;
}

.tala-cine__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.tala-cine__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.tala-cine__picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.tala-cine__picture,
.tala-cine__img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}

.tala-cine__img {
  object-fit: cover !important;
  object-position: center center;
  transform: scale(1);
  will-change: transform;
}

.tala-cine__slide.is-active .tala-cine__img {
  animation: talaCineKenBurns 8s ease-out forwards;
}

@keyframes talaCineKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .tala-cine__slide.is-active .tala-cine__img {
    animation: none;
  }
}

.tala-cine__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tala-cine__overlay--start {
  background: linear-gradient(90deg, rgba(40, 24, 22, 0.45) 0%, rgba(40, 24, 22, 0.1) 42%, rgba(40, 24, 22, 0.02) 100%);
}

.tala-cine__overlay--end {
  background: linear-gradient(270deg, rgba(40, 24, 22, 0.45) 0%, rgba(40, 24, 22, 0.1) 42%, rgba(40, 24, 22, 0.02) 100%);
}

.tala-cine__greeting {
  position: absolute;
  z-index: 5;
  top: max(14px, calc(env(safe-area-inset-top) + 8px));
  inset-inline-start: clamp(16px, 5vw, 72px);
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 249, 243, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #781323;
  font-size: clamp(0.88rem, 2.4vw, 1rem);
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 6px 20px rgba(76, 44, 38, 0.12);
  border: 1px solid rgba(148, 26, 46, 0.12);
}

.tala-cine__content {
  position: absolute !important;
  z-index: 4;
  top: auto !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 1.6vw, 14px);
  max-width: min(92vw, 520px);
  padding: clamp(12px, 2.5vw, 28px);
  bottom: max(calc(var(--tala-dock-h, 64px) + 12px), 24px);
  text-align: start;
}

.tala-cine__content--start {
  inset-inline-start: clamp(16px, 5vw, 72px);
}

.tala-cine__content--end {
  inset-inline-end: clamp(16px, 5vw, 72px);
  align-items: flex-end;
  text-align: end;
}

.tala-cine__since {
  margin: 0;
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 14px rgba(40, 24, 22, 0.55);
}

.tala-cine__brand {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.85rem, 6.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: #fff9f2;
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(40, 24, 22, 0.45);
  overflow-wrap: anywhere;
}

.tala-cine__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 44px;
  padding: 0 clamp(22px, 4vw, 32px);
  border-radius: 999px;
  background: linear-gradient(135deg, #941a2e, #781323);
  color: #fff9f2;
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(40, 24, 22, 0.28);
  transition: transform 0.25s ease, background 0.25s ease;
}

.tala-cine__cta:hover,
.tala-cine__cta:focus-visible {
  background: #62632d;
  transform: translateY(-2px);
  outline: none;
}

.tala-cine__cta-arrow {
  transition: transform 0.25s ease;
}

[dir="rtl"] .tala-cine__cta-arrow {
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  body.page-home {
    --tala-cine-h: clamp(70dvh, 78dvh, 82dvh);
  }

  .tala-cine__greeting {
    top: max(12px, calc(env(safe-area-inset-top) + 6px));
    inset-inline-start: max(16px, env(safe-area-inset-left));
  }

  .tala-cine__content {
    inset-inline: 0 !important;
    top: auto !important;
    align-items: center !important;
    text-align: center !important;
    max-width: none;
    width: 100%;
    bottom: calc(var(--tala-dock-h, 64px) + 12px + env(safe-area-inset-bottom, 0px));
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
    padding-bottom: 8px;
  }

  .tala-cine__overlay--start,
  .tala-cine__overlay--end {
    background: linear-gradient(180deg, rgba(40, 24, 22, 0.06) 0%, rgba(40, 24, 22, 0.3) 55%, rgba(40, 24, 22, 0.52) 100%) !important;
  }

  .tala-cine__cta {
    width: auto;
    max-width: min(92vw, 300px);
    padding-inline: clamp(18px, 5vw, 28px);
  }

  .tala-cine__cta span {
    color: #fff9f2 !important;
    -webkit-text-fill-color: #fff9f2 !important;
    font-size: clamp(0.88rem, 3.6vw, 1rem);
    line-height: 1.25;
  }
}

@media (min-width: 1024px) {
  body.page-home {
    --tala-cine-h: clamp(75dvh, 85dvh, 90dvh);
  }

  body.page-home .tala-cine__content {
    bottom: max(32px, calc(var(--tala-dock-h, 64px) + 16px));
  }
}

/* Hide chat FAB over hero CTA on homepage */
@media (max-width: 1023px) {
  body.page-home.hero-at-top .tala-chat-floating {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  }

  body.page-home:not(.hero-at-top) .tala-chat-floating {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* Same for back-to-top — no orphan burgundy pill over hero image */
  body.page-home.hero-at-top .back-to-top {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  body.page-home {
    --tala-cine-h: clamp(85dvh, 92dvh, 100dvh);
  }

  .tala-cine__content {
    bottom: clamp(12px, 3vw, 24px);
    gap: 8px;
  }

  .tala-cine__brand {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
  }
}
