/* ============================================================
   AMPLITUD STUDIO · styles.css
   Base: Negro #0A0A0A · Acento: Cian #06B6D4 · Blanco #FFFFFF
   ============================================================ */

:root {
  --bg: #0A0A0A;
  --bg-alt: #0e1116;
  --bg-soft: #10151d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --cyan: #06B6D4;
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --white: #FFFFFF;
  --muted: #9ca3af;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

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

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

.gradient {
  background: linear-gradient(120deg, var(--cyan), #22d3ee 55%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cyan);
  color: #04161b;
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.4), 0 8px 30px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.6), 0 14px 44px rgba(6, 182, 212, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}

.btn-cta {
  background: var(--cyan);
  color: #04161b;
  padding: 10px 22px;
  font-size: 0.88rem;
}

.btn-cta:hover {
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--surface-border);
}

.nav {
  width: min(1200px, 94%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  width: 26px;
  height: 26px;
  position: relative;
  flex: none;
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--cyan);
}

.logo-mark::after {
  inset: 6px;
  border-color: var(--white);
  animation: pulse 2.4s ease-in-out infinite;
}

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

.logo-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0.06em;
}

.logo-text span {
  color: var(--cyan);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.72) 0%, rgba(10, 10, 10, 0.45) 45%, rgba(10, 10, 10, 0.88) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(6, 182, 212, 0.16), transparent 60%),
    radial-gradient(50rem 34rem at 8% 110%, rgba(34, 211, 238, 0.10), transparent 60%);
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.5;
}

.hero-bg::before {
  width: 420px;
  height: 420px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  top: -140px;
  right: -120px;
  animation: drift 16s ease-in-out infinite;
}

.hero-bg::after {
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  bottom: -120px;
  left: -100px;
  animation: drift 20s ease-in-out infinite reverse;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, -30px) rotate(12deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(6, 182, 212, 0.3);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 38px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
}

.stat strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  color: var(--cyan);
}

.stat span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ============ SECTIONS ============ */
.section {
  padding: 110px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--surface-border);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ============ GLASS CARDS ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

/* Una sola tarjeta en la grilla: se centra y no queda angosta a la izquierda */
.cards-grid.is-single {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.card {
  padding: 38px 32px;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.12);
}

.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card-media {
  border-color: rgba(6, 182, 212, 0.6);
}

.card:hover .card-media video {
  transform: scale(1.05);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-icon {
  font-size: 2.6rem;
  margin-bottom: 18px;
  display: inline-block;
  transition: transform 0.35s ease;
}

.card h3 {
  font-size: 1.32rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 20px;
}

.card-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags li {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* ============ TEAM ============ */
.member {
  padding: 40px 32px;
  text-align: center;
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.member:hover {
  transform: translateY(-10px);
  border-color: rgba(6, 182, 212, 0.5);
}

.member-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(6, 182, 212, 0.22), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.18);
  overflow: hidden;
}

/* Los posters ya no existen: el video llega desde el CDN. Mientras carga
   se ve este degradado, para que el cuadro nunca quede vacío. */
.member-avatar,
.card-media {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(139, 92, 246, 0.12) 55%, rgba(255, 255, 255, 0.03));
  background-size: 220% 220%;
  animation: mediaShimmer 2.6s ease-in-out infinite;
}

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

video.is-ready {
  animation: none;
}

.card-media video.is-ready {
  opacity: 1;
}

.member-avatar video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.member-avatar video.is-ready {
  opacity: 1;
}

.member h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.member-role {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.member p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ PROCESS STEPS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  text-align: center;
  padding: 40px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.step:hover {
  transform: translateY(-8px);
  border-color: rgba(6, 182, 212, 0.45);
}

.step-num {
  position: absolute;
  top: -18px;
  left: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: var(--cyan);
  color: #04161b;
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.4);
}

.step-icon {
  font-size: 2.3rem;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============ CTA FINAL ============ */
.section-cta {
  padding-bottom: 120px;
}

.cta-box {
  text-align: center;
  padding: 72px 32px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40rem 20rem at 50% 0%, rgba(6, 182, 212, 0.16), transparent 70%);
  pointer-events: none;
}

.cta-box .section-title {
  position: relative;
}

.cta-box .section-sub {
  position: relative;
  margin-bottom: 30px;
}

.cta-box .btn {
  position: relative;
}

/* ============ CTA BANDAS INTERMEDIAS ============ */
.cta-band {
  padding: 40px 0;
  background: linear-gradient(180deg, transparent, rgba(6, 182, 212, 0.05), transparent);
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 34px 40px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius);
  background: rgba(6, 182, 212, 0.06);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.cta-band-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 600;
}

