:root {
  --ink: #0d315f;
  --ink-soft: #4d6484;
  --navy: #0c4c9c;
  --navy-deep: #082f66;
  --paper: #f4f7fb;
  --card: #ffffff;
  --line: #d7e3f2;
  --gold: #ffffff;
  --coral: #d21f3c;
  --coral-deep: #b01630;
  --alert: #9d1830;
  --alert-bg: #fdecef;
  --ok: #0c4c9c;
  --ok-bg: #e7f1fb;
}

* {
  box-sizing: border-box;
}

html {
  background: #e7eef8;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(12, 76, 156, 0.16), transparent 28%),
    radial-gradient(circle at 92% 92%, rgba(210, 31, 60, 0.12), transparent 24%),
    #e7eef8;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

.decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob,
.star,
.ring {
  position: absolute;
}

.blob {
  border-radius: 50%;
  filter: blur(2px);
}

.blob-a {
  width: 140px;
  height: 140px;
  top: -40px;
  left: -50px;
  background: rgba(12, 76, 156, 0.22);
}

.blob-b {
  width: 180px;
  height: 180px;
  right: -70px;
  bottom: 40px;
  background: rgba(210, 31, 60, 0.16);
}

.star {
  width: 14px;
  height: 14px;
  background: #ffffff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.star-1 { top: 18%; left: 8%; opacity: 0.8; }
.star-2 { top: 72%; right: 7%; width: 10px; height: 10px; }
.star-3 { bottom: 12%; left: 14%; width: 8px; height: 8px; background: #d21f3c; }

.ring-1 {
  width: 90px;
  height: 90px;
  right: -20px;
  top: 34%;
  border: 2px solid rgba(12, 76, 156, 0.16);
  border-radius: 50%;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(12, 76, 156, 0.06);
}

.site-header {
  position: relative;
  overflow: hidden;
  padding: calc(28px + env(safe-area-inset-top)) 22px 52px;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(165deg, #1a6fd4 0%, var(--navy) 52%, var(--navy-deep) 100%);
  color: #ffffff;
  text-align: center;
}

.header-art,
.seal,
.wave,
.spark,
.orbit {
  pointer-events: none;
}

.header-art {
  position: absolute;
  inset: 0;
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.spark-a { top: 22px; left: 28px; }
.spark-b { top: 48px; right: 36px; width: 12px; height: 12px; opacity: 0.8; }
.spark-c { bottom: 58px; left: 46px; width: 6px; height: 6px; background: #d21f3c; }

.orbit {
  position: absolute;
  width: 150px;
  height: 150px;
  top: -46px;
  right: -48px;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.brand-bar {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 6px 10px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.brand-bar img.logo-gobierno {
  display: block;
  width: auto;
  max-width: 100%;
  height: 58px;
  margin: 0;
}

.header-inner {
  position: relative;
}

.kicker {
  margin: 0 0 8px;
  color: #ffd5dc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0 auto;
  max-width: 12em;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.lede {
  margin: 10px auto 0;
  max-width: 18em;
  color: #d7e6f8;
  font-size: 1rem;
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 42px;
  display: block;
}

main {
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
}

.card {
  position: relative;
  margin-top: -18px;
  padding: 22px 16px 18px;
  border: 1px solid rgba(215, 227, 242, 0.95);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, rgba(210, 31, 60, 0.08), transparent 34%),
    var(--card);
  box-shadow: 0 16px 40px rgba(12, 76, 156, 0.1);
}

.field {
  margin-bottom: 18px;
}

label,
.label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.step {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fdecef;
  color: var(--coral);
  font-size: 0.82rem;
}

.input-wrap {
  position: relative;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--navy);
  pointer-events: none;
}

input[type="text"] {
  width: 100%;
  min-height: 56px;
  border: 1.5px solid #d5e2f2;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 14px 16px 14px 46px;
}

input[type="text"]:focus {
  outline: 3px solid rgba(12, 76, 156, 0.22);
  border-color: var(--navy);
}

.help,
.note {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.note {
  text-align: center;
  text-wrap: balance;
}

.footer-art {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.footer-art span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy);
}

.footer-art span:nth-child(odd) {
  background: var(--coral);
  transform: rotate(45deg);
  border-radius: 1px;
}

.footer-art span:nth-child(3) {
  width: 9px;
  height: 9px;
  background: var(--navy);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  border-radius: 0;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 168px;
  padding: 20px 16px;
  border: 1.5px dashed #b9d0ea;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0, rgba(12, 76, 156, 0.08), transparent 55%),
    #f8fbfe;
  text-align: center;
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 76, 156, 0.16);
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(12, 76, 156, 0.12);
}

.dropzone-title {
  font-weight: 750;
}

.dropzone-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 18em;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dropzone-hint span {
  overflow-wrap: anywhere;
}

.dropzone img {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  max-height: 200px;
  margin-top: 10px;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(12, 76, 156, 0.16);
}

.dropzone.has-file .dropzone-icon,
.dropzone.has-file .dropzone-title {
  display: none;
}

button,
.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #2d7fe0 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(12, 76, 156, 0.28);
}

button:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.alert {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--alert-bg);
  color: var(--alert);
}

.alert-title,
.alert-label {
  margin: 0;
}

.alert-title {
  font-weight: 750;
}

.alert-label {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alert-detail {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #5c2424;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.result {
  position: relative;
  text-align: center;
  padding: 18px 8px 8px;
}

.confetti {
  position: absolute;
  inset: 0 10px auto;
  height: 70px;
}

.confetti span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.confetti span:nth-child(1) { left: 12%; background: var(--coral); transform: rotate(20deg); }
.confetti span:nth-child(2) { left: 28%; top: 18px; background: var(--coral); border-radius: 50%; }
.confetti span:nth-child(3) { right: 24%; background: #ffffff; border: 1px solid var(--navy); transform: rotate(40deg); }
.confetti span:nth-child(4) { right: 10%; top: 22px; background: var(--coral); border-radius: 50%; }
.confetti span:nth-child(5) { left: 48%; top: 4px; width: 6px; height: 6px; background: var(--navy); }

.mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 18px auto 14px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  box-shadow: inset 0 0 0 6px #fff;
}

.result h2 {
  margin: 0;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
}

.result p {
  margin: 8px 0 20px;
  color: var(--ink-soft);
}

@media (min-width: 520px) {
  body {
    padding: 24px 0;
  }

  .phone {
    min-height: auto;
    border-radius: 32px;
    overflow: hidden;
  }
}
