/* ============================================================
   AIMA — Dark Premium Agency
   ============================================================ */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a0f;
  --surface:     #111118;
  --surface2:    #16161f;
  --accent:      #00B4CC;
  --glow:        rgba(0, 180, 204, 0.28);
  --glow-dim:    rgba(0, 180, 204, 0.12);
  --text:        #ffffff;
  --muted:       #8a8a9a;
  --border:      rgba(0, 180, 204, 0.2);
  --border-sub:  rgba(255, 255, 255, 0.06);
  --green:       #28c840;
  --r:           16px;
  --r-sm:        10px;
  --t:           0.3s ease;
  --serif:       'Playfair Display', Georgia, serif;
  --sans:        'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Typography */
h1, h2, h3 { font-family: var(--serif); line-height: 1.18; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.8rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.65rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 600; }
em { font-style: italic; color: var(--accent); }
p  { color: var(--muted); }

/* Shared section tag */
.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Section header */
.section-header { text-align: center; margin-bottom: 70px; }
.section-header h2 { margin-bottom: 14px; }
.section-header p  { font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

section { padding: 120px 0; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  padding: 14px 34px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 0 28px var(--glow);
  transition: box-shadow var(--t), transform var(--t);
}
.btn-primary:hover { box-shadow: 0 0 50px var(--glow); transform: translateY(-2px); }
.btn-primary.btn-lg { padding: 18px 52px; font-size: 1.1rem; }

.btn-secondary {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  padding: 14px 34px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border-sub);
  transition: border-color var(--t), background var(--t);
}
.btn-secondary:hover { border-color: var(--border); background: rgba(255,255,255,0.04); }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--t), backdrop-filter var(--t), border-color var(--t);
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border-sub);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo img { height: 42px; display: block; }
.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0 auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--t);
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 22px var(--glow);
  transition: box-shadow var(--t), transform var(--t);
}
.btn-nav:hover { box-shadow: 0 0 40px var(--glow); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t);
}

/* ============================================================
   HERO — scroll-driven video
   ============================================================ */
#hero {
  height: 500vh; /* scroll space: más = más lento */
  position: relative;
}

/* Sticky viewport que se queda fijo mientras el usuario scrollea */
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: url('../assets/hero_aima_1.jpg') center/cover no-repeat;
}

#hero-video-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#hero-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Progress bar */
.scroll-progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.12);
  z-index: 4;
}
.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.05s linear;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(10,10,15,0.97) 0%,
    rgba(10,10,15,0.82) 45%,
    rgba(10,10,15,0.55) 100%
  );
  z-index: 1;
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 40px;
  align-items: center;
  padding-top: 88px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Hero text */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(0, 180, 204, 0.1);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 30px;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}
.hero-headline { margin-bottom: 22px; }
.hero-headline em { font-size: 0.82em; }
.hero-subtitle {
  font-size: 1.08rem;
  line-height: 1.72;
  margin-bottom: 42px;
  max-width: 480px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   HERO VISUAL — LYNOA-STYLE CIRCUIT ANIMATION
   ============================================================ */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.circuit-wrapper {
  position: relative;
  width: 480px;
  height: 420px;
}
.circuit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Pulsing dots at circuit line endpoints */
@keyframes pdot-anim {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 1; }
}
@keyframes pring-anim {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.8); }
}

.pdot { animation: pdot-anim 2.4s ease-in-out infinite; }
.pd2  { animation-delay: 0.6s; }
.pd3  { animation-delay: 1.2s; }
.pd4  { animation-delay: 1.8s; }

.pring {
  transform-box: fill-box;
  transform-origin: center;
}
.pr1 { animation: pring-anim 2.4s ease-out infinite; }
.pr2 { animation: pring-anim 2.4s ease-out 0.6s infinite; }
.pr3 { animation: pring-anim 2.4s ease-out 1.2s infinite; }
.pr4 { animation: pring-anim 2.4s ease-out 1.8s infinite; }

/* Floating dashboard card */
.mockup-card {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 242px;
  background: rgba(14, 14, 22, 0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow:
    0 24px 70px rgba(0,0,0,0.6),
    0 0 50px rgba(0, 180, 204, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: card-float 4.5s ease-in-out infinite;
  overflow: visible;
}
@keyframes card-float {
  0%, 100% { transform: translate(-50%, -51%); }
  50%       { transform: translate(-50%, -49%); }
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border-sub);
}
.mockup-dots { display: flex; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28c840; }
.mockup-title { font-size: 0.68rem; color: var(--muted); font-weight: 500; margin-left: 2px; }

.mockup-body { padding: 14px 15px; }
.mockup-metrics { display: flex; gap: 14px; margin-bottom: 14px; }
.metric { flex: 1; }
.metric-val {
  display: block;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 3px;
}
.metric-val.accent { color: var(--accent); }
.metric-lbl { font-size: 0.63rem; color: var(--muted); }

.mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 58px;
  margin-bottom: 12px;
}
.bar {
  flex: 1;
  background: rgba(0, 180, 204, 0.22);
  border-radius: 3px 3px 0 0;
}
.bar.active { background: var(--accent); }

