:root {
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.04);
  --text: #ffffff;
  --muted: #b9b9b9;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #050505;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.bg-waves {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.bg-waves::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
    url("./mesh-bg.png") center / cover no-repeat;
  background-blend-mode: multiply;
  opacity: 0.98;
}

.soft-wave {
  position: absolute;
  inset: -18%;
  background-image:
    repeating-linear-gradient(0deg, rgba(214, 178, 255, 0.11) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(214, 178, 255, 0.11) 0 1px, transparent 1px 28px);
  mix-blend-mode: screen;
  transform-origin: center;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.9) 44%, rgba(0,0,0,0.35) 56%, rgba(0,0,0,0) 68%);
}

.sw1 {
  opacity: 0.42;
  transform: perspective(820px) rotateX(74deg) translateY(40vh) scale(1.72);
  animation: meshDriftA 22s ease-in-out infinite alternate;
}

.sw2 {
  opacity: 0.33;
  transform: perspective(820px) rotateX(73deg) translateY(28vh) scale(1.38);
  animation: meshDriftB 26s ease-in-out infinite alternate;
}

.sw3 {
  opacity: 0.22;
  transform: perspective(820px) rotateX(72deg) translateY(16vh) scale(1.08);
  animation: meshDriftC 29s ease-in-out infinite alternate;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: none;
  background: #050505;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
}

.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.lang-toggle {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 8px;
  padding: 0.22rem 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.lang-transition {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(2px);
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
}

.lang-transition.is-visible {
  display: flex;
}

.lang-transition-globe {
  width: 276px;
  height: 276px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(128, 207, 255, 0.35), rgba(255, 255, 255, 0.06));
  overflow: hidden;
}

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

main {
  padding-top: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.2rem;
  font-weight: 500;
}

nav a:hover { color: var(--text); }

.hero { padding: 0.8rem 0 5rem; }

.hero-main {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  align-items: center;
  gap: 1.4rem;
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.cursor-halo {
  --x: 50%;
  --y: 50%;
  position: absolute;
  width: 110px;
  height: 110px;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.96) 42%, rgba(255,255,255,0.78) 58%, rgba(255,255,255,0) 72%),
    radial-gradient(circle, rgba(130, 87, 255, 0.38) 0%, rgba(130, 87, 255, 0.12) 52%, rgba(130, 87, 255, 0) 74%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 0 42px rgba(130, 87, 255, 0.28);
  mix-blend-mode: difference;
  opacity: 0;
  filter: blur(0px);
  transition: opacity 0.08s ease, transform 0.08s ease;
  z-index: 3;
}

.cursor-halo.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.hero-main > *:not(.cursor-halo) {
  position: relative;
  z-index: 2;
}

.hero-logo-wrap {
  display: flex;
  justify-content: flex-start;
}

.hero-logo {
  width: min(340px, 88%);
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.77rem;
  color: var(--muted);
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.06;
  margin: 0.8rem 0 1.2rem;
  max-width: 14ch;
}

.lead {
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

.hero-cta,
.contact-cta {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-cta {
  justify-content: center;
}

.hero-process {
  margin-top: 2.2rem;
  width: 100%;
  padding: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.process-card {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0.9rem 1rem;
  text-align: center;
}

.process-icon {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(196, 170, 255, 0.35);
  background: rgba(10, 4, 20, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  margin: 0 auto 0.45rem;
  overflow: hidden;
}

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


.process-card h3 {
  margin: 0 0 0.34rem;
  font-size: 1.26rem;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-process .process-card:nth-child(1) h3 {
  color: #ff4fcf;
}

.hero-process .process-card:nth-child(2) h3 {
  color: #7fc4ff;
}

.hero-process .process-card:nth-child(3) h3 {
  color: #ff9ccf;
}

.process-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.btn {
  display: inline-block;
  padding: 0.82rem 1.12rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(3, 8, 20, 0.35);
}

.btn-primary {
  background: var(--accent);
  color: #111;
  border-color: transparent;
}

.btn-ghost { color: var(--text); }

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

#servicios.section,
#methodInteractive.section,
#contacto.section,
.brands-strip.section,
#resultados.section {
  border-top: none;
}

.brands-strip.section {
  padding-bottom: 0.3rem;
}

#resultados.section {
  padding-top: 0.3rem;
}

#servicios.section {
  padding-top: 0.4rem;
  position: relative;
  overflow: hidden;
}

#servicios.section::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(103, 54, 196, 0.34) 0%, rgba(103, 54, 196, 0.12) 28%, rgba(103, 54, 196, 0) 68%);
  opacity: var(--servicios-glow, 0);
  transition: opacity 0.22s ease;
  z-index: 0;
}

#servicios.section > * {
  position: relative;
  z-index: 1;
}

