@font-face { font-family: "Papa Sans"; src: url("../fonts/PapaSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Papa Sans"; src: url("../fonts/PapaSans-Heavy.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #3a3a4a;
  --ink-strong: #2a2850;
  --white: #fff;
  --error-bg: #fff1f4;
  --error: #b0123f;
  --radius: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Papa Sans", Arial, Helvetica, sans-serif;
  color: var(--white);
  background-color: #2b2d5c;
  background-image:
    linear-gradient(to bottom,
      rgba(60, 184, 202, .55) 0%, rgba(60, 184, 202, 0) 38%,
      rgba(233, 96, 150, .12) 55%, rgba(70, 60, 125, .45) 78%, rgba(38, 44, 92, .95) 100%),
    url("../img/bg.webp");
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) 16px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo { display: block; margin-bottom: clamp(28px, 7vh, 72px); }
.logo img { width: clamp(110px, 9vw, 150px); height: auto; display: block; }

.lead {
  font-size: clamp(18px, 1.6vw, 30px);
  line-height: 1.25;
  margin: 0 0 clamp(24px, 5vh, 64px);
  text-shadow: 0 1px 12px rgba(30, 30, 70, .25);
}
.lead strong { font-weight: 900; }
.lead.small { margin: clamp(20px, 3vh, 36px) 0 clamp(24px, 6vh, 64px); }
.lead.big { font-size: clamp(26px, 2.4vw, 42px); margin-bottom: 16px; }
.lead.warn { background: rgba(255,255,255,.15); padding: 12px 18px; border-radius: 16px; }

/* ---------- Screen 1: datos ---------- */
.datos { width: 100%; max-width: 600px; display: flex; flex-direction: column; align-items: center; }
.field {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.field label {
  font-weight: 900;
  font-size: clamp(20px, 1.9vw, 36px);
  text-align: right;
  min-width: 6.2ch;
  letter-spacing: .5px;
}
input[type="text"], input[type="email"], .field input {
  width: 100%;
  height: clamp(48px, 3.3vw, 62px);
  border: 0;
  border-radius: var(--radius);
  padding: 0 24px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}
input:focus-visible { box-shadow: 0 0 0 4px rgba(255,255,255,.45), 0 0 0 6px var(--ink-strong); }
input[aria-invalid="true"] { box-shadow: 0 0 0 3px var(--error); }

.error {
  margin: -6px 0 14px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 15px;
  align-self: flex-end;
}
.datos .btn { margin-top: clamp(28px, 9vh, 110px); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  min-width: 170px;
  padding: 10px 26px 8px;
  border: 3px solid var(--white);
  border-radius: 22px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-weight: 900;
  font-size: clamp(20px, 1.7vw, 32px);
  letter-spacing: .5px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--white); color: var(--ink-strong); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 4px; }
.btn-lg { font-size: clamp(22px, 2vw, 38px); padding: 12px 30px 10px; }

/* ---------- Screen 2: excusas ---------- */
.excusas { width: 100%; display: flex; flex-direction: column; align-items: center; }
fieldset { border: 0; margin: 0; padding: 0; width: 100%; }
.pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.1vw, 18px) clamp(12px, 1.3vw, 22px);
  max-width: 880px;
  margin: 0 auto;
}
.pill { position: relative; display: block; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(52px, 3.4vw, 64px);
  padding: 6px 22px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: clamp(16px, 1.15vw, 21px);
  line-height: 1.1;
  transition: background .15s, color .15s, transform .1s;
}
.pill:hover span { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(30, 30, 70, .2); }
.pill input:checked + span { background: var(--ink-strong); color: var(--white); font-weight: 900; }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--ink-strong); }

/* ---------- Screen 3: listo ---------- */
.coupon {
  margin-top: 36px;
  padding: 20px 28px 24px;
  border: 2px dashed rgba(255,255,255,.8);
  border-radius: 24px;
  background: rgba(40, 40, 90, .25);
}
.coupon p { margin: 0; font-size: 20px; }
.coupon .code { font-weight: 900; font-size: clamp(30px, 3vw, 46px); letter-spacing: 4px; margin: 6px 0 14px; }
.again { margin-top: 28px; }
.again a, .footer a { color: var(--white); }

/* ---------- Terms ---------- */
body.doc .page { max-width: 760px; text-align: left; align-items: stretch; }
body.doc .logo { align-self: center; }
.terms { background: rgba(255,255,255,.95); color: var(--ink); border-radius: 24px; padding: 28px clamp(20px, 4vw, 44px); }
.terms h1 { font-weight: 900; margin-top: 0; color: var(--ink-strong); }
.terms h2 { font-weight: 900; font-size: 18px; color: var(--ink-strong); margin: 22px 0 6px; }
.terms p { line-height: 1.55; }
.terms .note { font-size: 14px; color: #8a6d00; background: #fff6d6; padding: 8px 12px; border-radius: 10px; }
.terms .btn { color: var(--ink-strong); border-color: var(--ink-strong); font-size: 18px; }
.terms .btn:hover { background: var(--ink-strong); color: var(--white); }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  padding: 18px 16px 22px;
  opacity: .75;
}
.footer p { margin: 2px 0; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body { background-position: 62% center; background-attachment: scroll; }
  .lead br.desk { display: none; }
  .field { grid-template-columns: 1fr; gap: 6px; }
  .field label { text-align: left; padding-left: 20px; font-size: 18px; }
  .error { align-self: stretch; text-align: left; }
  .pills { grid-template-columns: 1fr; }
  .datos .btn { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
