/**
 * Línea de diseño calcada de la landing de registro mau-lanz-2609 en Leadpages
 * (lp.borjavilaseca.com/mau-lanz-2609): mismos tokens, misma superficie morada
 * con grano, Amazon Ember autoalojada, campos blancos y CTA morado.
 * Fuentes e imágenes descargadas de esa página a fonts/ e img/ para no
 * depender de Leadpages en tiempo de carga.
 */

/* ==========================================================================
   Fuentes: Amazon Ember (Display para titulares, Text para cuerpo)
   ========================================================================== */

@font-face {
  font-family: "Amazon Ember Display";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ember-display-400.woff2") format("woff2");
}
@font-face {
  font-family: "Amazon Ember Display";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ember-display-700.woff2") format("woff2");
}
@font-face {
  font-family: "Amazon Ember Display";
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/ember-display-800.woff2") format("woff2");
}
@font-face {
  font-family: "Amazon Ember Text";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ember-text-400.woff2") format("woff2");
}
@font-face {
  font-family: "Amazon Ember Text";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ember-text-500.woff2") format("woff2");
}
@font-face {
  font-family: "Amazon Ember Text";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ember-text-600.woff2") format("woff2");
}
@font-face {
  font-family: "Amazon Ember Text";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ember-text-700.woff2") format("woff2");
}

/* ==========================================================================
   Tokens (idénticos a la landing de registro)
   ========================================================================== */

:root {
  --purple-950: #241663;
  --purple-900: #2c1c72;
  --purple-800: #34237f;
  --purple-700: #4b32a8;
  --purple-600: #5d41b9;
  --purple-500: #7b57d6;
  --purple-400: #9a78e4;
  --purple-300: #c9a6ee;
  --purple-100: #ece2fb;

  --ink: #1c1233;
  --ink-soft: #453a5e;
  --ink-muted: #6b6182;
  --surface: #ffffff;

  --color-text-on-dark: #ffffff;
  --color-text-on-dark-soft: rgba(255, 255, 255, 0.88);
  --color-cta: #5423bd;
  --color-cta-hover: #431a9e;
  --color-focus: #ffd84d;
  --color-error: #ffb4b4;

  --font-display: "Amazon Ember Display", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Amazon Ember Text", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.03rem + 0.42vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.16rem + 0.9vw, 1.875rem);
  --text-2xl: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem);
  --text-hero: clamp(2.1rem, 1.4rem + 2.9vw, 3.4rem);

  --leading-tight: 1.08;
  --leading-snug: 1.22;
  --leading-normal: 1.55;

  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-section: clamp(3.5rem, 2.2rem + 5.5vw, 7rem);
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --measure: 1360px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shadow-cta: 0 12px 26px -10px rgba(30, 12, 90, 0.8);
  --shadow-field: 0 1px 2px rgba(36, 22, 99, 0.1),
    0 10px 22px -14px rgba(36, 22, 99, 0.45);
  --shadow-field-hover: 0 2px 4px rgba(36, 22, 99, 0.12),
    0 18px 30px -16px rgba(36, 22, 99, 0.55);
  --shadow-cutout: drop-shadow(0 30px 45px rgba(28, 14, 78, 0.38));

  --duration-fast: 140ms;
  --duration-normal: 320ms;
  --duration-slow: 600ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.33, 1, 0.68, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.42'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, p { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-on-dark);
  background-color: var(--purple-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

input, button, textarea { font: inherit; color: inherit; }

h1, h2 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; }

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

[hidden] { display: none !important; }

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

