:root{ color-scheme: light; }
html{ scroll-behavior:smooth; overflow-x: hidden; }
body{ overflow-x: hidden; }

/* Avatar effect container: ensure canvas has space to render + CSS fallback ring */
[data-avatar-effect] {
  min-width: 280px;
  width: 100%;
}
[data-avatar-effect] .avatar-effect-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 240px;
  min-height: 280px;
  border-radius: 20px;
  padding: 16px;
  box-sizing: border-box;
  overflow: visible;
}
[data-avatar-effect="fire"] .avatar-effect-img-wrap {
  animation: avatar-glow-fire 2.5s ease-in-out infinite;
  border: 3px solid rgba(211, 47, 47, 0.6);
  box-shadow: 0 0 25px rgba(211, 47, 47, 0.6), 0 0 50px rgba(255, 140, 0, 0.4), inset 0 0 30px rgba(255, 87, 34, 0.15);
}
[data-avatar-effect="electricity"] .avatar-effect-img-wrap {
  animation: avatar-glow-electricity 2.2s ease-in-out infinite;
  border: 3px solid rgba(13, 82, 186, 0.6);
  box-shadow: 0 0 25px rgba(13, 82, 186, 0.6), 0 0 50px rgba(100, 200, 255, 0.4), inset 0 0 30px rgba(100, 181, 246, 0.15);
}
[data-avatar-effect="green-fire-em"] .avatar-effect-img-wrap {
  animation: avatar-glow-green-em 2.8s ease-in-out infinite;
  border: 3px solid rgba(31, 157, 85, 0.7);
  box-shadow: 0 0 25px rgba(31, 157, 85, 0.6), 0 0 50px rgba(136, 68, 255, 0.45), inset 0 0 30px rgba(76, 175, 80, 0.2);
}
@keyframes avatar-glow-fire {
  0%, 100% { border-color: rgba(211, 47, 47, 0.6); box-shadow: 0 0 25px rgba(211, 47, 47, 0.6), 0 0 50px rgba(255, 140, 0, 0.4), inset 0 0 30px rgba(255, 87, 34, 0.15); }
  50% { border-color: rgba(255, 87, 34, 0.9); box-shadow: 0 0 40px rgba(255, 87, 34, 0.8), 0 0 70px rgba(255, 193, 7, 0.5), inset 0 0 40px rgba(255, 152, 0, 0.25); }
}
@keyframes avatar-glow-electricity {
  0%, 100% { border-color: rgba(13, 82, 186, 0.6); box-shadow: 0 0 25px rgba(13, 82, 186, 0.6), 0 0 50px rgba(100, 200, 255, 0.4), inset 0 0 30px rgba(100, 181, 246, 0.15); }
  50% { border-color: rgba(100, 181, 246, 0.9); box-shadow: 0 0 40px rgba(100, 181, 246, 0.8), 0 0 70px rgba(255, 255, 255, 0.5), inset 0 0 40px rgba(187, 222, 251, 0.25); }
}
@keyframes avatar-glow-green-em {
  0%, 100% { border-color: rgba(31, 157, 85, 0.7); box-shadow: 0 0 25px rgba(31, 157, 85, 0.6), 0 0 50px rgba(136, 68, 255, 0.45), inset 0 0 30px rgba(76, 175, 80, 0.2); }
  50% { border-color: rgba(76, 175, 80, 0.9); box-shadow: 0 0 40px rgba(76, 175, 80, 0.75), 0 0 65px rgba(156, 39, 176, 0.55), inset 0 0 40px rgba(129, 199, 132, 0.25); }
}

.bg-mesh{
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(13,82,186,.10), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, rgba(212,175,54,.12), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(0,198,255,.08), transparent 55%),
    linear-gradient(180deg, #F6F8FF 0%, #FFFFFF 55%, #F6F8FF 100%);
}

