/* ═══════════════════════════════════════════════
   ALTOKIA — Custom CSS
   Dark tech theme · cyan/violet/magenta
   ═══════════════════════════════════════════════ */

:root {
  /* ── Tema oscuro (por defecto) ── */
  --bg: #05060f;
  --bg-soft: #0a0c1c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text: #e8eaf6;
  --text-dim: #9aa0c3;
  --cyan: #00e5ff;
  --violet: #7c4dff;
  --magenta: #ff2d92;
  --nav-bg: rgba(5, 6, 15, 0.72);
  --overlay-bg: rgba(5, 6, 15, 0.96);
  --chat-bg: rgba(8, 10, 24, 0.92);
  --msg-bot-bg: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(255, 255, 255, 0.05);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --tooltip-bg: rgba(10, 12, 28, 0.95);
  --grid-line: rgba(255, 255, 255, 0.035);
  --marquee-bg: rgba(255, 255, 255, 0.015);
  --footer-bg: rgba(5, 6, 15, 0.85);
  --gradient: linear-gradient(100deg, var(--cyan), var(--violet) 50%, var(--magenta));
  --font-main: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Tema claro (de día) ── */
[data-theme="light"] {
  --bg: #f5f7fd;
  --bg-soft: #ffffff;
  --surface: rgba(15, 23, 62, 0.045);
  --surface-border: rgba(15, 23, 62, 0.14);
  --text: #10142b;
  --text-dim: #495071;
  --cyan: #0088b0;
  --violet: #6a3df5;
  --magenta: #db0f76;
  --nav-bg: rgba(245, 247, 253, 0.78);
  --overlay-bg: rgba(245, 247, 253, 0.97);
  --chat-bg: rgba(252, 253, 255, 0.96);
  --msg-bot-bg: rgba(15, 23, 62, 0.05);
  --input-bg: rgba(15, 23, 62, 0.045);
  --chip-bg: rgba(15, 23, 62, 0.045);
  --tooltip-bg: rgba(255, 255, 255, 0.97);
  --grid-line: rgba(15, 23, 62, 0.06);
  --marquee-bg: rgba(15, 23, 62, 0.025);
  --footer-bg: rgba(245, 247, 253, 0.9);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
  width: 100%;
  line-height: 1.6;
  cursor: none; /* cursor personalizado */
  transition: background-color 0.5s ease, color 0.5s ease;
}

img, svg, video { max-width: 100%; }

::selection { background: var(--violet); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--violet));
  border-radius: 8px;
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; }

.accent { color: var(--cyan); }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ══════════ CANVAS THREE.JS ══════════ */
#webgl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, .nav, .footer, .marquee { position: relative; z-index: 1; }