.section-head p { color: var(--muted); }

.brands-strip {
  padding-top: 1.2rem;
  width: 100%;
}

.brands-marquee {
  margin-top: 0.9rem;
  width: 100%;
  background: linear-gradient(180deg, rgba(21, 10, 40, 0.86), rgba(10, 6, 22, 0.9));
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
}

.brands-track {
  display: flex;
  width: max-content;
  animation: brandsLoop 24s linear infinite;
}

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

.brand-item {
  min-width: 210px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0 0.8rem;
}

.brand-logo {
  max-height: 52px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card,
.quote {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
}

.quotes .quote {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 14px 36px rgba(255, 255, 255, 0.12);
}

.quotes .quote p,
.quotes .quote span {
  color: #000000;
}

.grid.cards .card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.56)),
    url("./cards-light-bg.jpg") center / cover no-repeat;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 14px 36px rgba(255, 255, 255, 0.12);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.grid.cards .card p,
.grid.cards .card h3 {
  color: #000000;
  transition: color 0.22s ease;
}

.grid.cards .card:hover {
  background:
    linear-gradient(180deg, rgba(18, 8, 34, 0.82), rgba(9, 5, 18, 0.9)),
    url("./mesh-bg.png") center / cover no-repeat;
  border-color: rgba(193, 169, 255, 0.55);
  box-shadow: 0 18px 44px rgba(88, 43, 160, 0.35);
}

.grid.cards .card:hover h3,
.grid.cards .card:hover p {
  color: #ffffff;
}

.card p,
.split p,
.contact p,
.quote span { color: var(--muted); }

.steps li,
.steps li * {
  color: #000000;
}

