﻿/* ===== Variables ===== */
:root {
  /* Paleta alineada al logo Arroyito360 */
  --bg: #1a0b2e;
  --bg-elevated: #241240;
  --bg-soft: #f6f2fb;
  --bg-white: #ffffff;
  --text: #1e1033;
  --text-muted: #5c5270;
  --text-on-dark: #f8f5fc;
  --text-on-dark-muted: #c9bddb;
  --brand: #7b3fa0;
  --brand-hover: #632f86;
  --brand-deep: #4a1a6b;
  --brand-soft: rgba(123, 63, 160, 0.12);
  --brand-glow: rgba(155, 107, 201, 0.35);
  --accent: #9b6bc9;
  --accent-soft: rgba(155, 107, 201, 0.14);
  --border: rgba(74, 26, 107, 0.12);
  --border-dark: rgba(248, 245, 252, 0.12);
  --shadow: 0 18px 50px rgba(74, 26, 107, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 88px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --container: 1120px;
  --container-wide: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  /* Las secciones ya reservan el espacio visual del header en su padding. */
  scroll-padding-top: 0;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  overflow-x: hidden;
}

body {
  zoom: 0.9;
  font-family: var(--font);
  font-size: 1.0625rem;
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea {
  font: inherit;
}

/* ===== Layout ===== */
main {
  display: flex;
  flex-direction: column;
}

main > #inicio {
  order: 1;
}

main > #demo {
  order: 2;
}

main > #beneficios {
  order: 3;
}

main > #como-funciona {
  order: 4;
}

main > #precios {
  order: 5;
}

main > #contacto {
  order: 6;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  min-height: calc(100vh - var(--header-h)); /* fallback */
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  /* Títulos un poco más arriba (no centrados verticalmente) */
  justify-content: flex-start;
  padding: calc(var(--header-h) + 0.35rem) 0 2rem;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section > .container {
  width: min(100% - 1.5rem, var(--container-wide));
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.section__header {
  margin-bottom: clamp(1.15rem, 2.2vw, 1.75rem);
  flex-shrink: 0;
}

.section__header--center {
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: clamp(1.25rem, 2.4vw, 1.85rem);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.7rem;
}

.section__lead {
  color: var(--text-muted);
  font-size: clamp(1.12rem, 1.5vw, 1.28rem);
  line-height: 1.55;
}

.section__lead--left {
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.55rem;
}

.eyebrow--on-dark {
  color: #d4b5f0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  text-align: center;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.98rem;
}

.btn--lg {
  padding: 1rem 1.7rem;
  font-size: 1.08rem;
}

.whatsapp-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.btn--block {
  width: 100%;
  padding: 0.95rem 1.25rem;
}

.submit-button {
  position: relative;
  overflow: hidden;
}

.submit-button__label {
  position: relative;
  z-index: 1;
}

.submit-button__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: width 2.2s ease;
}

.submit-button:disabled .submit-button__progress {
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand) 45%, var(--brand-deep) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(74, 26, 107, 0.22);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #b07ad6 0%, var(--brand-hover) 50%, #3d1559 100%);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.18);
}

.btn--ghost:hover {
  border-color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.btn--ghost-light {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(248, 250, 252, 0.28);
}

.btn--ghost-light:hover {
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(248, 250, 252, 0.5);
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: #ffffff;
  border-bottom: 1px solid rgba(74, 26, 107, 0.08);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px rgba(74, 26, 107, 0.08);
  background: #ffffff;
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  color: var(--text);
}

.logo__img {
  height: 78px;
  width: auto;
  max-width: min(280px, 68vw);
  object-fit: contain;
}

.logo__img--footer {
  height: 64px;
  max-width: 280px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  display: block;
  padding: 0.55rem 0.8rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
  background: rgba(15, 23, 42, 0.05);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  /* Full viewport under sticky header; can grow if needed */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(4.5rem, 10vw, 8rem);
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  color: var(--text-on-dark);
  box-sizing: border-box;
  scroll-margin-top: var(--header-h);
}

.hero__media {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--bg);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero__video.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(26, 11, 46, 0.48) 0%, rgba(26, 11, 46, 0.36) 45%, rgba(26, 11, 46, 0.52) 100%),
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(123, 63, 160, 0.18), transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}