/* ══════════ PRELOADER ══════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.preloader.is-done { opacity: 0; visibility: hidden; }

.preloader__logo {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.3em;
}

.preloader__letter {
  display: inline-block;
  opacity: 0;
  animation: letterIn 0.5s var(--ease-spring) forwards;
  color: var(--text);
}

.preloader__letter:nth-child(1) { animation-delay: 0.05s; }
.preloader__letter:nth-child(2) { animation-delay: 0.12s; }
.preloader__letter:nth-child(3) { animation-delay: 0.19s; }
.preloader__letter:nth-child(4) { animation-delay: 0.26s; }
.preloader__letter:nth-child(5) { animation-delay: 0.33s; }
.preloader__letter:nth-child(6) { animation-delay: 0.40s; }
.preloader__letter:nth-child(7) { animation-delay: 0.47s; }

.preloader__letter--o {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 32px rgba(124, 77, 255, 0.5);
}

.preloader__letter--k {
  color: var(--magenta);
  text-shadow: 0 0 32px rgba(255, 45, 146, 0.5);
}

/* Letras de marca: O en gradiente, K en magenta (nav + footer) */
.logo-o {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-k { color: var(--magenta); }

.preloader__acronym {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 0 24px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.6s forwards;
}

@keyframes letterIn {
  from { opacity: 0; transform: translateY(30px) rotateX(90deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.preloader__bar {
  width: min(280px, 60vw);
  height: 3px;
  background: var(--chip-bg);
  border-radius: 4px;
  overflow: hidden;
}

.preloader__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.preloader__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* ══════════ CURSOR PERSONALIZADO ══════════ */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  box-shadow: 0 0 12px var(--cyan);
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              border-color 0.3s, background 0.3s;
}

body.cursor-hover .cursor { width: 14px; height: 14px; background: var(--magenta); box-shadow: 0 0 16px var(--magenta); }
body.cursor-hover .cursor-follower {
  width: 56px;
  height: 56px;
  border-color: rgba(255, 45, 146, 0.5);
  background: rgba(255, 45, 146, 0.06);
}

@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-follower { display: none; }
  body, a, button { cursor: auto; }
}

/* ══════════ SCROLL PROGRESS ══════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 200;
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.7);
}

/* ══════════ NAVEGACIÓN ══════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: padding 0.4s var(--ease-out), background 0.4s, backdrop-filter 0.4s;
}

.nav.is-scrolled {
  padding: 12px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--surface-border);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__logo-mark {
  color: var(--cyan);
  animation: spinMark 8s linear infinite;
  display: inline-block;
}

@keyframes spinMark {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.9rem;
  color: var(--text-dim);
  position: relative;
  transition: color 0.3s;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient);
  transition: width 0.35s var(--ease-out);
  border-radius: 2px;
}

.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav__cta {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  backdrop-filter: blur(8px);
}

.nav__cta:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.25);
}

.nav__cta-arrow { transition: transform 0.3s var(--ease-spring); }
.nav__cta:hover .nav__cta-arrow { transform: translateX(5px); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  z-index: 110;
}

.nav__burger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.3s;
}

.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════ HERO ══════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh; /* altura real del viewport en móviles */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero__title {
  font-size: clamp(2.6rem, 8.5vw, 6.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  perspective: 800px;
}

.hero__line { display: block; overflow: hidden; }

.hero__word {
  display: inline-block;
  transform: translateY(110%);
  animation: wordUp 1s var(--ease-out) forwards;
  position: relative;
}

.hero__line:nth-child(1) .hero__word { animation-delay: 0.9s; }
.hero__line:nth-child(2) .hero__word { animation-delay: 1.05s; }
.hero__line:nth-child(3) .hero__word { animation-delay: 1.2s; }

@keyframes wordUp {
  to { transform: translateY(0); }
}

.hero__word--gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: wordUp 1s var(--ease-out) 1.05s forwards, gradientShift 5s ease 2s infinite;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 48px;
}

.typed-wrap { color: var(--cyan); font-family: var(--font-mono); font-size: 0.95em; }
.typed-cursor { animation: blink 0.8s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero__actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Botones */
.btn {
  position: relative;
  padding: 16px 36px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.btn--lg { padding: 20px 48px; font-size: 1.1rem; }

.btn--primary {
  background: var(--gradient);
  background-size: 200% auto;
  color: #fff;
  animation: gradientShift 4s ease infinite;
  box-shadow: 0 8px 32px rgba(124, 77, 255, 0.35);
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 44px rgba(124, 77, 255, 0.55);
}

.btn__glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-100%);
}

.btn--primary:hover .btn__glow { animation: shine 0.9s ease; }

@keyframes shine {
  to { transform: translateX(100%); }
}

.btn--ghost {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.2);
  transform: translateY(-3px);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  animation: fadeIn 1s ease 2.2s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.hero__mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-dim);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.hero__mouse-wheel {
  width: 3px;
  height: 8px;
  background: var(--cyan);
  border-radius: 3px;
  animation: wheel 1.6s ease infinite;
}

@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Orbes flotantes */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.5;
}

.orb--1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(0,229,255,0.35), transparent 65%);
  top: 10%; left: -8%;
  animation: float1 14s ease-in-out infinite;
}

.orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,77,255,0.32), transparent 65%);
  bottom: -10%; right: -10%;
  animation: float2 18s ease-in-out infinite;
}

.orb--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,45,146,0.25), transparent 65%);
  top: 45%; right: 20%;
  animation: float1 11s ease-in-out infinite reverse;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.12); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 30px) scale(0.92); }
}

/* ══════════ MARQUEE ══════════ */
.marquee {
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
  background: var(--marquee-bg);
  transform: rotate(-1deg) scale(1.02);
}

