/* ─────────────────────────────────────────────────────────
   Closed for now — landing de una sola sección
   ───────────────────────────────────────────────────────── */

:root {
  /* Base de la página: neutra fría, sin amarillo. El color lo pone el mesh. */
  --base: #FAF7FE;
  /* Relleno de inputs y píldoras: cálido pero rosado, no amarillo */
  --cream: #FFF6F2;
  --ink: #191325;

  /* Saturados: solo para acentos de UI (texto, sombras, píldora, cintas) */
  --pink: #FF5C8A;
  --violet: #8B5CF6;
  --sky: #5CC8FF;
  --butter: #FFD23F;
  --lime: #B8F04A;

  /* Pasteles: los del mesh de fondo. Van a opacidad plena — el efecto
     suave viene del color en sí, no de la transparencia. */
  --p-pink: #FFD1E0;
  --p-violet: #DCD2FF;
  --p-sky: #C8EBFF;
  --p-butter: #FFF1C6;
  --p-lime: #E7F8C6;

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow: 9px 9px 0 var(--ink);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--base);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.live {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ── Fondo ─────────────────────────────────────────────── */

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

/* Grilla de puntitos que se desplaza */
.dots {
  position: absolute;
  inset: -40px;
  background-image: radial-gradient(rgba(25, 19, 37, 0.16) 1.6px, transparent 1.6px);
  background-size: 26px 26px;
  animation: pan 14s linear infinite;
}

@keyframes pan { to { background-position: 26px 26px; } }

/* Mesh gradient: blobs muy difuminados que se funden entre sí.
   El blur generoso es lo que convierte círculos sueltos en una malla. */
.mesh {
  position: absolute;
  inset: -20%;
  /* Base opaca: no queda ni un hueco claro debajo */
  background: linear-gradient(125deg, var(--p-pink) 0%, var(--p-violet) 48%, var(--p-sky) 100%);
  isolation: isolate;
}

.blob {
  position: absolute;
  border-radius: 50%;
  /* Colores plenos, sin transparencia. Donde se pisan generan un color
     nuevo en vez de taparse: eso es el "choque". Con pasteles, multiply
     mezcla sin ensuciar — al ser claros, el cruce da otro pastel. */
  mix-blend-mode: multiply;
  filter: blur(clamp(60px, 7vw, 100px));
  will-change: transform;
  /* parallax suave con el mouse, lo setea el JS */
  translate: calc(var(--mx, 0) * var(--p, 20px)) calc(var(--my, 0) * var(--p, 20px));
}

.blob--1 { width: 52vmax; height: 48vmax; left: -14vmax;  top: -10vmax;   background: var(--p-pink);   --p: 26px;  animation: drift1 15s ease-in-out infinite; }
.blob--2 { width: 48vmax; height: 50vmax; right: -12vmax; top: -12vmax;   background: var(--p-sky);    --p: -34px; animation: drift2 19s ease-in-out infinite; }
.blob--3 { width: 46vmax; height: 44vmax; left: 12vmax;   bottom: -16vmax; background: var(--p-violet); --p: 18px;  animation: drift3 17s ease-in-out infinite; }
.blob--4 { width: 42vmax; height: 44vmax; right: 2vmax;   bottom: -14vmax; background: var(--p-lime);   --p: -22px; animation: drift4 21s ease-in-out infinite; }
.blob--5 { width: 44vmax; height: 40vmax; right: 14vmax;  top: 16vmax;    background: var(--p-butter); --p: 30px;  animation: drift2 24s ease-in-out infinite reverse; }
.blob--6 { width: 40vmax; height: 42vmax; left: 24vmax;   top: 8vmax;     background: var(--p-sky);    --p: -16px; animation: drift1 27s ease-in-out infinite reverse; }

/* Recorridos amplios y de períodos distintos, para que los blobs se
   crucen en combinaciones siempre nuevas en vez de repetir el mismo ciclo. */
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(26vmax, 10vmax) scale(1.25); }
  50%      { transform: translate(14vmax, 30vmax) scale(0.85); }
  75%      { transform: translate(-8vmax, 16vmax) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1.1); }
  25%      { transform: translate(-24vmax, 14vmax) scale(0.9); }
  50%      { transform: translate(-10vmax, 32vmax) scale(1.3); }
  75%      { transform: translate(10vmax, 12vmax) scale(0.95); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(0.95); }
  25%      { transform: translate(18vmax, -18vmax) scale(1.28); }
  50%      { transform: translate(34vmax, -6vmax) scale(0.88); }
  75%      { transform: translate(8vmax, -26vmax) scale(1.1); }
}
@keyframes drift4 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  25%      { transform: translate(-20vmax, -22vmax) scale(0.9); }
  50%      { transform: translate(-34vmax, -8vmax) scale(1.22); }
  75%      { transform: translate(-12vmax, -28vmax) scale(0.95); }
}

/* Grano */
.noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Cintas / marquee ──────────────────────────────────── */

.ribbon {
  position: fixed;
  left: -8vw;
  width: 116vw;
  z-index: 3;
  background: var(--ink);
  color: var(--cream);
  padding: 9px 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.ribbon--top    { top: 26px;    transform: rotate(-2.4deg); }
.ribbon--bottom { bottom: 26px; transform: rotate(1.8deg); background: var(--pink); color: var(--ink); }

.ribbon__track { display: inline-flex; animation: slide 22s linear infinite; }
.ribbon__track--rev { animation-direction: reverse; }

.ribbon__track span {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.12em;
  padding-right: 10px;
}

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }
}

/* ── Rastro del cursor ─────────────────────────────────── */

.trail {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}