/* ==========================================================================
   Stage: la superficie morada con foco de luz y grano
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  flex: 1;
  padding-block: clamp(1.1rem, 0.9rem + 1vw, 1.75rem) var(--space-section);
  background: radial-gradient(
    118% 88% at 68% 34%,
    var(--purple-300) 0%,
    var(--purple-400) 22%,
    var(--purple-500) 44%,
    var(--purple-600) 68%,
    var(--purple-700) 100%
  );
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(
    102deg,
    rgba(36, 22, 99, 0.36) 0%,
    rgba(36, 22, 99, 0.27) 34%,
    rgba(36, 22, 99, 0.1) 62%,
    rgba(36, 22, 99, 0) 82%
  );
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* --- Masthead: logo + pastilla ------------------------------------------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: clamp(1.75rem, 1rem + 3vw, 3.25rem);
}

.brand__logo {
  width: clamp(110px, 8.5vw, 142px);
  filter: drop-shadow(0 8px 16px rgba(28, 14, 78, 0.3));
  transform: rotate(-2deg);
}

.event-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  padding: 0.45rem 1rem 0.45rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(41, 24, 106, 0.42);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: var(--text-sm);
}

.event-badge__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-badge__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5b5b;
  animation: pulse 2.4s var(--ease-out-soft) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 91, 91, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 91, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 91, 91, 0); }
}

.event-badge__date { font-weight: 500; }

@media (max-width: 767px) {
  .event-badge {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .event-badge__label { font-size: 0.68rem; letter-spacing: 0.08em; }
  .event-badge__date {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--color-text-on-dark-soft);
  }
}

/* --- Mano con parches ------------------------------------------------------ */

/* Solo con hueco real a la derecha del formulario: en estrecho competiría
   con las opciones y alargaría cada paso sin aportar nada. */
.stage__visual { display: none; }

@media (min-width: 1100px) {
  .stage__visual {
    display: block;
    position: absolute;
    z-index: 0;
    bottom: 0;
    right: max(0px, calc((100vw - var(--measure)) / 2 - 6rem));
    width: clamp(380px, 40vw, 600px);
    filter: var(--shadow-cutout);
    pointer-events: none;
  }
}

/* ==========================================================================
   Wizard
   ========================================================================== */

.wizard {
  position: relative;
  z-index: 2;
  max-width: 38rem;
}

@media (min-width: 1100px) {
  .wizard { max-width: min(40rem, 50vw); }
}

/* Cada paso entra con un fundido corto: marca el avance sin distraer. */
.step {
  animation: step-in var(--duration-slow) var(--ease-out-expo) both;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.step--center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* --- Progreso --------------------------------------------------------------- */

.progress { margin-bottom: clamp(1.25rem, 1rem + 1vw, 1.75rem); }

.progress__label {
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.progress__track {
  height: 5px;
  max-width: 20rem;
  border-radius: var(--radius-pill);
  background: rgba(36, 22, 99, 0.35);
  overflow: hidden;
}

.progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

/* --- Tipografía de los pasos ---------------------------------------------- */

.hero__title {
  font-size: var(--text-hero);
  font-weight: 400;
  margin-bottom: clamp(0.9rem, 0.6rem + 1vw, 1.4rem);
  text-shadow: 0 2px 20px rgba(30, 14, 82, 0.18);
}

.hero__title strong { font-weight: 800; }

.hero__lede {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  margin-bottom: clamp(1rem, 0.8rem + 0.8vw, 1.4rem);
}

.step__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem);
  text-shadow: 0 2px 20px rgba(30, 14, 82, 0.18);
}

.step__title--xl { font-size: var(--text-hero); }

.eyebrow {
  display: inline-flex;
  margin-bottom: var(--space-sm);
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(41, 24, 106, 0.4);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--color-text-on-dark-soft);
  margin-bottom: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  max-width: 36rem;
}

.step__title + .lead { margin-top: calc(clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem) * -0.5); }

/* --- Campos --------------------------------------------------------------- */

.fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 0.75rem;
  margin-bottom: 1.25rem;
}

.field { display: block; flex: 1 1 13rem; }
.field--wide { flex-basis: 100%; }

.field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-on-dark-soft);
}

.field__input {
  display: block;
  width: 100%;
  padding: 1.05rem 1.2rem;
  border: 1.5px solid rgba(28, 18, 51, 0.1);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-field);
  transition: border-color var(--duration-fast) var(--ease-out-soft),
    box-shadow var(--duration-fast) var(--ease-out-soft);
}