.marquee__track {
  display: flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ══════════ SECCIONES GENÉRICAS ══════════ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 130px 24px;
}

.section__head { margin-bottom: 70px; }

.section__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════ NOSOTROS ══════════ */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.about__lead {
  font-size: 1.25rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

.about__text p { color: var(--text-dim); margin-bottom: 18px; }
.about__text strong { color: var(--text); }
.about__text em { color: var(--cyan); font-style: normal; }

.about__highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.about__values {
  list-style: none;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__values li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.35s var(--ease-spring);
}

.about__values li:hover {
  border-color: var(--cyan);
  transform: translateX(8px);
}

.about__value-icon {
  font-size: 1.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.4;
}

.about__values li div { display: flex; flex-direction: column; gap: 4px; }
.about__values li strong { font-size: 1rem; }
.about__values li span:not(.about__value-icon) {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.about__panel {
  position: relative;
  padding: 38px 34px;
  border-radius: 24px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(165deg, rgba(0, 229, 255, 0.06), rgba(124, 77, 255, 0.07) 55%, rgba(255, 45, 146, 0.05));
  backdrop-filter: blur(10px);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.about__panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.about__panel-title:not(:first-child) { margin-top: 32px; }

.about__panel-sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  letter-spacing: 0.08em;
}

.about__countries,
.about__industries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  background: var(--chip-bg);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.chip:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.2);
}

.chip--country {
  border-color: rgba(124, 77, 255, 0.35);
}

.chip--country:hover {
  border-color: var(--magenta);
  background: rgba(255, 45, 146, 0.08);
  box-shadow: 0 0 18px rgba(255, 45, 146, 0.22);
}

.about__quote {
  position: relative;
  margin-top: 36px;
  padding: 22px 24px 22px 40px;
  border-left: 3px solid;
  border-image: linear-gradient(var(--cyan), var(--magenta)) 1;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.95rem;
}

.about__quote-mark {
  position: absolute;
  left: 12px;
  top: 6px;
  font-size: 2.4rem;
  font-family: Georgia, serif;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ══════════ PROYECTOS ══════════ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 26px;
}

.project {
  position: relative;
  padding: 34px 30px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s, box-shadow 0.4s;
  transform-style: preserve-3d;
  will-change: transform;
}

.project:hover {
  border-color: rgba(255, 45, 146, 0.4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 45, 146, 0.08);
}

.project__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project__icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(0, 229, 255, 0.08), rgba(124, 77, 255, 0.12) 60%, rgba(255, 45, 146, 0.08));
  border: 1px solid rgba(124, 77, 255, 0.32);
  box-shadow: inset 0 0 22px rgba(124, 77, 255, 0.12), 0 6px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.4s, border-color 0.4s;
  overflow: hidden;
}

/* Anillo de luz que gira alrededor del ícono */
.project__icon::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(0, 229, 255, 0.55) 82%, rgba(255, 45, 146, 0.55) 92%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  animation: iconRing 3.5s linear infinite;
}

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

/* Máscara interior para que el anillo solo se vea en el borde */
.project__icon::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 16px;
  background: linear-gradient(150deg, #0b0e20, #0e1028);
}

.project__icon svg {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.35));
  transition: transform 0.45s var(--ease-spring), filter 0.4s;
}

.project:hover .project__icon {
  transform: scale(1.1) rotate(-5deg);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: inset 0 0 26px rgba(0, 229, 255, 0.15), 0 10px 30px rgba(124, 77, 255, 0.3);
}

.project:hover .project__icon::before { opacity: 1; }

.project:hover .project__icon svg {
  transform: scale(1.12);
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.65));
}

.project__sector {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  background: var(--chip-bg);
  color: var(--text-dim);
}

.project__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.project__desc {
  color: var(--text-dim);
  font-size: 0.93rem;
  flex-grow: 1;
  margin-bottom: 22px;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project__tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(124, 77, 255, 0.12);
  border: 1px solid rgba(124, 77, 255, 0.3);
  color: #b9a5ff;
}

