@font-face {
  font-family: 'Helvetica';
  src: url('/assets/Helvetica.ttc') format('truetype');
  font-weight: normal;
  font-style: normal;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --menta:    #98e6d7;
  --azul:     #4cb4c6;
  --noche:    #0e0d44;
  --blanco:   #ffffff;
  --radius:   999px;
}

html, body {
  height: 100%;
  font-family: 'Helvetica', Helvetica, Arial, sans-serif;
  background-color: var(--noche);
  color: var(--blanco);
  overflow: hidden; /* sin scroll en body — el chat scrollea solo */
}

/* ── Fondo fijo (parallax real) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/assets/fondo.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.92;
  z-index: 0;
}

/* ── Layout principal ── */
.main {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 24px;
}

/* ── Cabecera (estática) ── */
.header {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  transition: margin-bottom 0.5s ease;
}

.logo {
  height: clamp(120px, 20vw, 260px);
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(0);
  transition: height 0.5s ease;
}

/* ── Intro ── */
.intro {
  margin-top: 8px;
  margin-bottom: 24px;
  flex-shrink: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.5s ease;
  max-height: 120px;
  opacity: 1;
}

.intro-text {
  text-align: center;
  font-size: clamp(13px, 1.7vw, 17px);
  letter-spacing: 0.08em;
  line-height: 1.8;
  color: var(--noche);
  font-weight: 900;
  text-transform: uppercase;
  -webkit-text-stroke: 1px var(--noche);
}

/* Subtítulo que aparece al chatear */
.chat-subtitle {
  margin-top: 8px;
  margin-bottom: 16px;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease 0.2s, opacity 0.4s ease 0.3s, margin 0.5s ease;
  text-align: center;
}

.chat-subtitle p {
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--noche);
  font-weight: 900;
  text-transform: uppercase;
  -webkit-text-stroke: 0.8px var(--noche);
}

.chat-subtitle a {
  color: var(--noche);
  text-decoration: none;
  -webkit-text-stroke: 0.8px var(--noche);
  font-weight: 900;
}

/* ── Estado: conversación activa ── */
.main.chatting .logo {
  height: clamp(48px, 7vw, 80px);
}

.main.chatting .intro {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.main.chatting .chat-subtitle {
  max-height: 80px;
  opacity: 1;
  margin-bottom: 16px;
}

.main.chatting .quick-btns {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
}

/* ── Botones rápidos ── */
.quick-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 680px;
  margin-bottom: 24px;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 120px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
}

.quick-btn {
  background: transparent;
  border: 1.5px solid var(--noche);
  color: var(--noche);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, -webkit-text-stroke 0.18s;
  white-space: nowrap;
  -webkit-text-stroke: 0.8px var(--noche);
}

.quick-btn:hover,
.quick-btn:active {
  background: var(--noche);
  color: var(--menta);
  border-color: var(--noche);
  -webkit-text-stroke: 0.8px var(--menta);
}

/* ── Área de chat (scrolleable) ── */
.chat-area {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  min-height: 0; /* crucial para que flex + overflow funcione */
}

.msg {
  display: flex;
  gap: 10px;
  animation: fadeUp 0.25s ease;
}

.msg.user {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 75%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.msg.user .msg-bubble {
  background: var(--noche);
  color: var(--menta);
  border-bottom-right-radius: 4px;
}

.msg.ai .msg-bubble {
  background: rgba(14, 13, 68, 0.78);
  color: var(--blanco);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(6px);
}

/* Indicador de escritura */
.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--menta);
  border-radius: 50%;
  margin: 0 2px;
  animation: blink 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%            { opacity: 1;   transform: scale(1); }
}

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

/* ── Input de chat ── */
.chat-input-wrap {
  width: 100%;
  max-width: 680px;
  flex-shrink: 0;
  margin-top: 12px;
}

.chat-input-box {
  display: flex;
  align-items: center;
  background: rgba(14, 13, 68, 0.55);
  border: 1.5px solid rgba(14, 13, 68, 0.7);
  border-radius: var(--radius);
  padding: 6px 6px 6px 20px;
  backdrop-filter: blur(8px);
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--blanco);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.chat-input::placeholder {
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--noche);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--menta);
  flex-shrink: 0;
  transition: background 0.18s, transform 0.1s;
}

.chat-send:hover  { background: #1a1960; }
.chat-send:active { transform: scale(0.93); }

/* ── Footer ── */
.footer {
  width: 100%;
  flex-shrink: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(14,13,68,0.25);
  margin-top: 12px;
  text-align: center;
}

.footer-links {
  font-size: 11px;
  color: rgba(14,13,68,0.7);
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  -webkit-text-stroke: 0.3px rgba(14,13,68,0.7);
}

.footer-links a {
  color: inherit;
  text-decoration: underline;
}

.footer-links a:hover { color: var(--noche); }

.footer-copy {
  font-size: 11px;
  color: rgba(14,13,68,0.7);
  font-weight: 700;
  -webkit-text-stroke: 0.3px rgba(14,13,68,0.7);
  margin-top: 5px;
  letter-spacing: 0.05em;
  text-align: center;
  width: 100%;
}

/* ── Banner de cookies ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--noche);
  border-top: 1px solid rgba(76,180,198,0.3);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  font-size: 13px;
  flex-wrap: wrap;
}

.cookie-banner.hidden { display: none; }

.cookie-banner p { flex: 1; color: rgba(255,255,255,0.75); }
.cookie-banner a { color: var(--menta); }

.cookie-btn {
  background: var(--menta);
  color: var(--noche);
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-btn:hover { background: var(--azul); color: var(--blanco); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .main { padding: 32px 16px 16px; }
  .quick-btn { font-size: 10px; padding: 8px 14px; }
  .footer-links { font-size: 10px; gap: 6px; }
}
