/* ==========================================================================
   PANDA CREATIVO STUDIO — Landing Page
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --bg-alt: #0e0e17;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f4f6;
  --text-muted: #a6a6b3;
  --text-dim: #86868f;

  --green: #25d366;
  --green-2: #4fe08a;
  --violet: #7c5cff;
  --violet-2: #a78bfa;

  --gradient: linear-gradient(135deg, var(--green) 0%, var(--violet) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(124, 92, 255, 0.15));

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --font-heading: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 84px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

:focus-visible {
  outline: 2px solid var(--violet-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ============ FONDO CONTINUO (scroll de toda la página) ============ */
.scroll-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  will-change: filter;
}
.scroll-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}
.scroll-bg__blob--1 {
  width: 55vw;
  height: 55vw;
  top: -15%;
  left: -15%;
  background: var(--green);
  opacity: 0.2;
}
.scroll-bg__blob--2 {
  width: 50vw;
  height: 50vw;
  top: 35%;
  right: -18%;
  background: var(--violet);
  opacity: 0.22;
}
.scroll-bg__blob--3 {
  width: 42vw;
  height: 42vw;
  bottom: -12%;
  left: 15%;
  background: var(--violet-2);
  opacity: 0.16;
}

/* Bambú — alimento del panda; motivo ambiental muy sutil, no un ícono a leer */
.scroll-bg__leaf {
  position: absolute;
  color: var(--green);
  opacity: 0.05;
  filter: blur(4px);
  will-change: transform;
}
.scroll-bg__leaf svg { width: 100%; height: 100%; display: block; }
.scroll-bg__leaf--1 {
  width: 300px;
  height: 730px;
  top: 4%;
  right: 2%;
  transform: rotate(12deg);
}
.scroll-bg__leaf--2 {
  width: 240px;
  height: 590px;
  bottom: 2%;
  left: 0%;
  color: var(--violet-2);
  opacity: 0.045;
  transform: rotate(-160deg);
}
.scroll-bg__leaf--3 {
  width: 210px;
  height: 510px;
  top: 42%;
  left: -3%;
  color: var(--green-2);
  opacity: 0.04;
  transform: rotate(24deg);
}
.scroll-bg__leaf--4 {
  width: 260px;
  height: 630px;
  bottom: 16%;
  right: -4%;
  color: var(--violet);
  opacity: 0.045;
  transform: rotate(-32deg);
}

.dots-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============ GRAIN OVERLAY ============ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-repeat: repeat;
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ CURSOR GLOW ============ */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.1) 0%, rgba(37, 211, 102, 0.05) 45%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform, filter;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-glow.is-active { opacity: 1; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: var(--gradient);
  color: #08110b;
  box-shadow: 0 8px 30px -8px rgba(37, 211, 102, 0.5);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -6px rgba(124, 92, 255, 0.55);
}

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

.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn--sm { padding: 0.6rem 1.25rem; font-size: 0.85rem; }

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.is-scrolled {
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}
.navbar__logo-mark {
  display: inline-block;
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(37, 211, 102, 0.45));
  animation: logo-spin 7s linear infinite;
}
.navbar__logo-text em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-inline: auto;
}
.nav-link {
  font-size: 0.92rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--gradient);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.navbar__cta { flex-shrink: 0; }

.navbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}
.navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  margin-inline: auto;
}
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 90;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu__link {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
}

/* ============ BACKGROUND DECOR ============ */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.blob--green {
  width: 480px;
  height: 480px;
  background: var(--green);
  top: -10%;
  left: -8%;
  opacity: 0.28;
}
.blob--violet {
  width: 560px;
  height: 560px;
  background: var(--violet);
  bottom: -15%;
  right: -10%;
  opacity: 0.3;
}
.blob--sm { width: 320px; height: 320px; opacity: 0.22; }