.mockup-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--muted);
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-glow 1.6s ease-in-out infinite;
}
.status-count { margin-left: auto; color: var(--accent); font-weight: 600; }

/* ============================================================
   MINI ROBOT — flotante en esquina de la mockup card
   ============================================================ */
.mini-robot {
  position: absolute;
  top: -28px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: mr-float 3s ease-in-out infinite;
  z-index: 3;
}
@keyframes mr-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.mr-antenna-ball {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
  animation: antenna-pulse 1.4s ease-in-out infinite;
}
@keyframes antenna-pulse {
  0%, 100% { box-shadow: 0 0 4px var(--accent); }
  50%       { box-shadow: 0 0 10px var(--accent), 0 0 18px rgba(0,180,204,0.4); }
}
.mr-antenna-stem {
  width: 2px; height: 7px;
  background: var(--muted);
  border-radius: 1px;
}
.mr-head {
  width: 26px; height: 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.mr-eyes { display: flex; gap: 5px; }
.mr-eye {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 4px var(--accent);
  animation: mr-blink 4s ease-in-out infinite;
}
.mr-eye:nth-child(2) { animation-delay: 0.08s; }
@keyframes mr-blink {
  0%, 88%, 100% { transform: scaleY(1); }
  93%           { transform: scaleY(0.1); }
}
.mr-mouth {
  width: 10px; height: 5px;
  border: 2px solid var(--accent);
  border-top: none;
  border-radius: 0 0 6px 6px;
  opacity: 0.85;
}
.mr-body {
  width: 20px; height: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}
.mr-arm {
  position: absolute;
  width: 5px; height: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  top: 2px;
}
.mr-arm-l {
  left: -7px;
  transform-origin: top center;
  animation: mr-wave-l 2.4s ease-in-out infinite;
}
.mr-arm-r {
  right: -7px;
  transform-origin: top center;
  animation: mr-wave-r 2.4s ease-in-out 0.3s infinite;
}
@keyframes mr-wave-l {
  0%, 50%, 100% { transform: rotate(0deg); }
  25%           { transform: rotate(-20deg); }
}
@keyframes mr-wave-r {
  0%, 50%, 100% { transform: rotate(0deg); }
  25%           { transform: rotate(20deg); }
}
.mr-light {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: mr-lights 1.6s ease-in-out infinite;
}
.mr-light:nth-child(2) { animation-delay: 0.4s; }
@keyframes mr-lights {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 1; box-shadow: 0 0 5px var(--accent); }
}

/* Glow behind card */
.card-glow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 220px; height: 160px;
  background: var(--accent);
  opacity: 0.07;
  filter: blur(55px);
  border-radius: 50%;
  z-index: 0;
  animation: card-float 4.5s ease-in-out infinite;
}

/* Scroll indicator line */
.scroll-indicator {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-breathe 2.2s ease-in-out infinite;
}
@keyframes scroll-breathe {
  0%, 100% { opacity: 0.25; transform: scaleY(0.85); }
  50%       { opacity: 1;    transform: scaleY(1); }
}

/* ============================================================
   SERVICIOS
   ============================================================ */
#servicios { background: var(--surface); }

.services-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 44px;
}
.service-main-card {
  display: flex;
  gap: 22px;
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r);
  padding: 36px 32px;
  transition: border-color var(--t), box-shadow var(--t);
}
.service-main-card:hover {
  border-color: var(--border);
  box-shadow: 0 0 32px rgba(0, 180, 204, 0.08);
}
.service-main-icon {
  width: 46px; height: 46px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}