.project__result {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #00ff88;
  padding-top: 16px;
  border-top: 1px dashed var(--surface-border);
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

/* ══════════ SERVICIOS ══════════ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 26px;
}

.card {
  position: relative;
  padding: 38px 32px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 40px rgba(0, 229, 255, 0.08);
}

.card__shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 229, 255, 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover .card__shine { opacity: 1; }

.card__icon {
  font-size: 2.2rem;
  margin-bottom: 22px;
  display: inline-block;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.4s var(--ease-spring);
}

.card:hover .card__icon { transform: scale(1.25) rotate(-8deg); }

.card__title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.card__desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.card__num { font-size: 0.8rem; letter-spacing: 0.2em; }

.card__arrow {
  font-size: 1.3rem;
  transition: transform 0.35s var(--ease-spring), color 0.3s;
}

.card:hover .card__arrow { transform: translateX(8px); color: var(--cyan); }

/* ══════════ PROCESO ══════════ */
.process__timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.process__line {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 0%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.6);
  transition: height 0.2s linear;
}

.process__step {
  position: relative;
  width: 50%;
  padding: 30px 60px 30px 0;
  text-align: right;
}

.process__step--right {
  margin-left: 50%;
  padding: 30px 0 30px 60px;
  text-align: left;
}

.process__dot {
  position: absolute;
  top: 42px;
  right: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.7);
  z-index: 2;
  animation: pulse 2.5s ease infinite;
}

.process__step--right .process__dot { right: auto; left: -9px; }

.process__phase {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--magenta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.process__content h3 {
  font-size: 1.45rem;
  margin: 10px 0 12px;
}

.process__content p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ══════════ STACK ══════════ */
.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
}

.stack__item {
  padding: 26px 28px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.35s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}

.stack__item:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--violet);
  box-shadow: 0 16px 40px rgba(124, 77, 255, 0.2);
}

.stack__glyph {
  font-size: 1.4rem;
  color: var(--cyan);
}

/* ══════════ STATS ══════════ */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 26px;
}

.stats__item {
  text-align: center;
  padding: 48px 24px;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color 0.4s, transform 0.4s var(--ease-spring);
}

.stats__item:hover {
  border-color: var(--magenta);
  transform: translateY(-8px);
}

.stats__value {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.stats__label {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ══════════ CTA ══════════ */
.cta__box {
  position: relative;
  text-align: center;
  padding: clamp(60px, 8vw, 100px) clamp(28px, 6vw, 80px);
  border-radius: 32px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(160deg, rgba(124, 77, 255, 0.09), rgba(0, 229, 255, 0.05) 50%, rgba(255, 45, 146, 0.07));
  overflow: hidden;
  transform-style: preserve-3d;
}

.cta__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  animation: gridDrift 20s linear infinite;
  pointer-events: none;
}

@keyframes gridDrift {
  to { background-position: 42px 42px; }
}

.cta__title {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 22px;
  position: relative;
}

.cta__desc {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 40px;
  position: relative;
}

.cta__meta {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  position: relative;
}

/* ══════════ FOOTER ══════════ */
.footer {
  border-top: 1px solid var(--surface-border);
  background: var(--footer-bg);
  backdrop-filter: blur(12px);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 32px;
}

.footer__brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.footer__brand p {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 10px;
  letter-spacing: normal;
}

.footer__acronym {
  font-family: var(--font-mono);
  font-size: 0.7rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.footer__links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer__links a:hover { color: var(--cyan); }
.footer__links .footer__social:hover { color: #3b9bff; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--surface-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer__status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  animation: pulse 2s ease infinite;
}

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    font-size: 1.3rem;
    transform: translateY(-100%);
    /* Oculto por completo: evita que los últimos enlaces se asomen
       cuando la barra del navegador móvil cambia la altura del viewport */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s var(--ease-out), opacity 0.4s, visibility 0.5s;
    z-index: 105;
  }

  .nav__links.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .nav__burger { display: flex; }

  .process__step,
  .process__step--right {
    width: 100%;
    margin-left: 0;
    padding: 24px 0 24px 48px;
    text-align: left;
  }

  .about__grid { grid-template-columns: 1fr; gap: 40px; }

  .process__line { left: 8px; transform: none; }
  .process__dot,
  .process__step--right .process__dot { left: 0; right: auto; }

  .section { padding: 90px 20px; }
}

/* ══════════ SELECTOR DE IDIOMA ══════════ */
.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.lang-toggle:hover {
  border-color: var(--violet);
  box-shadow: 0 0 18px rgba(124, 77, 255, 0.25);
}