.trail span {
  position: absolute;
  font-size: 24px;
  line-height: 1;
  will-change: transform, opacity;
  user-select: none;
}

/* ── Escenario / tarjeta ───────────────────────────────── */

.stage {
  position: relative;
  z-index: 5;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 134px 20px 118px;
  perspective: 1200px;
}

.card {
  position: relative;
  width: min(660px, 100%);
  background: #fffdf9;
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 46px);
  transform-style: preserve-3d;
  rotate: -1.1deg;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: pop 0.85s var(--spring) both;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(38px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* Cintas adhesivas */
.tape {
  position: absolute;
  top: -16px;
  width: 108px; height: 30px;
  background: rgba(255, 210, 63, 0.82);
  border: 2px solid rgba(25, 19, 37, 0.25);
  box-shadow: 0 2px 0 rgba(25, 19, 37, 0.08);
}
.tape--l { left: 26px;  transform: rotate(-7deg); }
.tape--r { right: 26px; transform: rotate(6deg); background: rgba(92, 200, 255, 0.8); }

/* ── Estado ────────────────────────────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 7px 15px 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.status b { font-weight: 700; }

.status__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255, 92, 138, 0.7);
  animation: pulse 1.9s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 92, 138, 0.65); }
  70%  { box-shadow: 0 0 0 11px rgba(255, 92, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 92, 138, 0); }
}

/* ── Titular ───────────────────────────────────────────── */

.headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(33px, 6.2vw, 55px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.headline .w {
  display: inline-block;
  animation: word 0.7s var(--spring) both;
  animation-delay: var(--d, 0s);
  transition: transform 0.3s var(--spring), color 0.3s var(--ease);
  cursor: default;
}

.headline .w:hover { transform: translateY(-6px) rotate(-4deg); color: var(--violet); }

@keyframes word {
  from { opacity: 0; transform: translateY(26px) rotate(6deg); }
  to   { opacity: 1; transform: none; }
}

/* Palabra subrayada */
.w--hi { position: relative; color: var(--pink); padding-right: 2px; }
.w--hi:hover { color: var(--pink); }

.squiggle {
  position: absolute;
  left: 0; bottom: -14px;
  width: 100%; height: 16px;
  color: var(--violet);
  overflow: visible;
}
.squiggle path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw 1.1s var(--ease) 0.85s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.blurb {
  font-size: clamp(15.5px, 1.6vw, 17.5px);
  line-height: 1.62;
  margin: 22px 0 30px;
  max-width: 52ch;
  color: rgba(25, 19, 37, 0.78);
}

/* ── Formulario ────────────────────────────────────────── */

.form { display: grid; gap: 14px; }

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

.field { position: relative; }

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 21px 15px 10px;
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease), background 0.28s var(--ease);
}

.field textarea { resize: vertical; min-height: 116px; line-height: 1.55; }

.field label {
  position: absolute;
  left: 16px;
  top: 15px;
  font-size: 15px;
  color: rgba(25, 19, 37, 0.55);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.25s var(--spring), color 0.25s var(--ease);
}

/* Label flotante */
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-9px) scale(0.72);
  color: var(--violet);
  font-weight: 700;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  transform: translate(-3px, -3px) rotate(-0.5deg);
  box-shadow: 5px 5px 0 var(--violet);
}

.field.is-bad input,
.field.is-bad textarea { border-color: var(--pink); box-shadow: 4px 4px 0 var(--pink); }

/* Honeypot: fuera de pantalla en vez de display:none, porque algunos
   bots ignoran los campos ocultos con display/visibility. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.error {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #C81E56;
}
.error a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Botón */
.btn {
  position: relative;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--cream);
  background: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 16px 22px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--pink);
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease), background 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--pink); background: #241c36; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--pink); }

.btn__emoji {
  display: inline-block;
  transition: transform 0.35s var(--spring);
}
.btn:hover .btn__emoji { transform: translateX(5px) rotate(14deg) scale(1.15); }

.btn.is-busy { pointer-events: none; opacity: 0.75; }

.btn--ghost {
  color: var(--ink);
  background: transparent;
  box-shadow: 5px 5px 0 var(--violet);
  font-size: 17px;
}
.btn--ghost:hover { background: rgba(139, 92, 246, 0.12); box-shadow: 8px 8px 0 var(--violet); }

.alt {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(25, 19, 37, 0.65);
}
.alt a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2.5px;
  text-underline-offset: 3px;
}
.alt a:hover { color: var(--violet); text-decoration-color: var(--violet); }

/* ── Estado "gracias" ──────────────────────────────────── */

.card__face--done { text-align: center; padding: 14px 0 6px; }

.done__emoji {
  font-size: 62px;
  line-height: 1;
  animation: bounce 1.1s var(--spring) infinite alternate;
}
@keyframes bounce {
  from { transform: translateY(0) rotate(-8deg); }
  to   { transform: translateY(-14px) rotate(8deg); }
}

.done__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 48px);
  letter-spacing: -0.03em;
  margin: 16px 0 10px;
}

.done__text {
  margin: 0 auto 26px;
  max-width: 40ch;
  color: rgba(25, 19, 37, 0.78);
}

.foot {
  position: relative;
  z-index: 5;
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(25, 19, 37, 0.55);
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .row { grid-template-columns: 1fr; }
  .card { rotate: -0.6deg; box-shadow: 6px 6px 0 var(--ink); border-radius: 24px; }
  .tape { width: 84px; height: 26px; }
  .stage { padding: 96px 16px 90px; }
  .ribbon--top { top: 16px; }
  .ribbon--bottom { bottom: 16px; }
}

/* ── Menos movimiento ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .squiggle path { stroke-dashoffset: 0; }
  .trail { display: none; }
}