.hero .eyebrow,
.hero__eyebrow {
  color: #d4b5f0;
  font-size: clamp(1.55rem, 2.2vw, 1.35rem);
  letter-spacing: 0.12em;
  margin-bottom: 1.1rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 6.2vw, 3.95rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(26, 11, 46, 0.35);
  min-height: 2.5em;
}

.hero__type em,
.hero__title em {
  font-style: italic;
  color: #e8d4f8;
}

.hero__cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.12em;
  vertical-align: -0.05em;
  background: #e8d4f8;
  border-radius: 1px;
  animation: hero-cursor-blink 0.85s steps(1) infinite;
}

.hero__cursor.is-done {
  opacity: 0;
  animation: none;
}

@keyframes hero-cursor-blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Espacio siempre reservado; fade + zoom al aparecer */
.hero__reveal {
  pointer-events: none;
}

.hero__reveal-item {
  opacity: 0;
  transform: scale(0.84);
  transform-origin: center top;
  transition:
    opacity 1.9s var(--ease),
    transform 1.9s var(--ease);
}

.hero__reveal.is-visible {
  pointer-events: auto;
}

.hero__reveal.is-visible .hero__reveal-item {
  opacity: 1;
  transform: scale(1);
}

/* Cascada: subtítulo → botones */
.hero__reveal.is-visible .hero__reveal-item:nth-child(1) {
  transition-delay: 0s;
}

.hero__reveal.is-visible .hero__reveal-item:nth-child(2) {
  transition-delay: 0.32s;
}

.hero__subtitle {
  font-size: clamp(1.52rem, 2.1vw, 1.28rem);
  color: rgba(248, 245, 252, 0.9);
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 0;
}

.hero .btn--ghost {
  color: #ffffff;
  border-color: rgba(248, 245, 252, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.hero .btn--ghost:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .hero__cursor {
    animation: none;
    opacity: 0;
  }

  .hero__reveal {
    pointer-events: auto;
  }

  .hero__reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Demo ===== */
.demo {
  background: var(--bg-white);
  padding-top: var(--header-h);
}

.demo .container {
  width: min(100% - 1.5rem, var(--container-wide));
}

.demo .section__header--center {
  padding-top: 2.0rem;
  margin-bottom: clamp(0.85rem, 1.8vw, 1.25rem);
}

.demo__frame-wrap {
  max-width: 1280px;
  width: 100%;
  margin-inline: auto;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.demo__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* +25% sobre el tamaño anterior */
  min-height: min(72vh, 650px);
  max-height: min(85vh, 775px);
  flex: 0 1 auto;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.demo__viewer,
.demo__viewer .pnlm-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.demo__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--text-on-dark);
  background: rgba(26, 11, 46, 0.55);
  font-weight: 700;
}

.demo__fullscreen {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: rgba(26, 11, 46, 0.78);
  cursor: pointer;
}

.demo__fullscreen:hover {
  background: var(--brand);
}

.demo__viewer .pnlm-hotspot-base.pnlm-scene {
  width: 32px !important;
  height: 32px !important;
  margin-left: -16px !important;
  margin-top: -16px !important;
  border: 3px solid #fff !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.72), 0 0 10px rgba(255, 255, 255, 0.75);
}

.demo__orientation-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  display: none;
  width: min(84vw, 320px);
  padding: 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #fff;
  background: rgba(20, 28, 40, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  transform: translate(-50%, -50%);
}

.demo__orientation-toast.show {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.demo__orientation-toast img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.demo__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 30% 40%, rgba(123, 63, 160, 0.35), transparent 42%),
    radial-gradient(circle at 70% 60%, rgba(155, 107, 201, 0.22), transparent 45%),
    var(--bg);
  color: var(--text-on-dark);
}

.demo__placeholder-inner {
  text-align: center;
  max-width: 420px;
}

.demo__orb {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 245, 252, 0.06);
  color: #d4b5f0;
  animation: pulse-orb 4s ease-in-out infinite;
}