.lang-toggle__opt { transition: color 0.3s; }

.lang-toggle__opt.is-active {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lang-toggle__divider { opacity: 0.4; }

/* ══════════ CONTACTO (FORMULARIO + CANALES) ══════════ */
.contact__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  margin-top: 48px;
  text-align: left;
  position: relative;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact__field input,
.contact__field textarea {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  cursor: none;
}

.contact__field input::placeholder,
.contact__field textarea::placeholder { color: rgba(154, 160, 195, 0.55); }

.contact__field input:focus,
.contact__field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.contact__form .btn { align-self: flex-start; border: none; font-family: var(--font-main); }

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.35s var(--ease-spring), box-shadow 0.3s;
  text-align: left;
  font-family: var(--font-main);
  color: var(--text);
  font-size: 1rem;
}

.contact__channel:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 14px 36px rgba(0, 229, 255, 0.14);
}

.contact__channel--wa:hover {
  border-color: #25d366;
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.18);
}

.contact__channel--bot:hover {
  border-color: var(--magenta);
  box-shadow: 0 14px 36px rgba(255, 45, 146, 0.18);
}

.contact__channel--li .contact__channel-icon { color: #0a66c2; }

.contact__channel--li:hover {
  border-color: #0a66c2;
  box-shadow: 0 14px 36px rgba(10, 102, 194, 0.25);
}

.contact__channel-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--chip-bg);
  border: 1px solid var(--surface-border);
  color: var(--cyan);
}

.contact__channel--wa .contact__channel-icon { color: #25d366; }

.contact__channel div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact__channel strong { font-size: 0.98rem; }
.contact__channel div span { font-size: 0.85rem; color: var(--text-dim); overflow-wrap: anywhere; }

.contact__info .cta__meta { margin-top: 12px; justify-content: flex-start; }

/* ══════════ BOTONES FLOTANTES (FABs) ══════════ */
.fab-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.fab {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 1.5rem;
  transform: scale(0);
  animation: fabIn 0.5s var(--ease-spring) forwards;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.fab:hover { transform: scale(1.12); }

@keyframes fabIn {
  to { transform: scale(1); }
}

.fab--wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
  animation-delay: 2.6s;
}

.fab--wa:hover { box-shadow: 0 12px 36px rgba(37, 211, 102, 0.65); }

.fab--chat {
  background: var(--gradient);
  background-size: 200% auto;
  animation: fabIn 0.5s var(--ease-spring) 2.8s forwards, gradientShift 4s ease infinite;
  color: #fff;
  box-shadow: 0 8px 28px rgba(124, 77, 255, 0.5);
}

.fab--chat:hover { box-shadow: 0 12px 36px rgba(124, 77, 255, 0.7); }

.fab--chat-close { display: none; }

body.chat-open .fab--chat-open { display: none; }
body.chat-open .fab--chat-close { display: block; }
body.chat-open .fab__ping { display: none; }

.fab__ping {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
  animation: pulse 1.6s ease infinite;
}

.fab__tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--tooltip-bg);
  border: 1px solid var(--surface-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
}

.fab:hover .fab__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ══════════ CHATBOT ══════════ */
.chatbot {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 299;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  height: min(560px, calc(100svh - 140px));
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: var(--chat-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 50px rgba(124, 77, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-spring), visibility 0.35s;
}

body.chat-open .chatbot {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--surface-border);
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.08), rgba(124, 77, 255, 0.1) 60%, rgba(255, 45, 146, 0.07));
}

.chatbot__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--gradient);
  box-shadow: 0 0 18px rgba(124, 77, 255, 0.5);
}

.chatbot__head-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.chatbot__head-info strong { font-size: 1rem; letter-spacing: 0.04em; }

.chatbot__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.chatbot__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  animation: pulse 2s ease infinite;
}

.chatbot__minimize {
  background: none;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  transition: border-color 0.3s, color 0.3s;
}

.chatbot__minimize:hover { border-color: var(--magenta); color: var(--text); }

.chatbot__messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.chatbot__messages::-webkit-scrollbar { width: 6px; }