.service-main-icon svg { width: 100%; height: 100%; }
.service-main-content h3 { margin-bottom: 10px; }
.service-main-content p  { margin-bottom: 18px; font-size: 0.92rem; }
.service-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.service-list li {
  font-size: 0.85rem;
  color: var(--muted);
  padding-left: 15px;
  position: relative;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.service-card {
  background: var(--surface2);
  border: 1px solid var(--border-sub);
  border-radius: var(--r);
  padding: 28px 24px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.service-card:hover {
  border-color: var(--border);
  box-shadow: 0 0 28px rgba(0, 180, 204, 0.1);
  transform: translateY(-4px);
}
.service-icon {
  width: 34px; height: 34px;
  color: var(--accent);
  margin-bottom: 16px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h4 { margin-bottom: 8px; color: var(--text); }
.service-card p  { font-size: 0.855rem; line-height: 1.6; }

/* ============================================================
   PROCESO
   ============================================================ */
#proceso { background: var(--bg); }

.process-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 48px;
}
.process-step {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--r);
  padding: 38px 32px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  cursor: default;
}
.process-step:hover {
  border-color: var(--border);
  box-shadow: 0 0 28px rgba(0, 180, 204, 0.1);
  transform: translateY(-4px);
}
.process-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.5;
  margin-top: 40px;
}
.step-num {
  font-size: 3.8rem;
  font-weight: 900;
  font-family: var(--serif);
  color: var(--accent);
  opacity: 0.14;
  line-height: 1;
  margin-bottom: 14px;
}
.process-step h3 { margin-bottom: 10px; font-size: 1.4rem; }
.process-step p  { font-size: 0.9rem; line-height: 1.68; }

.process-note {
  text-align: center;
  padding: 22px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  max-width: 620px;
  margin: 0 auto;
}
.process-note p  { font-size: 0.97rem; color: var(--muted); }
.process-note strong { color: var(--text); }

/* ============================================================
   SOBRE AIMA
   ============================================================ */
#sobre-aima { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text .section-tag { margin-bottom: 14px; }
.about-text h2 { margin-bottom: 22px; }
.about-lead {
  font-size: 1.12rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.65;
}
.about-text p:not(.about-lead) { margin-bottom: 30px; }

.active-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(40, 200, 64, 0.1);
  border: 1px solid rgba(40, 200, 64, 0.3);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--green);
}
.badge-pulse {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-glow-green 1.6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--glow); }
  50%       { opacity: 0.75; box-shadow: 0 0 0 6px transparent; }
}
@keyframes pulse-glow-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.4); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

.about-img-wrap {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border-sub);
}
.about-img-wrap img { width: 100%; display: block; }
.about-img-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 180, 204, 0.12), transparent 60%);
  pointer-events: none;
}

/* ============================================================
   FAQ
   ============================================================ */
#faq { background: var(--bg); }

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color var(--t);
}
.faq-item:hover, .faq-item.open { border-color: var(--border); }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 0.97rem;
  font-weight: 500;
  font-family: var(--sans);
}
.faq-chevron {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform var(--t);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.42s ease;
}
.faq-a p {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  line-height: 1.72;
}
.faq-item.open .faq-a { max-height: 220px; }

/* ============================================================
   CONTACTO
   ============================================================ */
#contacto { background: var(--surface); text-align: center; }

.contact-wrap { max-width: 580px; margin: 0 auto; }
.contact-wrap .section-tag { margin-bottom: 14px; }
.contact-wrap h2 { margin-bottom: 14px; }
.contact-wrap p  { font-size: 1.08rem; margin-bottom: 40px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border-sub);
  padding: 50px 0 30px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand p { font-size: 0.82rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border-sub);
  padding-top: 22px;
  text-align: center;
}
.footer-bottom p { font-size: 0.78rem; color: var(--muted); }

/* ============================================================
   AIMABOT WIDGET
   ============================================================ */
#aimabot {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Trigger button */
#abot-trigger {
  width: 58px; height: 58px;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 22px var(--glow), 0 0 44px rgba(0, 180, 204, 0.16);
  transition: transform var(--t), box-shadow var(--t);
  flex-shrink: 0;
}
#abot-trigger:hover { transform: scale(1.08); box-shadow: 0 6px 34px var(--glow); }

/* Chat panel */
#aimabot-panel {
  width: 318px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 64px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  max-height: 600px;
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-origin: bottom right;
}
#aimabot-panel.abot-hidden {
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  pointer-events: none;
  position: absolute;
  bottom: 70px;
}

.abot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border-sub);
  flex-shrink: 0;
}
.abot-header-info { display: flex; align-items: center; gap: 11px; }
.abot-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.abot-header-info strong { font-size: 0.88rem; display: block; }
.abot-online { font-size: 0.68rem; color: var(--green); }
#abot-close {
  background: none; border: none;
  color: var(--muted);
  font-size: 1.5rem; line-height: 1;
  cursor: pointer; padding: 2px;
  transition: color var(--t);
}
#abot-close:hover { color: var(--text); }

.abot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 340px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-sub) transparent;
}
.abot-msg { max-width: 88%; }
.abot-msg.bot  { align-self: flex-start; }
.abot-msg.user { align-self: flex-end; }
.abot-msg p {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.855rem;
  line-height: 1.52;
}
.abot-msg.bot  p { background: var(--surface2); color: var(--text); border-bottom-left-radius: 4px; }
.abot-msg.user p { background: var(--accent); color: var(--bg); border-bottom-right-radius: 4px; }