.cta-band-inner .btn {
  flex: none;
}

/* ============ TESTIMONIOS ============ */
.testimonial {
  position: relative;
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.testimonial:hover {
  transform: translateY(-10px);
  border-color: rgba(6, 182, 212, 0.5);
}

.testimonial-quote {
  position: absolute;
  top: 12px;
  right: 24px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 5rem;
  line-height: 1;
  color: rgba(6, 182, 212, 0.25);
  pointer-events: none;
}

.testimonial-text {
  font-size: 1rem;
  color: #e5e7eb;
  margin-bottom: 28px;
  position: relative;
}

.testimonial-author {
  margin-top: auto;
  border-top: 1px solid var(--surface-border);
  padding-top: 18px;
}

.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
}

.testimonial-author span {
  font-size: 0.82rem;
  color: var(--cyan);
}

/* ============ STACK ============ */
.stack-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 860px;
  margin-inline: auto;
}

.chip {
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.chip:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.08);
}

/* ============ CONTACTO: FORMULARIO ============ */
.contact-wrap {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 40px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.contact-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(30rem 18rem at 0% 0%, rgba(6, 182, 212, 0.1), transparent 60%);
  pointer-events: none;
}

.contact-info {
  position: relative;
}

.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.contact-info > p {
  color: var(--muted);
  margin-bottom: 26px;
  font-size: 0.98rem;
}

.contact-extra {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--white);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
  resize: vertical;
}

.form-field select {
  appearance: none;
  cursor: pointer;
}

.form-field select option {
  background: var(--bg-alt);
  color: var(--white);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.05);
}

.form-submit {
  align-self: flex-start;
}

.form-ok {
  display: none;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.form-ok.show {
  display: block;
  animation: msgIn 0.35s ease both;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--surface-border);
  background: var(--bg-alt);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr 1.2fr;
  gap: 40px;
  padding-bottom: 56px;
}

.footer-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 18px;
  color: var(--white);
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--cyan);
}

.socials a {
  display: inline-block;
  margin-right: 14px;
  padding: 8px 14px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
}

.socials a:hover {
  border-color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--surface-border);
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============ CHAT WIDGET ============ */
.chat-fab {
  position: fixed;
  left: 24px;
  bottom: 92px;
  z-index: 200;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #0891b2, #06B6D4);
  color: #fff;
  box-shadow: 0 12px 34px rgba(6, 182, 212, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.6);
}

.chat-fab svg {
  width: 28px;
  height: 28px;
}

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

.chat-fab.open {
  background: #1f2937;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.chat-fab.open .fab-icon {
  display: none;
}

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

.chat-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  animation: ripple 2.2s ease-out infinite;
}

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* WhatsApp floating */
.wa-fab {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 199;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 10px 26px rgba(34, 197, 94, 0.4);
  transition: transform 0.3s ease;
  font-size: 1.5rem;
}

.wa-fab:hover {
  transform: translateY(-4px) scale(1.08);
}

.chat-widget {
  position: fixed;
  left: 24px;
  bottom: 164px;
  z-index: 199;
  width: min(380px, calc(100vw - 48px));
  height: min(560px, calc(100vh - 200px));
  background: rgba(15, 18, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.chat-widget.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--surface-border);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: linear-gradient(140deg, rgba(6, 182, 212, 0.3), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(6, 182, 212, 0.4);
  flex: none;
}

.chat-header strong {
  display: block;
  font-size: 0.95rem;
}

.chat-header span {
  display: block;
  font-size: 0.75rem;
  color: #4ade80;
}

.chat-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  transition: color 0.25s ease;
}

.chat-close:hover {
  color: var(--white);
}

/* ============ CHAT · barra de progreso ============ */
.chat-header {
  position: relative;
  flex-wrap: wrap;
}

.chat-progress {
  flex-basis: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 4px;
}

.chat-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #67e8f9);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ CHAT · botón de atrás ============ */
.chat-back {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  transition: color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.chat-back:hover:not(:disabled) {
  color: var(--cyan);
  border-color: var(--cyan);
}

.chat-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============ CHAT · errores de validación ============ */
.msg-error {
  border-color: rgba(248, 113, 113, 0.45) !important;
  background: rgba(248, 113, 113, 0.1) !important;
  color: #fecaca;
}

/* ============ CHAT · resumen editable ============ */
.chat-summary {
  align-self: flex-start;
  width: 100%;
  max-width: 92%;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.07);
  border-radius: 14px;
  padding: 14px 15px;
  animation: msgIn 0.35s ease both;
}