.card{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

.shadow-soft{ box-shadow: 0 30px 120px rgba(0,0,0,.10); }

.btn{
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(0,0,0,.06); }

.btnPrimary{
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  color: #0B0D12;
  background: var(--accent, #D4AF36);
  border: 1px solid color-mix(in srgb, var(--accent, #D4AF36) 60%, #000 40%);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--accent, #D4AF36) 35%, transparent);
  transition: transform .15s ease, filter .15s ease;
}
.btnPrimary:hover{ transform: translateY(-1px); filter: brightness(1.03); }

.kbdKey{
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.70);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 14px 40px rgba(13,82,186,.10);
}

/* ---- Fake chat (demo conversation with agent) ---- */
.fake-chat {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: 0 25px 80px rgba(0,0,0,.08);
  max-width: 420px;
  margin: 0 auto;
}
.fake-chat__header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.fake-chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(0,0,0,.06);
}
.fake-chat__title { font-weight: 700; font-size: 1rem; color: #0B0D12; }
.fake-chat__sub { font-size: 0.75rem; color: rgba(0,0,0,.5); }
.fake-chat__messages {
  padding: 16px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fake-chat__msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  animation: fake-chat-msg-in 0.4s ease forwards;
}
.fake-chat__msg--user {
  align-self: flex-end;
  background: var(--chat-user-bg, #0D52BA);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.fake-chat__msg--agent {
  align-self: flex-start;
  background: #fff;
  color: #0B0D12;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-bottom-left-radius: 6px;
}
.fake-chat__typing {
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  display: flex;
  gap: 4px;
  opacity: 0;
  animation: fake-chat-msg-in 0.3s ease forwards;
}
.fake-chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  animation: fake-chat-bounce 0.6s ease-in-out infinite;
}
.fake-chat__typing span:nth-child(2) { animation-delay: 0.1s; }
.fake-chat__typing span:nth-child(3) { animation-delay: 0.2s; }
@keyframes fake-chat-msg-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fake-chat-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .fake-chat__msg { opacity: 1; transform: none; animation: none; }
  .fake-chat__typing span { animation: none; }
}

/* ——— Mobile responsive ——— */
@media (max-width: 767px) {
  [data-avatar-effect] .avatar-effect-img-wrap {
    min-height: 220px;
    min-width: 200px;
    padding: 12px;
  }
  .fake-chat { max-width: 100%; }
  .fake-chat__messages { min-height: 220px; padding: 12px; }
  .btn, .btnPrimary {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 0.9375rem;
  }
}

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.hamburger:hover { background: rgba(0,0,0,.06); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay + drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  max-height: 100vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  z-index: 50;
  padding: 1.25rem 1.5rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.nav-overlay.is-open .nav-drawer { transform: translateX(0); }
.nav-menu-link {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: #0B0D12;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.08);
  transition: background 0.15s;
}
.nav-menu-link:hover { background: rgba(0,0,0,.04); }
.nav-menu-ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 1rem; }
.nav-menu-ctas .btn, .nav-menu-ctas .btnPrimary { width: 100%; justify-content: center; text-align: center; }
@media (min-width: 768px) {
  .hamburger { display: none !important; }
  .nav-overlay { display: none !important; }
}

/* Profile pages: section padding on small screens */
@media (max-width: 767px) {
  section.py-14 { padding-top: 2rem; padding-bottom: 2rem; }
  section.py-16 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* Ver perfil modal: fit on mobile, scrollable */
@media (max-width: 767px) {
  #revealModal.fixed.inset-0 { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #revealModal > div.relative { max-height: 95dvh; overflow-y: auto; padding: 1rem; align-items: flex-start; }
  #revealModal .rounded-3xl.bg-white { max-height: 90dvh; overflow-y: auto; }
}

/* Lina: keep text/name above fire (avatar block) */
[data-avatar-effect="fire"] .avatar-effect-img-wrap { position: relative; }
[data-avatar-effect="fire"] .avatar-effect-img-wrap img { position: relative; z-index: 1; }
