:root {
  --accent-hue: 165;
  --bg-dark: hsl(var(--accent-hue), 54%, 11%);
  --accent-teal: hsl(var(--accent-hue), 33%, 46%);
  --accent-teal-light: hsl(var(--accent-hue), 44%, 63%);
  --accent-gold: #EAC775;
  --text-light: #FFFFFF;
  --text-dark: #111827;
  --text-muted: #E2E8F0;
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  --glass-blur: 20px;
  --glass-opacity: 0.35;
  --card-radius: 24px;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Background Image */
.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/img/background.jpg');
  background-size: cover;
  background-position: center;
  z-index: -1;
  filter: brightness(var(--bg-brightness, 0.85)) blur(var(--bg-blur, 8px));
  transform: scale(calc(1 + var(--bg-blur, 8px) / 100));
  opacity: 0;
  animation: bgLoadScaleFade 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

@keyframes bgLoadScaleFade {
  0% {
    opacity: 0;
    transform: scale(1.12);
  }
  100% {
    opacity: var(--bg-opacity, 1);
    transform: scale(calc(1 + var(--bg-blur, 8px) / 100));
  }
}

@keyframes pageLoadScaleFade {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.5rem 2.5rem;
}

/* Top Navigation */
.glass-nav {
  background: var(--nav-bg-color, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: calc(var(--card-radius) * 0.83);
  border: var(--nav-border, 1px solid rgba(255, 255, 255, 0.8));
  padding: var(--nav-padding, 0.6rem 2rem);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  opacity: 0;
  animation: pageLoadScaleFade 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  position: relative;
  width: 100px;
  /* Maintains flexbox spacing in header */
  height: 40px;
  z-index: 50;
  opacity: 0;
  animation: pageLoadScaleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.logo-glass-badge {
  position: absolute;
  top: 50%;
  left: -10px;
  /* Pull slightly over the left edge of the nav pill */
  transform: translateY(-50%);
  width: var(--logo-badge-size, 110px);
  height: var(--logo-badge-size, 110px);
  background: var(--logo-bg-color, rgba(13, 44, 34, 0.85));
  /* Deep dark green glass */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--logo-radius, 50%);
  border: 1px solid var(--logo-border-color, rgba(234, 199, 117, 0.3));
  /* Subtle gold rim */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, width 0.3s ease, height 0.3s ease;
}

.logo-glass-badge:hover {
  transform: translateY(-50%) scale(var(--logo-hover-scale, 1.05));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(234, 199, 117, 0.2);
}

.header-logo-gold {
  position: relative;
  width: calc(var(--logo-badge-size, 110px) * 1.136);
  height: calc(var(--logo-badge-size, 110px) * 1.136);

  /* Glossy 3D gradient */
  background: linear-gradient(135deg, #FFF9E6 0%, var(--accent-gold) 45%, #997300 100%);

  -webkit-mask: url('presentation/logo_udeltequila.png') no-repeat center center;
  mask: url('presentation/logo_udeltequila.png') no-repeat center center;
  -webkit-mask-size: contain;
  mask-size: contain;
  overflow: hidden;
  /* Contains the shine animation */
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.header-logo-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: skewX(-25deg);
  animation: shine var(--logo-shine-duration, 5s) infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }

  15% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.7rem;
  color: #4B5563;
  font-weight: 500;
}

.main-nav {
  display: flex;
  gap: 2.5rem;
}

.main-nav > * {
  opacity: 0;
  animation: pageLoadScaleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.main-nav > :nth-child(1) { animation-delay: 0.8s; }
.main-nav > :nth-child(2) { animation-delay: 0.9s; }
.main-nav > :nth-child(3) { animation-delay: 1.0s; }
.main-nav > :nth-child(4) { animation-delay: 1.1s; }
.main-nav > :nth-child(5) { animation-delay: 1.2s; }

.nav-link {
  color: var(--nav-link-color, var(--text-dark));
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--nav-link-hover-color, var(--accent-teal));
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--nav-active-underline, var(--accent-gold));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-actions > * {
  opacity: 0;
  animation: pageLoadScaleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.nav-actions > :nth-child(1) { animation-delay: 1.3s; }
.nav-actions > :nth-child(2) { animation-delay: 1.4s; }
.nav-actions > :nth-child(3) { animation-delay: 1.5s; }
.nav-actions > :nth-child(4) { animation-delay: 1.6s; }

.btn-primary {
  background: linear-gradient(135deg, #4F919C, #7EBDC5);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-main);
  box-shadow: 0 4px 15px rgba(79, 145, 156, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 145, 156, 0.6);
}

.btn-primary.large {
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
}

/* Immersive Start Experience Button */
.btn-immersive {
    padding: 20px 45px;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: var(--immersive-radius, 50px);
    background: linear-gradient(135deg, var(--immersive-bg-start, var(--accent-gold)), var(--immersive-bg-end, #d4af37));
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
    font-family: var(--font-main);
    animation: immersive-pulse var(--immersive-pulse-speed, 2.5s) cubic-bezier(0.4, 0, 0.2, 1) infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-immersive:hover {
    transform: scale(var(--immersive-hover-scale, 1.05));
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.7);
}

@keyframes immersive-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    10% { transform: scale(1.05) rotate(-2deg); }
    15% { transform: scale(1.05) rotate(2deg); }
    20% { transform: scale(1.05) rotate(-1deg); }
    25% { transform: scale(1.05) rotate(1deg); }
    30% { transform: scale(1.05) rotate(0deg); box-shadow: 0 0 0 25px rgba(212, 175, 55, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* Language Toggle styling */
.lang-toggle {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.3);
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  margin-left: 1rem;
}

.lang-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: var(--flag-radius, 50%);
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0.5;
  padding: 0;
}

.lang-btn.active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.lang-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lang-btn .glossy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--flag-radius, 50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 100%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Hero Section */
.hero-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-glass-card {
  width: 100%;
  max-width: var(--hero-card-max-width, 950px);
  background: hsla(var(--accent-hue), 14%, 14%, var(--glass-opacity));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
  padding: var(--hero-padding-y, 2.5rem) var(--hero-padding-x, 3.5rem);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: pageLoadScaleFade 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-glass-card.ai-expanded {
  max-width: var(--hero-card-expanded-max-width, 1150px);
  padding: var(--hero-padding-expanded-y, 3rem) var(--hero-padding-expanded-x, 4rem);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1.5rem;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: pageLoadScaleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.8s forwards;
}

.card-logo h1,
.card-logo .logo-sub {
  color: #fff;
}

.card-logo svg path {
  fill: #fff;
}

.card-icons {
  display: flex;
  gap: 3.5rem;
  transform: translateX(-20px);
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--accent-gold);
  transition: all 0.3s ease;
}

.icon-item:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.icon {
  width: 24px;
  height: 24px;
  opacity: 0.9;
}

.icon-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
}

.user-greeting {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.greeting-text {
  font-weight: 500;
  font-size: 0.9rem;
  color: #fff;
}

.date-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

.card-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: pageLoadScaleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.1s forwards;
}

.subtitle {
  color: var(--accent-gold);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.main-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: #fff;
  font-family: var(--font-main);
  letter-spacing: -1px;
}

.description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
  font-weight: 400;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.divider {
  width: 60%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 2rem 0 1.5rem;
}

.button-group.secondary {
  gap: 1.5rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.pagination {
  display: flex;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent-gold);
  transform: scale(1.2);
}

/* AI Widget Integration */
.ai-widget {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-visual {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* --- Luxury Tequila AI Cinematic Visualizer --- */
.string-ring-container {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 78, 59, 0.15) 0%, transparent 60%);
}

.ai-core {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  box-shadow: 0 0 60px rgba(16, 185, 129, 0.3);
  z-index: 0;
  transition: all 1s ease-in-out;
}

.ai-ring {
  position: absolute;
  top: 15px; left: 15px; bottom: 15px; right: 15px;
  border: 1px solid var(--orb-ring-emerald, rgba(16, 185, 129, 0.6)); /* Emerald Tequila Green */
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
  box-shadow: 0 0 15px var(--orb-ring-emerald-glow, rgba(16, 185, 129, 0.4)), inset 0 0 15px var(--orb-ring-emerald-glow, rgba(16, 185, 129, 0.4));
  z-index: 1;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  mix-blend-mode: screen;
}

/* Layered Holographic Depth & Luxury Colors */
.ai-ring:nth-child(2) { animation: ring-morph 8s linear infinite; border-color: var(--orb-ring-jade, rgba(5, 150, 105, 0.7)); } /* Jade */
.ai-ring:nth-child(3) { animation: ring-morph 9s linear infinite reverse; left: 8px; right: 8px; border-color: var(--orb-ring-gold, rgba(251, 191, 36, 0.5)); box-shadow: 0 0 20px rgba(251, 191, 36, 0.3), inset 0 0 20px rgba(251, 191, 36, 0.3); } /* Liquid Gold */
.ai-ring:nth-child(4) { animation: ring-morph 7s linear infinite; top: 15px; bottom: 15px; border-color: var(--orb-ring-emerald-light, rgba(16, 185, 129, 0.8)); } /* Emerald */
.ai-ring:nth-child(5) { animation: ring-morph 10s linear infinite reverse; left: 18px; right: 18px; top: 12px; bottom: 12px; border-color: var(--orb-ring-dark-agave, rgba(6, 78, 59, 0.9)); } /* Deep Agave */
.ai-ring:nth-child(6) { animation: ring-morph 8.5s linear infinite; top: 10px; bottom: 10px; border-color: var(--orb-ring-amber, rgba(245, 158, 11, 0.6)); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3), inset 0 0 15px rgba(245, 158, 11, 0.3); } /* Amber Gold */
.ai-ring:nth-child(7) { animation: ring-morph 9.5s linear infinite reverse; left: 12px; right: 12px; border-color: var(--orb-ring-emerald-deep, rgba(16, 185, 129, 0.9)); }
.ai-ring:nth-child(8) { animation: ring-morph 7.5s linear infinite; transform: rotate(45deg); border-color: var(--orb-ring-jade-deep, rgba(5, 150, 105, 0.8)); }
.ai-ring:nth-child(9) { animation: ring-morph 8.2s linear infinite reverse; transform: rotate(90deg); border-color: var(--orb-ring-gold-deep, rgba(251, 191, 36, 0.6)); }

@keyframes ring-morph {
  0% { transform: rotate(0deg) scale(1); border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
  50% { transform: rotate(180deg) scale(1.08); border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%; }
  100% { transform: rotate(360deg) scale(1); border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
}

/* Optional Advanced States */
.waiting .ai-ring { 
  opacity: 0.9;
  /* Calm intelligent oscillation */
}
.waiting .ai-core {
  animation: core-breathe 4s ease-in-out infinite;
}

.thinking .ai-ring { 
  animation-duration: 3s !important; 
  border-width: 2px;
  /* Gold particles circulating slowly (represented by amber/gold glow) */
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.5), inset 0 0 35px rgba(251, 191, 36, 0.5); 
  border-color: rgba(251, 191, 36, 0.8);
}
.thinking .ai-core {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  transform: scale(1.15);
  box-shadow: 0 0 80px rgba(251, 191, 36, 0.4);
}

.speaking .ai-ring { 
  animation-duration: 2s !important; 
  border-width: 3px;
  /* Rhythmic expansion pulses with Emerald energy */
  box-shadow: 0 0 45px rgba(16, 185, 129, 0.8), inset 0 0 45px rgba(16, 185, 129, 0.8);
  filter: brightness(1.4);
  transform: scale(1.1);
}
.speaking .ai-core {
  transform: scale(1.2);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
}

@keyframes core-breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Audio Wave */
.ai-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}
.ai-status-text {
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 500;
}
.audio-wave {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin-top: 8px;
}
.audio-wave span {
  width: 3px;
  height: 6px;
  background: var(--audio-wave-color, var(--accent-gold));
  border-radius: 3px;
  animation: audio-wave-anim 1.2s infinite ease-in-out;
}
.audio-wave span:nth-child(2) { animation-delay: 0.2s; background: var(--audio-wave-color-2, var(--accent-teal)); }
.audio-wave span:nth-child(3) { animation-delay: 0.4s; height: 12px; }
.audio-wave span:nth-child(4) { animation-delay: 0.1s; background: var(--audio-wave-color-4, var(--accent-teal-light)); }
.audio-wave span:nth-child(5) { animation-delay: 0.3s; }

@keyframes audio-wave-anim {
  0%, 100% { height: 6px; }
  50% { height: 18px; }
}

.ai-chat-area {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: 200px;
  padding-right: 10px;
  text-align: left;
}

.chat-message {
  padding: 1rem 1.5rem;
  border-radius: var(--chat-msg-radius, 18px);
  max-width: 85%;
  animation: slideIn 0.4s ease-out forwards;
}

.msg-ai {
  background: var(--chat-msg-ai-bg, rgba(255, 255, 255, 0.15));
  border: var(--chat-msg-ai-border, 1px solid rgba(255, 255, 255, 0.1));
  color: var(--chat-msg-ai-text, var(--text-light));
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-user {
  background: var(--chat-msg-user-bg, var(--accent-teal));
  color: var(--chat-msg-user-text, #fff);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ios-input {
  width: 100%;
  background: var(--chat-input-bg, rgba(255, 255, 255, 0.1));
  border: var(--chat-input-border, 1px solid rgba(255, 255, 255, 0.3));
  padding: 1rem 1.5rem;
  border-radius: var(--chat-input-radius, 999px);
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.ios-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.btn-send {
  background: var(--chat-send-btn-bg, var(--accent-gold));
  color: var(--chat-send-btn-color, #000);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-send:hover {
  transform: scale(1.05);
}

.choice-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 1rem;
  border-radius: 16px;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s;
  font-weight: 500;
}

.choice-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-gold);
}

.demo-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-title {
  font-weight: 600;
  color: var(--accent-gold);
}

@keyframes float-orb {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

@keyframes pulse-orb {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.6);
  }

  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

@keyframes wave-orb {
  0% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: scale(1);
  }

  100% {
    border-radius: 60% 40% 30% 70% / 60% 50% 40% 50%;
    transform: scale(1.1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .card-icons {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-wrapper {
    padding: 1rem;
  }

  .main-nav,
  .nav-actions .nav-link {
    display: none;
  }

  .main-title {
    font-size: 2.5rem;
  }

  .hero-glass-card {
    padding: 1.5rem;
  }

  .button-group,
  .button-group.secondary {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary.large,
  .btn-secondary {
    width: 100%;
  }

  .divider {
    margin: 1.5rem 0;
  }

  .lang-toggle {
    margin-left: 0;
  }
}

/* --- Cinematic Auto-Sequence Animations --- */
.animate-text-1 { opacity: 0; filter: blur(15px); animation: cinematicReveal 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s; }
.animate-text-2 { opacity: 0; filter: blur(15px); animation: cinematicReveal 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 2.5s; }
.animate-text-3 { opacity: 0; filter: blur(15px); animation: cinematicReveal 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 4.5s; }
.animate-text-4 { opacity: 0; filter: blur(15px); animation: cinematicReveal 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 6.5s; }

@keyframes cinematicReveal {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
    filter: blur(15px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    filter: blur(0); 
  }
}

/* Agave Loader Transition */
.agave-loader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.agave-liquid-loader {
  display: block;
  margin: 0 auto;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- AI Immersion Tornado Suck Animation --- */
.tornado-suck {
  animation: tornadoSuckAnim 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
  display: inline-block !important;
  transform-origin: center center;
}

@keyframes tornadoSuckAnim {
  0% { 
    transform: translate(0, 0) rotate(0deg) scale(1); 
    opacity: 1; 
    filter: blur(0px);
  }
  60% { 
    transform: translate(calc(var(--tx) * 0.7), calc(var(--ty) * 0.7)) rotate(360deg) scale(0.5); 
    opacity: 0.8;
    filter: blur(2px);
  }
  100% { 
    transform: translate(var(--tx), var(--ty)) rotate(1080deg) scale(0); 
    opacity: 0; 
    filter: blur(5px);
  }
}

.single-link-suck {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  font-weight: 600;
  color: var(--nav-link-hover-color, var(--accent-teal));
  animation: singleLinkSuckAnim 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes singleLinkSuckAnim {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1.1);
    opacity: 1;
    filter: blur(0px);
  }
  50% {
    opacity: 0.9;
    filter: blur(1px);
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(720deg) scale(0);
    opacity: 0;
    filter: blur(4px);
  }
}

.sucked-in {
  display: none !important;
}

/* --- Compact Header Mode --- */
.glass-nav {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-nav.compact-mode {
  padding: 0.5rem 5%;
}

.glass-nav.compact-mode .header-logo-gold {
  transform: scale(0.85);
  transform-origin: left center;
}

.glass-nav.compact-mode .nav-actions {
  transform: scale(0.9);
  transform-origin: right center;
}

/* --- Landing Lock Overlay --- */
.landing-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--lock-backdrop-color, rgba(5, 20, 16, 0.92));
  backdrop-filter: blur(var(--lock-backdrop-blur, 15px));
  -webkit-backdrop-filter: blur(var(--lock-backdrop-blur, 15px));
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.lock-card {
  width: 100%;
  max-width: 420px;
  background: var(--lock-card-bg, rgba(30, 40, 35, 0.45));
  border: var(--lock-card-border, 1px solid rgba(255, 255, 255, 0.18));
  border-radius: var(--lock-card-radius, 24px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  padding: 2.5rem;
  text-align: center;
  animation: floatUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DOCUMENT CARDS — Inline AI file suggestion cards in the chat
   ═══════════════════════════════════════════════════════════════════════════════ */
.doc-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(234, 199, 117, 0.08));
  border: 1px solid rgba(234, 199, 117, 0.28);
  border-radius: 16px;
  padding: 0.85rem 1.1rem;
  margin: 0.6rem 0;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: docCardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 199, 117, 0.55);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(234, 199, 117, 0.12);
}

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

.doc-card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.doc-card-info {
  flex: 1;
  min-width: 0;
}

.doc-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.doc-card-meta {
  font-size: 0.75rem;
  color: rgba(234, 199, 117, 0.75);
  margin-top: 2px;
  font-weight: 400;
}

.doc-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Shared button/link base for doc cards */
.doc-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-main);
}

.doc-card-btn svg {
  flex-shrink: 0;
}

.doc-card-btn-preview {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.doc-card-btn-preview:hover {
  background: rgba(16, 185, 129, 0.35);
  border-color: rgba(16, 185, 129, 0.8);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.doc-card-btn-download {
  background: rgba(234, 199, 117, 0.18);
  border: 1px solid rgba(234, 199, 117, 0.45);
  color: var(--accent-gold);
}

.doc-card-btn-download:hover {
  background: rgba(234, 199, 117, 0.32);
  border-color: rgba(234, 199, 117, 0.75);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 199, 117, 0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DOCUMENT PREVIEW MODAL — Full-screen overlay with iframe embed
   ═══════════════════════════════════════════════════════════════════════════════ */
.doc-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.doc-preview-modal.active {
  opacity: 1;
  pointer-events: all;
}

.doc-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 20, 16, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}

.doc-preview-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  height: min(85vh, 700px);
  background: linear-gradient(160deg, rgba(12, 35, 26, 0.95), rgba(6, 18, 14, 0.97));
  border: 1px solid rgba(234, 199, 117, 0.25);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.05) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: previewPanelIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.doc-preview-modal:not(.active) .doc-preview-panel {
  animation: none;
}

@keyframes previewPanelIn {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.doc-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.doc-preview-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 1rem;
}

.doc-preview-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.doc-preview-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.doc-preview-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

.doc-preview-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.doc-preview-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

.doc-preview-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.doc-preview-fallback-icon {
  font-size: 3.5rem;
  opacity: 0.6;
}

.doc-preview-fallback p {
  font-size: 0.95rem;
  max-width: 300px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .doc-card-actions {
    flex-direction: column;
    gap: 0.35rem;
  }

  .doc-card-btn {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }

  .doc-preview-panel {
    height: 90vh;
    border-radius: 20px;
  }
}

/* Image preview inside modal */
.doc-preview-image-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #111;
  padding: 1rem;
}

.doc-preview-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Loading spinner */
.doc-preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  background: rgba(6, 18, 14, 0.95);
  z-index: 2;
}

.doc-preview-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(234, 199, 117, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Relative positioning for iframe+loading overlay stacking */
.doc-preview-body {
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   GATED MEDIA AND CARD STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */
.gated-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gated-overlay {
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.45) !important;
}

.gated-overlay:hover {
  background: rgba(0, 0, 0, 0.6) !important;
}

.gated-btn {
  transition: all 0.2s ease !important;
}

.gated-btn:hover {
  background: rgba(234, 199, 117, 0.3) !important;
  color: #fff !important;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(234, 199, 117, 0.3);
}