@font-face {
  font-family: Manrope;
  src: url("assets/Manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --paper: #f6f2e9; --surface: #fffdf8; --forest: #1f4638; --ink: #202922;
  --muted: #60675f; --clay: #af492e; --sage: #dce5d7; --line: #d5d8cd; --on-accent: #fffdf8;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181818; --surface: #272727; --forest: #dce5d7; --ink: #f6f2e9;
    --muted: #b8c1b4; --clay: #ffc1a8; --sage: #334638; --line: #545b51; --on-accent: #181818;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 Manrope, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Fondo animado */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.bg i {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: drift 26s var(--ease) infinite alternate;
}
.bg i:nth-child(1) { width: 62vmax; height: 62vmax; top: -22vmax; left: -18vmax; background: var(--sage); }
.bg i:nth-child(2) { width: 50vmax; height: 50vmax; bottom: -20vmax; right: -14vmax; background: color-mix(in srgb, var(--clay) 22%, transparent); animation-duration: 32s; }
.bg i:nth-child(3) { width: 36vmax; height: 36vmax; top: 30%; left: 55%; background: color-mix(in srgb, var(--forest) 10%, transparent); animation-duration: 22s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}

/* Estructura */
.app { position: relative; z-index: 1; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.chrome {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--forest); }
.progress { display: flex; align-items: center; gap: 14px; flex: 1; max-width: 320px; justify-content: flex-end; }
.bar { flex: 1; height: 3px; border-radius: 9px; overflow: hidden; background: color-mix(in srgb, var(--forest) 14%, transparent); }
.bar i {
  display: block; height: 100%; width: 0; border-radius: 9px;
  background: linear-gradient(90deg, var(--forest), color-mix(in srgb, var(--clay) 70%, var(--forest)));
  transition: width .8s var(--ease);
}
.count-lbl { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.stage { position: relative; flex: 1; min-height: 0; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 16px 32px 24px; overflow-y: auto;
  opacity: 0; filter: blur(6px); pointer-events: none;
  transform: translate3d(calc(var(--dir, 1) * 56px), 0, 0);
  transition: opacity .55s var(--ease), transform .7s var(--ease), filter .55s var(--ease);
}
.slide.is-in { opacity: 1; filter: none; transform: none; pointer-events: auto; }
.slide.is-out { opacity: 0; filter: blur(4px); pointer-events: none; transform: translate3d(calc(var(--dir, 1) * -56px), 0, 0); }
.inner { width: min(680px, 100%); margin: auto 0; }
.shake { animation: shake .45s var(--ease); }
@keyframes shake {
  0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}

/* Tipografía */
.kicker {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  color: var(--clay); margin: 0 0 16px;
}
.q-title {
  font-size: clamp(27px, 4.6vw, 42px); line-height: 1.16; font-weight: 300;
  letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance;
}
.hero {
  font-size: clamp(38px, 6.4vw, 64px); line-height: 1.04; font-weight: 300;
  letter-spacing: -.03em; margin: 0 0 22px; text-wrap: balance;
}
.lede { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0 0 26px; max-width: 58ch; }
.w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: word .8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms + 120ms); }
@keyframes word { to { opacity: 1; transform: none; } }
.fadein { opacity: 0; animation: fade .9s var(--ease) forwards; animation-delay: .55s; }
.fadein2 { opacity: 0; animation: fade .9s var(--ease) forwards; animation-delay: .95s; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 99px;
  background: var(--sage); color: var(--forest); margin: 0 0 22px;
}
.tag.opt { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin: 20px 0 0; }

