/* Hero – LIGHT – Chat top, headline bottom, fits 100vh */

/* Shared background wrapper — one stretched image across hero + pain section */
.hero-pain-bg {
  position: relative;
  background: url('../images/landing/landig-page-hero-background-streched.png') center top / 100% 100% no-repeat;
}

/* 75% white overlay across the entire stretched background */
.hero-pain-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  z-index: 0;
  pointer-events: none;
}

/* Bottom gradient — smooth fade into the next section */
.hero-pain-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg, #FAFBFD));
  z-index: 0;
  pointer-events: none;
}

.section-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
  /* Transparent — background comes from .hero-pain-bg parent */
  background: transparent !important;
  z-index: 1;
}


.hero-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  padding-top: 82px;

}

/* ===== Chat Window ===== */
.hero-chat-wrap .msg {
  font-size: .95rem;
}

.hero-chat-wrap {
  width: 77vw;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 0 0;
  position: relative;
  z-index: 2;
}

.chat-window {
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--radius-xl);
  box-shadow:
    0 0 0 .5px rgba(255, 255, 255, .5),
    0 8px 40px rgba(0, 0, 0, .08),
    0 2px 8px rgba(0, 0, 0, .04),
    inset 0 1px 0 rgba(255, 255, 255, .7);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chat-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  background: rgba(255, 255, 255, .35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.chat-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 60%, #eaf0ff 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(79, 110, 247, .15), 0 0 0 1px rgba(79, 110, 247, .06);
}

.chat-name {
  color: var(--text);
  font-size: .82rem;
  display: inline;
  line-height: 1.1;
}

.chat-status {
  color: var(--green);
  font-size: .68rem;
}

/* Messages area */
.chat-messages {
  padding: 16px 20px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: scroll;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE */
  overscroll-behavior: none;
  touch-action: none;
  pointer-events: none;
  min-height: 0;
}

.chat-messages::-webkit-scrollbar {
  display: none;
}

.chat-messages .msg {
  max-width: min(82%, 540px);
}

/* Initial option cards – large buttons in the messages area */

/* Light theme message overrides */
.section-hero.s-light .msg-bot {
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.section-hero.s-light .msg-user {
  background: rgba(79, 110, 247, .1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid rgba(79, 110, 247, .12);
  box-shadow: 0 1px 4px rgba(79, 110, 247, .06);
}

/* ===== Input Bar ===== */
.chat-inputbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(0, 0, 0, .04);
  background: rgba(255, 255, 255, .3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  padding: 10px 16px;
}

/* The input field container – holds either suggestions OR the actual input */
.chat-input-field {
  flex: 1;
  position: relative;
  min-height: 38px;
  height: auto;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 18px;
  padding: 4px 6px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .03);
}

.chat-input-field:focus-within {
  border-color: rgba(79, 110, 247, .3);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .08), inset 0 1px 2px rgba(0, 0, 0, .03);
}

/* When suggestions are showing, hide the input */
.chat-input-field.has-suggestions input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

/* The actual input – no border/bg since parent handles it */
.chat-input-field input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 4px;
  color: var(--text);
  font-family: var(--ff);
  font-size: .82rem;
  outline: none;
  caret-color: var(--accent);
}

.chat-input-field input::placeholder {
  color: var(--text-muted);
  opacity: .5;
}

.chat-input-field input.typing-active {
  color: var(--text);
}

/* Inline suggestions – inside the input field */
.chat-input-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  padding: 2px 0;
}

.chat-input-suggestions:empty {
  display: none;
}