.floaty {
  position: absolute;
  font-size: 2rem;
  opacity: 0.5;
  filter: saturate(0.6);
}
.floaty--2 { top: 68%; left: 12%; font-size: 1.4rem; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 6vh, 4rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.reveal-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.reveal-line span { display: inline-block; will-change: transform; }

.grad-text {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 2.1rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.dot-sep { opacity: 0.5; }

/* ---- Phone mockup ---- */
.hero__visual { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.phone__caption {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}
.phone__glow {
  position: absolute;
  width: 90%;
  height: 90%;
  top: 5%;
  background: var(--gradient);
  filter: blur(100px);
  opacity: 0.25;
  z-index: -1;
  border-radius: 50%;
}

.phone {
  position: relative;
  width: min(340px, 84vw);
  background: linear-gradient(180deg, #17171f, #101017);
  border: 1px solid var(--border-strong);
  border-radius: 36px;
  padding: 0.9rem 0.9rem 1.1rem;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.phone__notch {
  width: 90px;
  height: 22px;
  background: #08080c;
  border-radius: var(--radius-full);
  margin: 0 auto 0.75rem;
}
.phone__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.5rem 0.9rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}
.phone__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gradient-soft);
  overflow: hidden;
}
.phone__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone__name { font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.phone__status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: var(--text-dim);
}
.ping {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
}

.phone__body {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.25rem 0.35rem 0.5rem;
}

.msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  font-size: 0.84rem;
  line-height: 1.45;
}
.msg--in {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg--out {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.22), rgba(124, 92, 255, 0.22));
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-bottom-right-radius: 4px;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

.scroll-cue {
  position: absolute;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-cue__line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--text-dim), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(var(--green), var(--violet));
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

/* ============ MARQUEE ============ */
.marquee {
  position: relative;
  z-index: 2;
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 1.1rem 0;
  overflow: hidden;
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  animation: marquee-scroll 32s linear infinite;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee__sep { color: var(--green); }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ============ SECTIONS ============ */
.section {
  position: relative;
  padding-block: clamp(4rem, 9vw, 7.5rem);
  overflow: hidden;
}
.section--alt { background: rgba(14, 14, 23, 0.82); }

.section__head {
  max-width: 640px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-2);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--gradient);
}
.section__title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.section__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-inline: auto;
}

/* ============ GRID & CARDS ============ */
.grid { display: grid; gap: 1.25rem; position: relative; z-index: 2; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.6rem;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  margin-bottom: 1.1rem;
}
.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.card--problem .card__icon { background: rgba(124, 92, 255, 0.14); }
.card--why { text-align: left; }
.card__icon--grad {
  background: var(--gradient);
  box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.45);
}
/* si la card grid--4 termina en un item suelto en su propia fila, lo centramos */
#beneficios .card:nth-child(4n+1):last-child {
  grid-column: 1 / -1;
  max-width: 280px;
  margin-inline: auto;
}

/* ============ SOLUTION ============ */
.solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.pill--checked {
  border-color: rgba(37, 211, 102, 0.5);
  background: rgba(37, 211, 102, 0.08);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12), 0 0 18px -4px rgba(37, 211, 102, 0.55);
}
.pill__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--green);
  color: #08110b;
  flex-shrink: 0;
}
.pill__check svg {
  width: 62%;
  height: 62%;
}

.solution__visual { display: flex; justify-content: center; }
.orbit { position: relative; width: 320px; height: 320px; max-width: 80vw; max-height: 80vw; }
.orbit__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  box-shadow: 0 0 60px rgba(124, 92, 255, 0.45);
  z-index: 2;
}
.orbit__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px dashed var(--border-strong);
  border-radius: 50%;
}
.orbit__ring--1 { width: 210px; height: 210px; }
.orbit__ring--2 { width: 300px; height: 300px; }