/* Campos de texto: línea inferior que se dibuja al enfocar */
.field { position: relative; margin-top: 4px; }
.field textarea, .field input[type="text"] {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  padding: 10px 2px 12px; font-size: 19px; line-height: 1.6; color: var(--ink);
  outline: none; resize: none; min-height: 140px; border-radius: 0;
}
.field input[type="text"] { min-height: 0; }
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--forest);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }
.field .count { position: absolute; right: 2px; bottom: -24px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Opciones */
.choices { display: grid; gap: 12px; }
.choice {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
  font-size: 17px; font-weight: 500; line-height: 1.35; color: var(--ink);
  transition: transform .35s var(--ease), border-color .3s, background .35s, color .35s, box-shadow .35s;
}
.choice:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--forest) 45%, var(--line)); box-shadow: 0 16px 32px -20px #20292266; }
.choice kbd {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font: 600 13px Manrope, sans-serif; background: var(--paper); border: 1px solid var(--line); color: var(--muted);
}
.choice > span:nth-child(2) { flex: 1; }
.dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: transparent; transition: all .35s var(--ease);
}
.choice.on { background: var(--forest); color: var(--on-accent); border-color: var(--forest); animation: pop .5s var(--ease); }
.choice.on kbd { background: transparent; border-color: color-mix(in srgb, var(--on-accent) 45%, transparent); color: var(--on-accent); }
.choice.on .dot { background: var(--on-accent); border-color: var(--on-accent); color: var(--forest); transform: scale(1.05); }
.choice.on .dot::after { content: "✓"; font-weight: 700; }
@keyframes pop { 0% { transform: scale(.97); } 60% { transform: scale(1.015); } 100% { transform: none; } }

/* Interruptor de consentimiento */
.toggle {
  position: relative; display: flex; align-items: center; gap: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  font-size: 17px; font-weight: 500; transition: border-color .3s;
}
.toggle:hover { border-color: color-mix(in srgb, var(--forest) 45%, var(--line)); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.track { position: relative; flex: none; width: 54px; height: 32px; border-radius: 99px; background: var(--line); transition: background .4s; }
.track i {
  position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 2px 8px #0004; transition: transform .5s var(--ease);
}
.toggle input:checked + .track { background: var(--forest); }
.toggle input:checked + .track i { transform: translateX(22px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--clay); outline-offset: 3px; }

/* Errores */
.err { min-height: 22px; margin: 16px 0 0; font-size: 14px; color: var(--clay); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: 1px solid transparent;
  border-radius: 999px; padding: 14px 26px; font-weight: 600; font-size: 15px; background: transparent;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s, opacity .3s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn[hidden] { display: none; }
.btn.primary { background: var(--forest); color: var(--on-accent); box-shadow: 0 14px 30px -16px var(--forest); }
.btn.ghost { color: var(--muted); padding-left: 6px; }
.btn.ghost:hover { color: var(--ink); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.big { padding: 17px 30px; font-size: 16px; margin-top: 4px; }

/* Pie de navegación */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 680px; margin: 0 auto; padding: 12px 32px 24px;
}
.nav[hidden] { display: none; }
.hint { font-size: 12px; color: var(--muted); }

/* Bienvenida */
.float { display: block; width: 64px; height: 64px; margin-bottom: 26px; animation: float 8s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* Revisión */
.summary { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.sum {
  width: 100%; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px;
  font-size: 15px; font-weight: 500; text-align: left; color: var(--ink);
  transition: transform .35s var(--ease), border-color .3s;
}
.sum:hover { transform: translateX(4px); border-color: var(--forest); }
.sum b { color: var(--forest); font-variant-numeric: tabular-nums; }

/* Cierre */
.done { text-align: center; margin: auto; }
.done .lede { margin-inline: auto; }
.check { width: 92px; height: 92px; margin-bottom: 26px; }
.ring { fill: none; stroke: var(--forest); stroke-width: 2; stroke-dasharray: 252; stroke-dashoffset: 252; animation: draw 1s var(--ease) forwards; }
.tick { fill: none; stroke: var(--clay); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw .6s .6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.code {
  display: inline-block; margin-top: 16px; padding: 10px 20px; border-radius: 12px;
  border: 1px dashed var(--line); background: var(--surface); color: var(--forest);
  font-size: 18px; font-weight: 700; letter-spacing: .14em;
}

/* Móvil */
@media (max-width: 600px) {
  .chrome { padding: 16px 20px; }
  .progress { max-width: 180px; }
  .count-lbl { display: none; }
  .slide { padding: 12px 20px 20px; }
  .hint { display: none; }
  .nav { padding: 10px 20px 18px; }
  .btn { padding: 13px 22px; }
  .q-title { font-size: 27px; }
  .lede { font-size: 16px; }
  .field textarea { font-size: 17px; min-height: 120px; }
}
@media (pointer: coarse) { .hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .w, .fadein, .fadein2 { opacity: 1; transform: none; }
  .bg i { animation: none; }
}