.suggestion-chip {
  padding: 5px 12px;
  background: rgba(79, 110, 247, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(79, 110, 247, .12);
  border-radius: var(--radius-full);
  color: #1a1a2e;
  font-family: var(--ff);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
  animation: chipFadeIn .3s var(--ease) backwards;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(79, 110, 247, .06);
}

.suggestion-chip:nth-child(1) {
  animation-delay: .05s;
}

.suggestion-chip:nth-child(2) {
  animation-delay: .1s;
}

.suggestion-chip:nth-child(3) {
  animation-delay: .15s;
}

.suggestion-chip:nth-child(4) {
  animation-delay: .2s;
}

.suggestion-chip:hover {
  background: rgba(79, 110, 247, .14);
  border-color: rgba(79, 110, 247, .25);
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(79, 110, 247, .12);
}

.suggestion-chip.chip-exit {
  animation: chipExit .2s var(--ease) forwards;
  pointer-events: none;
}

@keyframes chipFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chipExit {
  to {
    opacity: 0;
    transform: scale(.92);
  }
}

/* Start over button (in input field, right side) */
.chat-back-btn {
  flex-shrink: 0;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 110, 247, .08);
  border: 1px solid rgba(79, 110, 247, .12);
  color: var(--accent);
  cursor: pointer;
  margin-left: auto;
  margin-right: -2px;
  font-family: var(--ff);
  font-size: .72rem;
  font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.chat-back-btn:hover {
  background: rgba(79, 110, 247, .14);
  color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(79, 110, 247, .15);
}

/* Send button */
.chat-send-btn {
  color: var(--accent);
  padding: 6px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 110, 247, .06);
  border: 1px solid rgba(79, 110, 247, .1);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.chat-send-btn:hover {
  background: rgba(79, 110, 247, .12);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(79, 110, 247, .15);
}

.chat-send-btn.send-flash {
  transform: scale(1.15);
  background: rgba(79, 110, 247, .15);
  color: var(--accent);
}

/* Typing indicator — glass bubble */
.section-hero .typing-indicator {
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
  padding: 10px 16px;
}

.section-hero .typing-indicator span {
  background: var(--accent);
  opacity: .5;
}

/* ===== Headline ===== */
.hero-headline {
  text-align: center;
  width: 100vw;
  margin: 0 auto;
  padding: 32px 24px 0;
  flex-shrink: 0;
}

.hero-h1 {
  font-size: clamp(2.2rem, 6.5vw, 7.5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0;
  letter-spacing: -.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
  white-space: nowrap;
}

.hero-sub {
  max-width: 80vw;
  margin: 12px auto 0;
  font-size: clamp(.96rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: #4A4F6A;
  font-weight: 400;
  letter-spacing: -.01em;
}

/* ===== Scroll Indicator — blue underline bar ===== */
.hero-scroll-indicator {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 22px;
  margin-top: auto;
  transition: opacity .4s ease;
}

.scroll-mouse {
  width: 56px;
  height: 2px;
  border: none;
  background: linear-gradient(90deg,
      rgba(79, 110, 247, 0),
      rgba(79, 110, 247, .8) 30%,
      rgba(129, 140, 248, 1) 50%,
      rgba(79, 110, 247, .8) 70%,
      rgba(79, 110, 247, 0));
  border-radius: 2px;
  position: relative;
  animation: scrollBarPulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(79, 110, 247, .4);
}

@keyframes scrollBarPulse {

  0%,
  100% {
    opacity: .5;
    transform: scaleX(.7);
    box-shadow: 0 0 6px rgba(79, 110, 247, .3);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
    box-shadow: 0 0 14px rgba(79, 110, 247, .6);
  }
}

/* Anim helpers */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .8s var(--ease) forwards;
}

.anim-d1 {
  animation-delay: .15s;
}

.anim-d2 {
  animation-delay: .3s;
}

.anim-d3 {
  animation-delay: .45s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pop-In — scale reveal from center.
   Uses `transform: scale()` deliberately — NOT the independent `scale` property.
   The JS scroll handler sets `element.style.scale` (independent property),
   so the animation must use `transform` to avoid overriding it.
   CSS animation values with `forwards` override inline styles of the SAME property,
   so using different properties lets them compose independently. */
.anim-pop-in {
  opacity: 0;
  transform: scale(.3);
  animation: popIn .7s var(--ease) forwards;
  will-change: transform, opacity;
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Shimmer Sweep on heading */
.hero-shimmer {
  position: relative;
  overflow: hidden;
  padding-bottom: .1em;
}

.hero-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.25) 40%,
      rgba(255, 255, 255, 0.4) 50%,
      rgba(255, 255, 255, 0.25) 60%,
      transparent 100%);
  pointer-events: none;
  animation: shimmerSweepH1 1.2s ease-in-out .2s forwards;
  opacity: 0;
}

@keyframes shimmerSweepH1 {
  0% {
    left: -50%;
    opacity: 1;
  }

  100% {
    left: 120%;
    opacity: 1;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-inner {
    padding-top: 67px;
  }

  .hero-chat-wrap {
    width: 94vw;
  }

  .hero-headline {
    width: 92vw;
    padding: 16px 16px 0;
  }

  .hero-h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .chat-messages {
    padding: 12px 14px 4px;
    gap: 6px;
  }

  .chat-messages .msg {
    max-width: 85%;
  }

  .suggestion-chip {
    font-size: .68rem;
    padding: 4px 8px;
  }

  .chat-inputbar {
    padding: 8px 12px;
  }

  .chat-topbar {
    padding: 10px 14px;
  }
}