.msg {
  max-width: 84%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: msgIn 0.35s var(--ease-spring);
  white-space: pre-line;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg--bot {
  align-self: flex-start;
  background: var(--msg-bot-bg);
  border: 1px solid var(--surface-border);
  border-bottom-left-radius: 4px;
}

.msg--user {
  align-self: flex-end;
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.18), rgba(124, 77, 255, 0.22));
  border: 1px solid rgba(124, 77, 255, 0.35);
  border-bottom-right-radius: 4px;
}

.msg a { color: var(--cyan); text-decoration: underline; }

/* Indicador de escritura */
.msg--typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 14px 18px;
}

.msg--typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typingDot 1.2s ease infinite;
}

.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }

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

.chatbot__options {
  padding: 0 18px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-opt {
  padding: 9px 15px;
  border-radius: 100px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.06);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.8rem;
  animation: msgIn 0.35s var(--ease-spring);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}

.chat-opt:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.chatbot__inputbar {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--surface-border);
}

.chatbot__inputbar input {
  flex-grow: 1;
  padding: 12px 16px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.88rem;
  cursor: none;
}

.chatbot__inputbar input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

.chatbot__inputbar button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.chatbot__inputbar button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
}

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
  .lang-toggle { padding: 7px 13px; font-size: 0.75rem; }
  .fab-stack { right: 16px; bottom: 16px; }
  .chatbot { right: 16px; bottom: 90px; }
}

/* ══════════ BOTÓN DE TEMA (claro/oscuro) ══════════ */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease-spring);
}

.theme-toggle:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25);
  transform: rotate(20deg);
}

/* ══════════ AJUSTES DEL MODO CLARO ══════════ */
[data-theme="light"] .orb { opacity: 0.3; }

[data-theme="light"] .card:hover {
  box-shadow: 0 24px 64px rgba(30, 40, 90, 0.14), 0 0 40px rgba(0, 136, 176, 0.07);
}

[data-theme="light"] .project:hover {
  box-shadow: 0 24px 64px rgba(30, 40, 90, 0.14), 0 0 40px rgba(219, 15, 118, 0.07);
}

[data-theme="light"] .project__tags span {
  background: rgba(106, 61, 245, 0.09);
  border-color: rgba(106, 61, 245, 0.35);
  color: #5a2fe0;
}

[data-theme="light"] .project__result {
  color: #008a4d;
  text-shadow: none;
}

[data-theme="light"] .chatbot {
  box-shadow: 0 30px 80px rgba(30, 40, 90, 0.25), 0 0 50px rgba(106, 61, 245, 0.1);
}

[data-theme="light"] .msg--user {
  background: linear-gradient(120deg, rgba(0, 136, 176, 0.12), rgba(106, 61, 245, 0.14));
  border-color: rgba(106, 61, 245, 0.3);
}

[data-theme="light"] .hero__badge-dot,
[data-theme="light"] .footer__pulse,
[data-theme="light"] .chatbot__status-dot,
[data-theme="light"] .fab__ping {
  background: #00b368;
  box-shadow: 0 0 8px #00b368;
}

/* El interior de los íconos de proyectos se mantiene oscuro
   a propósito: funciona como una "gema" en ambos temas */

/* ══════════ MÓVILES PEQUEÑOS ══════════ */
@media (max-width: 480px) {
  .section { padding: 72px 16px; }
  .section__head { margin-bottom: 48px; }

  .nav__inner { padding: 0 16px; }
  .nav__logo { font-size: 1.1rem; }

  .hero { padding: 110px 16px 90px; }

  .hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn { justify-content: center; text-align: center; }

  .hero__subtitle { font-size: 0.95rem; }

  .marquee__track { font-size: 0.78rem; }

  .about__lead { font-size: 1.08rem; }
  .about__panel { padding: 26px 20px; }

  .card, .project { padding: 28px 22px; }

  .cta__box { border-radius: 22px; }
  .contact__grid { gap: 32px; margin-top: 36px; }
  .contact__form .btn { align-self: stretch; justify-content: center; }
  .contact__channel { padding: 15px 16px; }

  .stats__item { padding: 36px 18px; }

  .footer__inner { padding: 44px 16px 24px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .fab { width: 52px; height: 52px; }
  .fab__tooltip { display: none; }

  .orb { filter: blur(60px); opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