.abot-input-row {
  display: flex;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid var(--border-sub);
  flex-shrink: 0;
}
#abotInput {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border-sub);
  border-radius: 100px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.855rem;
  font-family: var(--sans);
  outline: none;
  transition: border-color var(--t);
}
#abotInput:focus { border-color: var(--border); }
#abotInput::placeholder { color: var(--muted); }
#abotSend {
  width: 38px; height: 38px;
  background: var(--accent);
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  flex-shrink: 0;
  transition: transform var(--t);
}
#abotSend:hover { transform: scale(1.08); }
#abotSend svg { width: 15px; height: 15px; }

/* ============================================================
   MODAL DE CONTACTO
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  max-width: 580px;
  width: 100%;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 18px; right: 20px;
  background: none; border: none;
  color: var(--muted);
  font-size: 1.6rem; line-height: 1;
  cursor: pointer;
  transition: color var(--t);
  padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }
.modal-box .section-tag { margin-bottom: 10px; }
.modal-box h2 { margin-bottom: 10px; font-size: 2rem; }
.modal-box > div > p { margin-bottom: 28px; }

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--sans);
  outline: none;
  transition: border-color var(--t);
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--border); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }
.btn-form { width: 100%; justify-content: center; text-align: center; border: none; cursor: pointer; font-family: var(--sans); margin-top: 4px; }

.phone-row {
  display: flex;
  gap: 8px;
}
.phone-row select {
  background: var(--surface2);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-sm);
  padding: 10px 10px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--sans);
  outline: none;
  cursor: pointer;
  transition: border-color var(--t);
  flex-shrink: 0;
  width: 110px;
}
.phone-row select:focus { border-color: var(--border); }
.phone-row input { flex: 1; }

/* Success state */
.modal-success {
  text-align: center;
  padding: 24px 0;
}
.modal-success.hidden { display: none; }
.success-icon {
  width: 64px; height: 64px;
  background: rgba(0, 180, 204, 0.15);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--accent);
  margin: 0 auto 20px;
}
.modal-success h3 { margin-bottom: 12px; font-family: var(--serif); }

/* ============================================================
   AIMABOT — ANIMACIÓN LOGO + INPUT EXPANDIBLE
   ============================================================ */

/* Spinning ring around trigger button */
#abot-trigger {
  position: relative;
  overflow: visible;
  background: transparent;
  padding: 0;
}
.abot-spin-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--accent) 25%,
    transparent 50%,
    rgba(0,180,204,0.4) 75%,
    transparent 100%
  );
  animation: spin-ring 2.4s linear infinite;
  z-index: 0;
}
.abot-spin-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--bg);
  border-radius: 50%;
}
@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.abot-trigger-logo {
  position: relative;
  z-index: 1;
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Processing ring inside chat header */
.abot-avatar-wrap {
  position: relative;
  width: 36px; height: 36px;
  flex-shrink: 0;
}
.abot-avatar-wrap .abot-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}
.abot-processing-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(0,180,204,0.3);
  animation: spin-ring 1.4s linear infinite;
}

/* Typing indicator */
.abot-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.abot-typing span {
  width: 7px; height: 7px;
  background: var(--muted);
  border-radius: 50%;
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.abot-typing span:nth-child(2) { animation-delay: 0.2s; }
.abot-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-6px); opacity: 1; }
}

/* Auto-grow textarea */
#abotInput {
  field-sizing: content;
  min-height: 38px;
  max-height: 100px;
  overflow-y: auto;
  resize: none;
  line-height: 1.5;
  padding-top: 9px;
  padding-bottom: 9px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; padding-top: 130px; align-content: center; }
  .hero-visual   { display: none; }
  .services-main { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid    { grid-template-columns: 1fr; gap: 48px; }
  .about-visual  { display: none; }
  .process-steps { flex-direction: column; gap: 0; }
  .process-arrow { width: 100%; height: 44px; margin: 0; font-size: 1.2rem; transform: rotate(90deg); }
  .process-step  { width: 100%; }
}

@media (max-width: 768px) {
  #hero { height: 100vh; }
  section { padding: 80px 0; }
  .nav-links, .btn-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    padding: 24px 28px;
    gap: 20px;
    border-bottom: 1px solid var(--border-sub);
    backdrop-filter: blur(16px);
  }
  .services-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 22px; text-align: center; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.72rem; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .service-main-card { flex-direction: column; }
  #aimabot-panel { width: calc(100vw - 32px); }
}