.field__input::placeholder { color: var(--ink-muted); font-weight: 400; }

.field__input:hover { border-color: rgba(84, 35, 189, 0.35); }

.field__input:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: var(--shadow-field), 0 0 0 4px rgba(255, 216, 77, 0.4);
}

textarea.field__input { resize: vertical; min-height: 6.5rem; line-height: 1.5; }

/* --- Selector de país del teléfono (intl-tel-input) ---------------------- */

.iti {
  --iti-hover-color: var(--purple-100);
  --iti-border-color: rgba(28, 18, 51, 0.1);
  --iti-icon-color: var(--ink-muted);
  display: block;
  width: 100%;
  color: var(--ink);
}

.iti__selected-country { border-radius: var(--radius-md) 0 0 var(--radius-md); }

.iti__selected-country-primary { padding-inline: 1.2rem 0.4rem; }

.iti__selected-dial-code {
  color: var(--ink);
  font-weight: 600;
}

.iti__dropdown-content {
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 48px -16px rgba(20, 10, 60, 0.55);
  overflow: hidden;
}

.iti__search-input {
  padding-block: 0.85rem;
  border: 0;
  border-bottom: 1px solid rgba(28, 18, 51, 0.1);
  color: var(--ink);
}

.iti__search-input:focus { outline: none; }

.iti__country { padding: 0.6rem 1rem; font-size: var(--text-sm); }

.iti__dial-code { color: var(--ink-muted); }

.error {
  margin: -0.25rem 0 1rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-error);
}

/* --- Opciones de respuesta ------------------------------------------------ */

.options {
  display: grid;
  gap: 0.7rem;
  margin-bottom: clamp(1.4rem, 1.1rem + 1vw, 2rem);
}

@media (min-width: 560px) {
  .options--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-field);
  transition: transform var(--duration-fast) var(--ease-out-soft),
    box-shadow var(--duration-fast) var(--ease-out-soft),
    border-color var(--duration-fast) var(--ease-out-soft),
    background-color var(--duration-fast) var(--ease-out-soft);
}

/* Indicador tipo radio: se rellena con el morado del CTA al elegir. */
.option::before {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid rgba(84, 35, 189, 0.35);
  background: var(--surface);
  transition: border-color var(--duration-fast) var(--ease-out-soft),
    box-shadow var(--duration-fast) var(--ease-out-soft);
}

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

.option:active { transform: translateY(0) scale(0.995); }

.option.selected {
  border-color: var(--color-cta);
  background: var(--purple-100);
}

.option.selected::before {
  border-color: var(--color-cta);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 10px var(--color-cta);
}

/* --- Botones -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.2rem 2.15rem;
  border: 0;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out-soft),
    transform var(--duration-fast) var(--ease-out-soft),
    box-shadow var(--duration-fast) var(--ease-out-soft),
    border-color var(--duration-fast) var(--ease-out-soft);
}

.btn-primary {
  min-width: min(100%, 19rem);
  background: var(--color-cta);
  color: #fff;
  box-shadow: var(--shadow-cta), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--color-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(30, 12, 90, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn:active { transform: translateY(0) scale(0.99); }

.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }

.btn-secondary {
  padding-inline: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(41, 24, 106, 0.34);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(41, 24, 106, 0.62);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

@media (max-width: 559px) {
  .btn-primary { width: 100%; }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 559px) {
  .actions .btn { flex: 1 1 100%; }
}

#calendly-cta .btn { font-size: var(--text-lg); padding: 1.35rem 2.6rem; }

/* --- Notas ---------------------------------------------------------------- */

.legal-note {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  max-width: 34rem;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.legal-note a { text-underline-offset: 2px; }
.legal-note a:hover { color: #fff; }

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-lg);
  background: var(--purple-950);
  color: rgba(255, 255, 255, 0.74);
  font-size: var(--text-xs);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.site-footer__logo {
  width: 108px;
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