.card:hover,
.quote:hover {
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

/* Keep case cards stable on hover (no lift/crop effect) */
.cases-track .quote:hover {
  transform: none;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.method-panel {
  position: relative;
  border-radius: 14px;
}

.method-glow {
  --mx: 50%;
  --my: 50%;
  position: absolute;
  width: 150px;
  height: 150px;
  left: 0;
  top: 0;
  transform: translate(calc(var(--mx) - 75px), calc(var(--my) - 75px));
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(142, 93, 255, 0.62) 0%, rgba(142, 93, 255, 0.28) 40%, rgba(142, 93, 255, 0) 76%);
  filter: blur(10px);
  transition: opacity 0.12s ease, transform 0.06s linear;
  z-index: 0;
}

.method-panel > *:not(.method-glow) {
  position: relative;
  z-index: 1;
}

.method-panel:hover .method-glow,
.method-glow.is-visible {
  opacity: 1;
}

.route-illustration {
  margin-top: 1rem;
  height: 150px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.route-glow { display: none; }

.route-lane {
  position: absolute;
  width: 130%;
  height: 240px;
  left: -15%;
  bottom: -130px;
  border-top: 2px solid rgba(198, 170, 255, 0.5);
  border-radius: 50% 50% 0 0;
}

.lane-left {
  transform: rotate(-8deg);
}

.lane-right {
  transform: rotate(8deg);
}

.route-center {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to top,
    rgba(255, 255, 255, 0.95) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.8;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.steps li {
  border: 1px solid #ffffff;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.56)),
    url("./cards-light-bg.jpg") center / cover no-repeat;
  color: #000000;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.steps li:hover {
  background:
    linear-gradient(180deg, rgba(18, 8, 34, 0.82), rgba(9, 5, 18, 0.9)),
    url("./mesh-bg.png") center / cover no-repeat;
  border-color: rgba(193, 169, 255, 0.55);
  box-shadow: 0 18px 44px rgba(88, 43, 160, 0.35);
  color: #ffffff;
}

.steps li:hover,
.steps li:hover * {
  color: #ffffff;
}

.steps span {
  color: #000000;
  font-weight: 700;
  margin-right: 0.5rem;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cases-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  touch-action: pan-y;
}

.cases-viewport {
  overflow: hidden;
}

.cases-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.32s ease;
  will-change: transform;
  touch-action: pan-y;
  cursor: grab;
}

.cases-track.dragging {
  cursor: grabbing;
  transition: none;
}

.cases-carousel.dragging,
.cases-carousel.dragging * {
  user-select: none;
}

.cases-track .quote {
  flex: 0 0 calc((100% - 5rem) / 6);
  min-width: calc((100% - 5rem) / 6);
  background: linear-gradient(180deg, rgba(22, 10, 46, 0.76), rgba(11, 6, 24, 0.8));
  border-color: rgba(118, 86, 196, 0.32);
  box-shadow: 0 16px 34px rgba(10, 4, 24, 0.42);
  backdrop-filter: blur(2px);
}

.case-nav {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(14, 7, 26, 0.75);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.case-nav:hover {
  background: rgba(30, 14, 60, 0.95);
}

.case-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.case-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.case-title-link {
  color: inherit;
  text-decoration: none;
}

.case-title-link:hover {
  text-decoration: underline;
}

.case-image-swap {
  position: relative;
  height: 150px;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  overflow: hidden;
}

.case-badges {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.case-badge {
  position: static;
  z-index: 1;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.08rem 0.3rem;
  border-radius: 999px;
  color: #ffffff;
  border: 1px solid #ffffff;
  backdrop-filter: blur(3px);
  line-height: 1.15;
}

.badge-e2e {
  background: rgba(48, 115, 255, 0.72);
}

.badge-design {
  background: rgba(255, 140, 42, 0.72);
}

.badge-social {
  background: rgba(138, 72, 255, 0.72);
}

.badge-production {
  background: rgba(255, 140, 42, 0.78);
}

.badge-press {
  background: rgba(255, 255, 255, 0.25);
}

.badge-sem {
  background: rgba(40, 200, 130, 0.78);
}

.badge-e2e,
.badge-design,
.badge-social,
.badge-production,
.badge-press,
.badge-sem {
  color: #ffffff;
}

.case-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: block;
}

.case-image.placeholder {
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
}

.case-image-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.quote:hover .case-image-hover {
  opacity: 1;
}

.quote > .case-image {
  margin-bottom: 0.8rem;
  filter: brightness(0.88) saturate(1.05);
}


.quote p,
.quote h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.quote h3 {
  font-size: 1.08rem;
}

.quote span { font-size: 0.9rem; }

.contact {
  text-align: center;
  padding-bottom: 5rem;
}

.contact-box {
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid rgba(170, 140, 255, 0.22);
  background: linear-gradient(180deg, rgba(21, 10, 40, 0.84), rgba(10, 6, 22, 0.9));
  border-radius: 16px;
  padding: 2rem 1.2rem;
}

.contact-box .btn,
.contact-box .btn-ghost {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #040404;
}

.footer-grid {
  padding: 2.4rem 0 1.6rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.2rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-logo {
  height: 68px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  margin-bottom: 0.95rem;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 0.45rem;
}

.footer-links h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.88;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-content {
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.toki-launcher {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 70;
  border: 1px solid rgba(174, 145, 255, 0.5);
  background: linear-gradient(135deg, rgba(38, 14, 78, 0.92), rgba(20, 9, 42, 0.95));
  color: #ffffff;
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(12, 5, 26, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.toki-launcher-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  transform: scale(1.3);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.toki-chat-panel {
  position: fixed;
  left: 28px;
  right: 28px;
  top: 20px;
  bottom: 20px;
  width: auto;
  height: auto;
  z-index: 80;
  border-radius: 22px;
  border: 1px solid rgba(173, 146, 255, 0.32);
  background: linear-gradient(180deg, rgba(15, 8, 29, 0.96), rgba(9, 6, 18, 0.98));
  box-shadow: 0 24px 56px rgba(8, 4, 16, 0.62);
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.toki-chat-panel.is-open {
  display: grid;
}

.toki-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(45, 20, 92, 0.9), rgba(28, 13, 58, 0.92));
}

.toki-head-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.toki-avatar-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
}

.toki-avatar-btn.shake {
  animation: tokiShake 0.36s ease-in-out;
}

.toki-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  transform: scale(1.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.toki-head-left strong { display: block; font-size: 0.95rem; }
.toki-head-left span { display: block; font-size: 0.78rem; color: rgba(255,255,255,.7); }

.toki-close {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
}

.toki-messages {
  overflow-y: auto;
  padding: 0.85rem 0 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.toki-msg {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.toki-msg-user {
  justify-content: flex-end;
}

.toki-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  transform: scale(1.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.toki-bubble {
  max-width: 84%;
  border-radius: 14px;
  padding: 0.56rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  line-height: 1.38;
  white-space: pre-line;
}

.toki-msg-user .toki-bubble {
  background: linear-gradient(145deg, rgba(41, 19, 84, 0.85), rgba(24, 12, 49, 0.9));
}

.toki-typing {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.62);
  min-height: 18px;
  padding: 0.1rem 0.2rem 0.28rem;
}

.toki-input-wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding: 0.62rem 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toki-input-wrap input {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding: 0.62rem 0.72rem;
  font-size: 16px;
}

.toki-send {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #ffffff;
  color: #111;
  font-weight: 700;
  padding: 0.62rem 0.78rem;
  cursor: pointer;
}

.toki-avatar-popup {
  position: absolute;
  top: 64px;
  left: 14px;
  right: 14px;
  min-height: 148px;
  border-radius: 14px;
  border: 1px solid rgba(174, 145, 255, 0.45);
  background: linear-gradient(180deg, rgba(35, 16, 71, 0.98), rgba(20, 10, 42, 0.98));
  padding: 0.85rem 0.9rem 0.9rem;
  z-index: 9;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: left;
  gap: 1rem;
}

.toki-avatar-popup.is-open {
  display: flex;
}

.toki-avatar-popup-img {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  transform: scale(1.3);
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex: 0 0 auto;
  margin-left: 0.2rem;
}

.toki-avatar-popup p {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.45;
  font-style: italic;
  max-width: 72%;
}

.toki-avatar-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.toki-popup-timer {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.toki-popup-timer span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(208, 181, 255, 0.28);
  border-top-color: rgba(208, 181, 255, 0.95);
  border-right-color: rgba(208, 181, 255, 0.95);
  transform: rotate(0deg);
}

.toki-avatar-popup.is-open .toki-popup-timer span {
  animation: tokiCountdownRing 6s linear forwards;
}

@keyframes tokiShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

@keyframes tokiCountdownRing {
  from {
    transform: rotate(0deg);
    opacity: 1;
  }
  to {
    transform: rotate(-360deg);
    opacity: 0.45;
  }
}

@keyframes langGlobeSpin3D {
  0% {
    transform: rotateX(16deg) rotateY(0deg) rotateZ(-5deg);
  }
  100% {
    transform: rotateX(16deg) rotateY(360deg) rotateZ(-5deg);
  }
}

@media (max-width: 900px) {
  .toki-chat-panel {
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
    border-radius: 16px;
  }
}

@keyframes brandsLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes meshDriftA {
  0% { transform: perspective(820px) rotateX(74deg) translate3d(-1.5%, 40vh, 0) scale(1.72); }
  100% { transform: perspective(820px) rotateX(75deg) translate3d(2.2%, 42vh, 0) scale(1.78); }
}

@keyframes meshDriftB {
  0% { transform: perspective(820px) rotateX(73deg) translate3d(1.2%, 28vh, 0) scale(1.38); }
  100% { transform: perspective(820px) rotateX(74deg) translate3d(-2%, 30vh, 0) scale(1.43); }
}

@keyframes meshDriftC {
  0% { transform: perspective(820px) rotateX(72deg) translate3d(-1%, 16vh, 0) scale(1.08); }
  100% { transform: perspective(820px) rotateX(73deg) translate3d(1.6%, 18vh, 0) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .soft-wave { animation: none !important; }
  .cursor-halo { display: none; }
}

@media (pointer: coarse) {
  .cursor-halo { display: none; }
}

@media (max-width: 920px) {
  .container {
    width: min(1120px, 94%);
  }

  .grid.cards,
  .quotes { grid-template-columns: 1fr; }

  .cases-track .quote {
    flex-basis: calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
  }

  .hero-process {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0 3vw;
  }

  .split,
  .hero-main,
  .footer-grid { grid-template-columns: 1fr; }

  .nav {
    min-height: 60px;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    flex-direction: row;
    gap: 0.4rem;
  }

  .nav-right {
    gap: 0.45rem;
    max-width: calc(100% - 84px);
    position: relative;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(220px, 74vw);
    background: rgba(5, 5, 5, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.4rem;
    z-index: 90;
    flex-direction: column;
    gap: 0.35rem;
  }

  nav.open {
    display: flex;
  }

  nav a {
    margin-left: 0;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.35rem 0.48rem;
  }

  .lang-toggle {
    font-size: 0.72rem;
    padding: 0.22rem 0.5rem;
    flex-shrink: 0;
  }

  .hero {
    padding: 0.4rem 0 3rem;
  }

  .hero-logo-wrap {
    justify-content: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
    order: -1;
  }

  .hero-logo {
    width: min(220px, 62%);
  }

  .hero-process {
    margin-top: 1.2rem;
    gap: 0.65rem;
  }

  .brand img { height: 32px; }

  .section {
    padding: 2.4rem 0;
  }

  #servicios.section {
    padding-top: 0.2rem;
  }

  .grid.cards .card:hover {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 14px 36px rgba(255, 255, 255, 0.12);
  }

  .grid.cards .card:hover h3,
  .grid.cards .card:hover p {
    color: #000000;
  }

  .grid.cards .card.midline-active {
    background:
      linear-gradient(180deg, rgba(18, 8, 34, 0.82), rgba(9, 5, 18, 0.9)),
      url("./mesh-bg.png") center / cover no-repeat;
    border-color: rgba(193, 169, 255, 0.55);
    box-shadow: 0 18px 44px rgba(88, 43, 160, 0.35);
  }

  .grid.cards .card.midline-active h3,
  .grid.cards .card.midline-active p {
    color: #ffffff;
  }

  .contact {
    padding-bottom: 3.2rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    padding: 0.9rem 0 1rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    background: rgba(5, 5, 5, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  main {
    padding-top: 60px;
  }

  .nav {
    min-height: 60px;
    padding-top: 0;
    gap: 0.28rem;
  }

  nav a {
    font-size: 0.74rem;
    padding: 0.16rem 0.44rem;
  }

  .kicker {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: clamp(1.72rem, 9.2vw, 2.3rem);
    line-height: 1.08;
    margin: 0.45rem 0 0.75rem;
    max-width: 100%;
  }

  .lead {
    font-size: 0.97rem;
  }

  .hero-cta,
  .contact-cta {
    margin-top: 1.1rem;
    gap: 0.55rem;
  }

  .hero-cta .btn,
  .contact-cta .btn {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
  }

  .process-card {
    padding: 0.95rem 0.9rem;
  }

  .process-icon {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
  }

  .process-card h3 {
    font-size: 1.3rem;
  }

  .grid.cards,
  .quotes {
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .cases-carousel {
    grid-template-columns: 28px 1fr 28px;
    gap: 0.35rem;
  }

  .cases-track .quote {
    flex-basis: 100%;
    min-width: 100%;
  }

  .case-nav {
    width: 28px;
    height: 28px;
  }

  .brand-item {
    min-width: 148px;
    height: 56px;
    font-size: 0.82rem;
  }

  .brand-logo {
    max-height: 38px;
  }

  .card,
  .quote,
  .steps li {
    padding: 1rem;
  }

  .case-image {
    height: 130px;
  }

  .route-illustration {
    height: 118px;
  }

  .contact-box {
    padding: 1.25rem 0.9rem;
  }

  .footer-grid {
    padding: 1.6rem 0 1rem;
    gap: 0.8rem;
  }

  .footer-logo {
    height: 56px;
  }

  .footer-links a {
    font-size: 0.95rem;
  }
}


.cases-rebuilt .cases-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.cases-rebuilt .cases-window {
  overflow: hidden;
}

.cases-rebuilt .cases-strip {
  display: flex;
  gap: 1rem;
}

.cases-rebuilt .case-card {
  flex: 0 0 calc((100% - 2rem) / 3);
  min-width: calc((100% - 2rem) / 3);
}

@media (max-width: 920px) {
  .cases-rebuilt .case-card {
    flex-basis: calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 640px) {
  .cases-rebuilt .cases-shell {
    grid-template-columns: 28px 1fr 28px;
    gap: 0.35rem;
  }

  .cases-rebuilt .case-card {
    flex-basis: 100%;
    min-width: 100%;
  }
}


.cases-rebuilt .quote:hover {
  transform: none;
}

.cases-rebuilt .case-image-swap {
  overflow: visible;
}