@keyframes pulse-orb {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.demo__placeholder-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.demo__placeholder-text {
  color: var(--text-on-dark-muted);
  font-size: 1.08rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  max-width: 36rem;
  margin-inline: auto;
}

.demo__cta {
  padding: 1.2rem 2.35rem;
  font-size: 1.2rem;
  min-height: 3.5rem;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(74, 26, 107, 0.32);
}

.demo__hint {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 1rem;
  color: var(--text-muted);
}

@media (max-width: 575.98px) {
  .demo__frame {
    min-height: 0;
    max-height: none;
    aspect-ratio: 1 / 1;
  }
}

/* ===== Benefits ===== */
.benefits {
  background: var(--bg-soft);
  justify-content: flex-start;
  padding-top: var(--header-h);
  padding-bottom: 1rem;
}

.benefits > .container {
  justify-content: flex-start;
  width: min(100% - 1rem, min(100%, calc(var(--container-wide) + 6rem)));
}

.benefits__layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  align-items: stretch;
  width: 100%;
  flex: 0 1 auto;
  min-height: 0;
}

.benefits__media {
  position: relative;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  aspect-ratio: 16 / 28;
  min-height: 0;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--brand-deep);
  border: 0 solid var(--border);
  box-shadow: 0 16px 40px rgba(74, 26, 107, 0.12);
}

.benefits__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.benefits__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.benefits__header {
  text-align: left;
  max-width: none;
  margin-inline: 0;
  padding-top: 4.25rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.benefits__header .section__title {
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  margin-bottom: 0;
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  flex: 0 1 auto;
  align-content: start;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.benefit-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.8rem 0.85rem 0.85rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.benefit-card__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 0.45rem;
}

.benefit-card__icon svg {
  width: 18px;
  height: 18px;
}

.benefit-card__title {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 0.28rem;
  line-height: 1.2;
}

.benefit-card__text {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

/* ===== How it works ===== */
.how {
  background: var(--bg-white);
  justify-content: center;
  align-items: center;
  /* Espacio del header arriba; el resto se centra un poco más arriba del medio */
  padding-top: var(--header-h);
  padding-bottom: 0;
}

.how > .container {
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
  width: min(100% - 0.75rem, min(100%, calc(var(--container-wide) + 7rem)));
  margin-block: auto;
}

.how .section__header--center {
  margin-bottom: clamp(1.1rem, 2vw, 1.6rem);
}

.how .section__title {
  font-size: clamp(2.25rem, 3.6vw, 3rem);
}

.how .section__lead {
  font-size: 1.24rem;
  max-width: 44rem;
  margin-inline: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
  max-width: none;
  width: 100%;
  margin-inline: auto;
  flex: 0 1 auto;
  align-content: center;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(74, 26, 107, 0.07);
}

.step__media {
  position: relative;
  aspect-ratio: 5 / 4;
  min-height: 16.5rem;
  overflow: hidden;
  background: var(--brand-deep);
}

.step__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.step__num {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: var(--text-on-dark);
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(74, 26, 107, 0.28);
}

.step__body {
  padding: 1.9rem 1.95rem 2.15rem;
  flex: 1 1 auto;
}

.step__title {
  font-size: 1.7rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 0.95rem;
  line-height: 1.22;
}

.step__text {
  color: var(--text-muted);
  font-size: 1.28rem;
  line-height: 1.64;
}

/* ===== Deliverables / Precios ===== */
.deliverables {
  background: var(--bg-soft);
}

.deliverables__layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  flex: 1 1 auto;
}

.deliverables__pricing-note {
  color: var(--text-muted);
  margin: 1.25rem 0 1.5rem;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.55;
}

.deliverables__list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.deliverable {
  display: flex;
  gap: 1.1rem;
  padding: 1.5rem 1.55rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.deliverable__check {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--brand-deep);
  margin-top: 0.1rem;
}

.deliverable__title {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.deliverable__text {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

/* ===== CTA + Contact ===== */
.cta {
  background: var(--bg-soft);
  /* Ancla al final: al llegar a contacto se ve el footer completo */
  scroll-snap-align: end;
  scroll-snap-stop: always;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  /* Espacio del header sticky + footer siempre abajo; el form se centra en el medio */
  justify-content: flex-start;
  padding-top: var(--header-h);
  padding-bottom: 0;
  gap: 0;
}

.cta > .container {
  flex: 1 1 auto;
  width: min(100% - 2rem, var(--container));
  display: flex;
  flex-direction: column;
  justify-content: center; /* centra el card verticalmente entre header y footer */
  align-items: stretch;
  padding-block: 1rem;
  min-height: 0;
}

.cta__card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.35rem;
  background: var(--bg);
  color: var(--text-on-dark);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(1.15rem, 2.5vw, 1.85rem);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  width: 100%;
  min-height: clamp(34rem, 72vh, 46rem);
  min-width: 0;
}

.cta .contact-form {
  min-width: 0;
  width: 100%;
  z-index: 1;
}

.cta .contact-form .btn--block {
  width: 100%;
}

.cta__card::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  background: radial-gradient(circle, var(--brand-glow), transparent 65%);
  pointer-events: none;
}

.cta__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta__media {
  position: relative;
  width: 100%;
  height: auto;
  min-height: clamp(34rem, 72vh, 46rem);
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--brand-deep);
}

