/* Journey & Chat Layout - Asymmetric 40/60 Split screen */
.journey-section {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-primary);
  display: none; /* Hide until Vamos começar is clicked */
}

.journey-section.active {
  display: block;
}

/* Discrete Progress Bar at the top of the section */
.progress-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(243, 245, 242, 0.03);
  z-index: 100;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background-color: var(--accent);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(199, 242, 62, 0.5);
}

/* 40/60 Grid Split */
.journey-grid {
  display: grid;
  grid-template-columns: 4fr 6fr;
  width: 100%;
  height: 100%;
}

/* Left Column: Brand Panel (40%) */
.brand-panel {
  padding: 100px 64px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-subtle);
  height: 100%;
  user-select: none;
}

.brand-top {
  display: flex;
  align-items: center;
}

.brand-slogan {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.brand-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.brand-logo {
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: logo-breathing 8s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes logo-breathing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.008); }
}

.brand-divider {
  width: 48px;
  height: 1px;
  background-color: var(--accent);
  margin-bottom: 32px;
}

/* Dynamic Benefit Box */
.brand-benefit-container {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.brand-benefit-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-benefit {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
}

.brand-benefit .highlight {
  color: var(--accent);
  font-weight: 600;
}

.brand-bottom {
  display: flex;
  align-items: flex-end;
}

.brand-footer {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Right Column: Chat Panel (60%) */
.chat-panel {
  padding: 100px 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.chat-container {
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* Navigation Back Button */
.chat-back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  width: fit-content;
  opacity: 0;
  pointer-events: none;
  transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-4px);
  outline: none;
}

.chat-back-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.chat-back-btn:hover {
  color: var(--text-primary);
  transform: translateX(-8px);
}

.back-icon {
  stroke-width: 2px;
}

/* Chat Message Area */
.chat-messages {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  min-height: 320px;
}

/* Conversational Question Container */
.chat-step {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  position: absolute;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  filter: blur(4px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-step.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
  filter: blur(0);
  position: relative;
}

.chat-step.exiting {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  filter: blur(4px);
  position: absolute;
}

/* Chat bubble styling */
.chat-bubble-wrapper {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--bg-panel);
  flex-shrink: 0;
  letter-spacing: -0.06em;
}

.chat-bubble-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
}

.chat-bubble {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 16px 22px;
  border-radius: 12px;
  border-top-left-radius: 2px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.chat-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  padding-left: 4px;
}

/* Options / Choices groups */
.chat-options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-left: 48px; /* Indented under message text */
}

/* Dynamic Input Meta notes */
.chat-meta-notes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  user-select: none;
}

.chat-meta-skip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chat-meta-skip.visible {
  opacity: 0.6;
}

.chat-privacy {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lock-icon {
  stroke-width: 2px;
  opacity: 0.7;
}

/* Tablet Adaptive Layout */
@media (max-width: 992px) {
  .journey-section {
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height to prevent browser bar issues */
    overflow: hidden;
  }

  .journey-grid {
    grid-template-columns: 1fr;
    height: 100%;
  }
  
  .brand-panel {
    display: none; /* Hide brand panel on mobile/tablet to prioritize the chat */
  }
  
  .chat-panel {
    height: 100%;
    padding: 96px 48px 32px; /* Ensure padding top clears the fixed header */
    box-sizing: border-box;
  }
  
  .chat-container {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .chat-messages {
    flex-grow: 1;
    min-height: 0; /* Let chat area shrink to fit inside the viewport */
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .chat-step.exiting {
    display: none;
  }
}

/* Mobile Adaptive Layout */
@media (max-width: 576px) {
  .chat-panel {
    padding: 80px 16px 16px; /* Tighter padding for mobile screens */
  }
  .chat-options-group {
    padding-left: 0; /* Align directly under bubble on tight mobile screens */
  }
  .chat-bubble-content {
    max-width: 95%;
  }
  .chat-bubble {
    font-size: 15px;
    padding: 12px 16px;
  }
}

/* Success Checkmark Animations */
.success-svg-wrapper {
  display: inline-block;
  margin-bottom: 8px;
}

.success-checkmark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--accent);
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 var(--accent);
  animation: check-fill 0.4s ease-in-out 0.4s forwards, check-scale 0.3s ease-in-out 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--accent);
  fill: none;
  animation: check-stroke 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke: var(--bg-primary); /* background color to match inner checkmark */
  animation: check-stroke 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

@keyframes check-stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes check-scale {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes check-fill {
  100% { box-shadow: inset 0 0 0 30px var(--accent); }
}