.orbit__node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.5);
  animation: orbit-rotate 26s linear infinite;
}
.orbit__node--1 { animation-delay: 0s; }
.orbit__node--2 { animation-delay: -6.5s; }
.orbit__node--3 { animation-delay: -13s; }
.orbit__node--4 { animation-delay: -19.5s; }

/* ============ TIMELINE ============ */
.timeline {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding-left: 74px;
}
.timeline__line {
  position: absolute;
  left: 25px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  height: calc(100% - 8px);
}
.timeline__step {
  position: relative;
  padding-bottom: 3.2rem;
}
.timeline__step:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -74px;
  top: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  z-index: 2;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}
.timeline__dot--active {
  border-color: transparent;
  background: var(--gradient);
  color: #08110b;
  box-shadow: 0 0 0 6px rgba(124, 92, 255, 0.12);
}
.timeline__content h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.timeline__content p { color: var(--text-muted); font-size: 0.95rem; max-width: 46ch; }

/* ============ STATS ============ */
.stat {
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
.stat__number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.stat p { color: var(--text-muted); font-size: 0.9rem; }

/* ============ COMPARATIVA IA VS HUMANO ============ */
.compare-wrap {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  position: relative;
  z-index: 2;
}
.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  padding: 0.9rem 1.1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table thead th { border-bottom: 1px solid var(--border-strong); }
.compare-table__head {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}
.compare-table__head--ai {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.compare-table tbody th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
.compare-table tbody td { color: var(--text-muted); }
.compare-table tbody td.is-ai {
  color: var(--text);
  font-weight: 500;
  background: rgba(37, 211, 102, 0.06);
}
.compare-table tbody td.is-ai svg {
  width: 14px;
  height: 14px;
  color: var(--green-2);
  margin-right: 0.45rem;
  flex-shrink: 0;
  vertical-align: -2px;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}
.compare-table tbody tr:hover { background: var(--surface-hover); }
.compare-scroll-hint {
  display: none;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.7rem;
}
.compare-note {
  max-width: 62ch;
  margin: 1.5rem auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============ PROCESS ============ */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}
.process__step {
  padding: 1.75rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}
.process__num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.9rem;
}
.process__step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.process__step p { color: var(--text-muted); font-size: 0.85rem; }

/* ============ SERVICES ACCORDION ============ */
.accordion {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}
.accordion__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.35s ease, background 0.35s ease;
}
.accordion__item.is-open {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  text-align: left;
}
.accordion__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
}
.accordion__title {
  flex: 1;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.02rem;
}
.accordion__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-dim);
  transition: transform 0.4s var(--ease), color 0.4s ease;
}
.accordion__item.is-open .accordion__chevron {
  transform: rotate(45deg);
  color: var(--green-2);
}
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.accordion__item.is-open .accordion__panel {
  grid-template-rows: 1fr;
}
.accordion__panel-inner {
  overflow: hidden;
  min-height: 0;
}
.accordion__panel-inner p {
  padding: 0 1.4rem 1.25rem calc(1.4rem + 42px + 1rem);
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 56ch;
}

/* ============ SERVICES MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 1.25rem;
  background: rgba(6, 6, 10, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s var(--ease);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
}
.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.modal__close:hover { color: var(--text); border-color: var(--border-strong); }
.modal__close svg { width: 16px; height: 16px; }
.modal__head { text-align: center; margin-bottom: 2rem; }
.modal__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 0.6rem;
}
.modal__subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 48ch;
  margin-inline: auto;
}

/* ============ CTA FINAL ============ */
.cta-final { text-align: center; }
.cta-final__inner { position: relative; z-index: 2; }
.cta-final__title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 700;
  max-width: 20ch;
  margin: 0 auto 1rem;
}
.cta-final__subtitle {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 50ch;
  margin: 0 auto 2.2rem;
}