.chat-summary-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--cyan);
}

.chat-summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-summary-row:first-of-type {
  border-top: 0;
}

.chat-summary-key {
  grid-column: 1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.chat-summary-val {
  grid-column: 1;
  font-size: 0.88rem;
  color: var(--white);
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-summary-edit {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  background: none;
  border: 1px solid var(--surface-border);
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: inherit;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.chat-summary-edit:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.chat-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.chat-summary-actions .wsp-link {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chat-summary-actions .wsp-link:hover {
  transform: translateY(-2px);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-body::-webkit-scrollbar {
  width: 6px;
}

.chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.msg {
  max-width: 85%;
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: msgIn 0.35s ease both;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 4px;
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(140deg, #0891b2, #06B6D4);
  color: #04161b;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.msg.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msg.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 1.2s infinite ease-in-out;
}

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

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* Opción en botón dentro del chat */
.chat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
  width: 100%;
  max-width: 85%;
  animation: msgIn 0.35s ease both;
}

.chat-options .wsp-link {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wsp-link.primary {
  background: linear-gradient(140deg, #0891b2, #06B6D4);
  color: #04161b;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

.wsp-link.primary:hover {
  transform: translateY(-2px);
}

.wsp-link.wa {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.wsp-link.wa:hover {
  transform: translateY(-2px);
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.02);
}

.chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease;
}

.chat-input input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.chat-input input:focus {
  border-color: var(--cyan);
}

.chat-input input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-input button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--cyan);
  color: #04161b;
  font-size: 1.05rem;
  cursor: pointer;
  flex: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-input button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-input button:not(:disabled):hover {
  transform: scale(1.08);
}

/* Typing dots in chat input button while thinking */
.chat-input button.thinking {
  animation: pulseBtn 1s ease-in-out infinite;
}

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

/* ============ VIDEOS · fade-in y placeholder ============ */
video[data-lazy] {
  opacity: 0;
  transition: opacity 0.6s ease;
}

video[data-lazy].is-ready {
  opacity: 1;
}

/* Si el video no se puede reproducir, el poster queda igual */
video[data-lazy].is-failed {
  opacity: 1;
}

/* Placeholder mientras carga el primer frame */
.card-media {
  background: linear-gradient(140deg, rgba(6, 182, 212, 0.18), rgba(255, 255, 255, 0.04));
}

@media (prefers-reduced-motion: reduce) {
  video[data-lazy] {
    opacity: 1;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .cta-band-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 84px 0;
  }

  .contact-wrap {
    padding: 32px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-band-inner {
    padding: 28px 22px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(18px);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding-top: 30px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    font-size: 1.15rem;
  }

  .nav-cta {
    font-size: 1rem;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-stats {
    gap: 28px;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-desc {
    margin-inline: auto;
  }

  .chat-fab {
    left: 16px;
    bottom: 84px;
    width: 56px;
    height: 56px;
  }

  .wa-fab {
    left: 20px;
    bottom: 20px;
  }

  .chat-widget {
    left: 12px;
    bottom: 152px;
    width: calc(100vw - 24px);
    height: calc(100vh - 190px);
  }
}
/* ============================================================
   AMPLITUD STUDIO · NUEVAS SECCIONES DE VENTA
   ============================================================ */

/* Grid de 4 columnas para Casos de Uso */
.grid-4-cols {
  grid-template-columns: repeat(4, 1fr);
}

/* Texto destacado en tarjetas */
.highlight-text {
  color: var(--white);
  font-weight: 500;
  border-left: 3px solid var(--cyan);
  padding-left: 12px;
  margin-bottom: 16px !important;
  background: rgba(6, 182, 212, 0.05);
  padding: 12px;
  border-radius: 0 8px 8px 0;
}

/* Sección La Matemática Simple */
.math-section {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, var(--bg) 100%);
  border-top: 1px solid rgba(6, 182, 212, 0.3);
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  text-align: center;
  padding: 80px 0;
}

.math-big-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--cyan);
  margin: 24px 0;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(6, 182, 212, 0.3);
}

.math-text {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Ajustes Responsive para las nuevas secciones */
@media (max-width: 960px) {
  .grid-4-cols {
    grid-template-columns: 1fr 1fr; /* 2 columnas en tablets */
  }
}

@media (max-width: 720px) {
  .grid-4-cols {
    grid-template-columns: 1fr; /* 1 columna en móviles */
  }
  
  .math-section {
    padding: 60px 20px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}