.cta__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}

.cta__text {
  color: var(--text-on-dark-muted);
  font-size: 0.98rem;
  max-width: 34rem;
  margin-bottom: 1.1rem;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.contact-form {
  position: relative;
  background: rgba(248, 250, 252, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-form__title {
  font-weight: 650;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-dark);
  background: rgba(11, 18, 32, 0.55);
  color: var(--text-on-dark);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.cta .form-field textarea {
  min-height: 2.75rem;
  max-height: 5.5rem;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(182, 192, 209, 0.55);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(155, 107, 201, 0.75);
  box-shadow: 0 0 0 3px rgba(123, 63, 160, 0.22);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: #e07a7a;
}

.contact-form__fine {
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
  line-height: 1.45;
}

.contact-form__fine a {
  color: #d4b5f0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-form__fine.is-success {
  color: #8fd6b0;
}

/* ===== Footer ===== */
.footer {
  background: #12081f;
  color: var(--text-on-dark-muted);
  padding: 1rem 0 1.15rem;
  margin-top: 0;
  width: 100%;
  flex-shrink: 0;
  border-top: 1px solid rgba(248, 245, 252, 0.06);
}

.cta .footer {
  /* Footer vive dentro del snap de contacto */
  scroll-snap-align: none;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.logo--footer {
  color: var(--text-on-dark);
}

.cta .logo__img--footer {
  height: 48px;
  max-width: 220px;
}

.footer__copy,
.footer__legal {
  font-size: 0.84rem;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-on-dark);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer__social img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.footer__social:hover {
  color: #e0b8f5;
  opacity: 0.9;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .benefits__layout {
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.25fr);
    gap: 1.15rem;
  }

  .benefit-card {
    padding: 0.7rem 0.75rem 0.75rem;
  }

  .benefit-card__text {
    font-size: 0.8rem;
    line-height: 1.35;
  }
}

@media (max-width: 900px) {
  .steps,
  .deliverables__layout,
  .benefits__layout,
  .cta__card {
    grid-template-columns: 1fr;
  }

  .benefits__media {
    width: 100%;
    justify-self: stretch;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 10;
  }

  .benefits__grid {
    max-height: none;
    overflow: visible;
  }

  .cta__actions {
    margin-bottom: 0.5rem;
  }

  .cta__media {
    height: auto;
    min-height: clamp(24rem, 62vh, 36rem);
    aspect-ratio: auto;
  }
}

@media (max-width: 768px) {
  html,
  body {
    scroll-behavior: auto;
    scroll-snap-type: none !important;
    overflow-y: auto;
    touch-action: pan-y;
  }

  main > section {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
  }

  body {
    zoom: 0.72;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(74, 26, 107, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.25s ease;
  }

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

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav__link {
    padding: 0.85rem 0.75rem;
  }

  .nav__cta {
    margin-top: 0.35rem;
    width: 100%;
  }

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

  .demo__frame {
    aspect-ratio: 16 / 10;
    min-height: 300px;
    max-height: none;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo__img {
    height: 64px;
  }

  .logo__img--footer {
    height: 52px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .demo__frame {
    min-height: 320px;
  }
}

@media (max-width: 575.98px) {
  .demo__frame {
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-height: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