/* ============ CONTACT FORM ============ */
.contact-form-wrap {
  max-width: 560px;
  margin: 2.75rem auto 0;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  text-align: left;
}
.contact-form__lead {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}
.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet-2);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.contact-form__submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
.contact-form__note {
  min-height: 1.2em;
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.contact-form__note.is-success { color: var(--green-2); }
.contact-form__note.is-error { color: #f87171; }

/* ============ FOOTER ============ */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer__logo { display: inline-block; }
.footer__logo img { display: block; height: 104px; width: auto; }
.footer__brand p { color: var(--text-muted); font-size: 0.9rem; margin: 0.9rem 0 1.2rem; max-width: 32ch; }
.footer__services-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-2);
  transition: gap 0.25s ease, color 0.25s ease;
}
.footer__services-btn svg { transition: transform 0.25s ease; }
.footer__services-btn:hover { color: var(--text); gap: 0.6rem; }
.footer__services-btn:hover svg { transform: translateX(2px); }

.footer__col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
  transition: color 0.25s ease;
  width: fit-content;
}
.footer__col a:hover { color: var(--text); }

.footer__bottom { border-top: 1px solid var(--border); padding-block: 1.5rem; }
.footer__bottom p { color: var(--text-dim); font-size: 0.82rem; text-align: center; }

/* ============ KEYFRAMES ============ */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(37, 211, 102, 0.08); }
}
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes scroll-cue-move {
  0% { top: -100%; }
  100% { top: 100%; }
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes orbit-rotate {
  from { transform: rotate(0deg) translateX(150px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}
@keyframes logo-spin {
  from { transform: perspective(420px) rotateY(0deg); }
  to { transform: perspective(420px) rotateY(360deg); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .navbar__links, .navbar__cta { display: none; }
  .navbar__burger { display: flex; }

  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__subtitle { margin-inline: auto; }
  .hero__ctas, .hero__trust { justify-content: center; }
  .hero__visual { order: -1; margin-bottom: 1rem; }
  .phone { width: min(300px, 78vw); }

  .solution { grid-template-columns: 1fr; text-align: center; }
  .pill-row { justify-content: center; }
  .solution__visual { order: -1; }

  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .grid--4, .grid--3, .process { grid-template-columns: 1fr; }
  .timeline { padding-left: 62px; }
  .timeline__dot { left: -62px; width: 44px; height: 44px; font-size: 0.9rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .section__subtitle { font-size: 0.95rem; }
  .contact-form__row { grid-template-columns: 1fr; }
  .accordion__panel-inner p { padding: 0 1.2rem 1.15rem; max-width: none; }
  .compare-table { font-size: 0.82rem; }
  .compare-table th, .compare-table td { padding: 0.7rem 0.8rem; }
  .compare-scroll-hint { display: block; }
}

/* ============ SOFÍA CHAT WIDGET ============ */
#sofia-widget { --sofia-accent: var(--green); }
#sofia-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sofia-accent);
  color: #08110b;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  transition: filter 0.2s ease;
}
#sofia-launcher:hover { filter: brightness(1.08); }
#sofia-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(6, 6, 10, 0.8);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#sofia-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
#sofia-panel {
  position: fixed;
  bottom: 92px;
  right: 20px;
  z-index: 999999;
  width: 380px;
  height: 600px;
  max-height: 75vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  display: none;
  background: var(--bg-alt);
}
#sofia-panel iframe { width: 100%; height: 100%; border: 0; display: block; }
#sofia-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
@media (max-width: 480px) {
  #sofia-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}
/* evita que el botón flotante se encime con el menú móvil abierto */
body:has(.mobile-menu.is-open) #sofia-launcher,
body:has(.mobile-menu.is-open) #sofia-panel,
body:has(.mobile-menu.is-open) #sofia-backdrop {
  display: none !important;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .orbit__node, .badge__dot, .scroll-cue__line::after, .typing span, .navbar__logo-mark {
    animation: none !important;
  }
  .modal-overlay, .modal { transition: none; }
  #sofia-launcher, #sofia-backdrop { transition: none; }
}
