/* =============================================
   AutoHome — Estilos customizados
   Stack: Tailwind CDN + CSS custom
   Paleta: extraída da logo AutoHome
   ============================================= */

:root {
  --ah-deep:      #0D1B2E; /* fundo geral, footer, nav */
  --ah-primary:   #162B4A; /* cards, seções, superfícies */
  --ah-mid:       #1E3F6E; /* hover states, bordas, ícones */
  --ah-accent:    #2D5FA0; /* links, badges, CTA secundário */
  --ah-highlight: #4A85CC; /* acentos suaves, ícones sobre fundo escuro */
  --ah-light:     #B8D4F0; /* textos secundários sobre fundo escuro */
  --ah-cream:     #E8F2FB; /* textos primários, superfícies claras */
  --ah-muted:     #6B97C9; /* textos mutados, placeholders */
  --ah-green:     #2D7A5F; /* mantido para botão WhatsApp */
}

/* ---- Base ---- */
* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

::selection {
  background: var(--ah-accent);
  color: var(--ah-cream);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ah-deep); }
::-webkit-scrollbar-thumb { background: var(--ah-mid); border-radius: 2px; }

/* ---- Nav ---- */
.nav-blur {
  background: rgba(13, 27, 46, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30, 63, 110, 0.5);
}

/* ---- Hero ---- */
.hero-section {
  background:
    radial-gradient(ellipse 80% 50% at 50% 120%, rgba(74, 133, 204, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 30% 60%, rgba(45, 95, 160, 0.06) 0%, transparent 50%),
    var(--ah-deep);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 80%, rgba(74, 133, 204, 0.1), transparent);
  pointer-events: none;
}

.grain-overlay {
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10%       { transform: translate(-2%, -3%); }
  20%       { transform: translate(3%, 1%); }
  30%       { transform: translate(-1%, 4%); }
  40%       { transform: translate(4%, -2%); }
  50%       { transform: translate(-3%, 3%); }
  60%       { transform: translate(2%, -4%); }
  70%       { transform: translate(-4%, 1%); }
  80%       { transform: translate(3%, 3%); }
  90%       { transform: translate(-1%, -2%); }
}

/* ---- Scroll indicator ---- */
.scroll-indicator {
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;   transform: translateX(-50%) translateY(6px); }
}

/* ---- Fade-up animation ---- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Rotinas ---- */
.rotina-card {
  transition: background 0.4s ease;
}
.rotina-card:hover {
  background: #1A3358;
}
.rotina-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.8;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.rotina-card:hover .rotina-dot {
  transform: scale(1.4);
  opacity: 1;
}

/* ---- Kits ---- */
.kit-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.kit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(13, 27, 46, 0.6);
}
.kit-featured {
  box-shadow: 0 0 0 1px rgba(74, 133, 204, 0.35), 0 16px 48px rgba(74, 133, 204, 0.1);
}
.featured-badge {
  position: absolute;
  top: -1px;
  right: 24px;
  background: var(--ah-highlight);
  color: var(--ah-deep);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
  font-family: 'DM Sans', sans-serif;
}

.kit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ah-muted);
  font-weight: 300;
  line-height: 1.5;
}
.kit-item::before {
  content: '—';
  color: var(--ah-highlight);
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Steps ---- */
.step-row {
  transition: background 0.3s ease;
}
.step-row:hover {
  background: #1A3358;
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--ah-accent);
  color: var(--ah-cream);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ah-muted);
  border: 1px solid var(--ah-mid);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.btn-secondary:hover {
  color: var(--ah-cream);
  border-color: var(--ah-highlight);
}

.btn-outline {
  background: transparent;
  color: var(--ah-muted);
  border: 1px solid var(--ah-mid);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.btn-outline:hover {
  color: var(--ah-cream);
  border-color: var(--ah-highlight);
}

.btn-cta {
  background: rgba(45, 95, 160, 0.18);
  color: var(--ah-highlight);
  border: 1px solid rgba(74, 133, 204, 0.35);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: background 0.2s ease;
}
.btn-cta:hover {
  background: rgba(45, 95, 160, 0.3);
}

.btn-send {
  background: var(--ah-accent);
  color: var(--ah-cream);
  transition: opacity 0.2s ease;
}
.btn-send:hover { opacity: 0.85; }
.btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Chat ---- */
.chat-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--ah-mid) transparent;
}

.chat-message {
  display: flex;
  gap: 10px;
  animation: msg-in 0.3s ease;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 300;
}

.chat-bubble.bot {
  background: var(--ah-primary);
  color: var(--ah-light);
  border-radius: 4px 16px 16px 16px;
}

.chat-bubble.user {
  background: var(--ah-accent);
  color: var(--ah-cream);
  border-radius: 16px 4px 16px 16px;
  font-weight: 400;
}

.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ah-primary);
  border-radius: 4px 16px 16px 16px;
  width: fit-content;
}
.chat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ah-muted);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* Quick replies */
.quick-reply-btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--ah-mid);
  border-radius: 20px;
  font-size: 12px;
  color: var(--ah-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  background: transparent;
}
.quick-reply-btn:hover {
  border-color: var(--ah-highlight);
  color: var(--ah-highlight);
}

/* CTA Mercado Livre (dentro do chat) */
.ml-cta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 75%;
  padding: 12px 18px;
  border-radius: 4px 16px 16px 16px;
  background: #FFE600;
  color: #2D3277;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(255, 230, 0, 0.18);
}
.ml-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 230, 0, 0.28);
}
.ml-cta-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.3;
}
.ml-cta-sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  opacity: 0.8;
}