/* ===== Tokens ===== */
:root {
  --bg: #191029;
  --surface: #241338;
  --surface-2: #2A1C47;
  --text: #F7F2EA;
  --muted: #B7A9D6;
  --orange: #FFB35C;
  --pink: #FF7BAC;
  --border: rgba(247, 242, 234, .12);
  --error: #FF9AA8;          /* claro para cumplir contraste AA sobre fondo oscuro */
  --ok: #8FE3B0;
  --grad: linear-gradient(135deg, var(--orange), var(--pink));
  --radius: 14px;
  --radius-lg: 24px;
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; /* altura del header fijo */ }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-text-size-adjust: 100%;
  background-image: radial-gradient(60rem 30rem at 50% -10%, rgba(255,123,172,.16), transparent 60%);
  background-repeat: no-repeat;
}
h1, h2 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
p { margin: 0 0 1em; }
a { color: var(--orange); }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
.container.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Foco visible global */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: 8px; top: -60px; background: var(--orange); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { top: 8px; }

/* ===== Header ===== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; background: rgba(25,16,41,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 1.35rem var(--font-head); }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #191029; font: 700 1rem var(--font-body);
  padding: 14px 26px; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,123,172,.35);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,123,172,.5); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-small { padding: 9px 18px; font-size: .9rem; }
.btn-block { width: 100%; margin-top: 8px; padding-block: 16px; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }

/* ===== Hero ===== */
.hero { padding: 120px 0 56px; text-align: center; }
.hero h1 { max-width: 15em; margin-inline: auto; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 36em; margin: 0 auto 1.6em; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: .875rem; font-weight: 500; margin-bottom: 1.4em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }

/* ===== Secciones y tarjetas ===== */
.section { padding: 40px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.card-small { padding: 24px 18px; }
@media (min-width: 640px) { .card { padding: 40px; } }

/* ===== Progreso ===== */
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 20px 0 6px; }
.progress-bar { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .35s ease; }
.progress-label { font-size: .85rem; color: var(--muted); margin-bottom: 24px; }

/* ===== Campos ===== */
.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.req { color: var(--pink); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 14px; font: inherit; /* 16px evita zoom en iOS */
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 140px; }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23B7A9D6' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input:hover, select:hover, textarea:hover { border-color: rgba(247,242,234,.3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,179,92,.35); }
.help { color: var(--muted); font-size: .875rem; margin: 6px 0 0; }
.counter { text-align: right; color: var(--muted); font-size: .8rem; margin: 4px 0 0; }
.error { color: var(--error); font-size: .875rem; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
.field.invalid input:not([type="checkbox"]):not([type="radio"]), .field.invalid select, .field.invalid textarea { border-color: var(--error); }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--orange); }

/* Voz: tarjetas seleccionables (el radio real es accesible, solo se oculta visualmente) */
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.voice-card { position: relative; margin: 0; cursor: pointer; }
.voice-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.voice-body { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; text-align: center; background: var(--surface-2); border: 2px solid var(--border); border-radius: var(--radius); transition: border-color .15s, background .15s, transform .15s; }
.voice-emoji { font-size: 1.8rem; }
.voice-card:hover .voice-body { border-color: rgba(247,242,234,.35); }
.voice-card input:checked + .voice-body { border-color: var(--orange); background: rgba(255,179,92,.12); box-shadow: 0 0 18px rgba(255,179,92,.25); }
.voice-card input:focus-visible + .voice-body { outline: 3px solid var(--orange); outline-offset: 3px; }

/* Honeypot fuera de pantalla (no display:none, algunos bots lo detectan) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { text-align: center; margin-bottom: 8px; }

/* Sellos de confianza */
.trust { list-style: none; display: grid; gap: 10px; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: .9rem; }
.trust li { display: flex; align-items: center; gap: 8px; justify-content: center; }
.trust svg { color: var(--orange); flex: none; }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(3, 1fr); } .trust li { justify-content: center; } }

/* ===== Éxito ===== */
.success { text-align: center; padding: 24px 0; }
.success:focus { outline: none; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--grad); color: #191029; font-size: 2.2rem; display: grid; place-items: center; font-weight: 800; }

/* ===== FAQ ===== */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--orange); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px; margin: 0 0 16px; color: var(--muted); }
.faq summary:focus-visible { outline-offset: -3px; }

/* ===== Recuperar ===== */
.resend .btn { width: 100%; }
@media (min-width: 640px) { .resend .btn { width: auto; } }
.status { margin: 12px 0 0; color: var(--ok); min-height: 1.5em; }
.status.err { color: var(--error); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.footer-inner strong { color: var(--text); font: 800 1.1rem var(--font-head); }

/* Respeta usuarios sensibles al movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
