:root {
  --blue-900: #0b2e59;
  --blue-800: #123e72;
  --blue-700: #1e4e8c;
  --blue-600: #2a5fa5;
  --blue-100: #e8eef7;
  --blue-050: #f3f7fc;
  --ink: #1c2430;
  --muted: #5a6678;
  --line: #cbd5e3;
  --line-soft: #e1e8f2;
  --bg: #f4f6fa;
  --white: #ffffff;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --success: #0f6b3e;
  --success-soft: #eaf6ef;
  --warning: #7a5300;
  --warning-soft: #fff7e6;
  --radius: 16px;
  --shadow: 0 24px 60px -32px rgba(11, 46, 89, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--blue-700);
}

a:hover {
  color: var(--blue-800);
}

:focus-visible {
  outline: 3px solid rgba(30, 78, 140, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--white);
  color: var(--blue-900);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(11, 46, 89, 0.2);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Encabezado */

.site-header {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  border-bottom: 4px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.45);
}

.brand-logo {
  display: block;
  width: auto;
  height: 68px;
}

.header-note {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

/* Contenido */

.page {
  padding-top: 42px;
  padding-bottom: 56px;
}

.card {
  max-width: 800px;
  margin: 0 auto;
  padding: 38px 40px 32px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--blue-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-600);
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--blue-900);
}

.lead {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

/* Formulario */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-800);
}

.req {
  color: var(--blue-600);
  font-weight: 700;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: #8b96a8;
}

.input:hover:not(:disabled) {
  border-color: #a9b8ce;
}

.input:focus {
  outline: none;
  border-color: var(--blue-700);
  box-shadow: 0 0 0 4px rgba(30, 78, 140, 0.14);
}

.input:disabled {
  background: #f7f9fc;
  color: var(--muted);
  cursor: not-allowed;
}

select.input {
  padding-right: 38px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235A6678' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  cursor: pointer;
}

select.input:disabled {
  cursor: not-allowed;
}

.hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.hint--warning {
  padding: 8px 10px;
  border: 1px solid #f2d9a6;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
}

.field-error {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.field.has-error .input {
  border-color: var(--danger);
}

.field.has-error .input:focus {
  box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.12);
}

.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Política */

.policy {
  margin-top: 24px;
  border: 1px solid #dce6f4;
  border-radius: 12px;
  overflow: hidden;
  background: #f7fafe;
}

.policy.has-error {
  border-color: #e7b4ae;
}

.policy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #dce6f4;
  background: #f2f7fd;
}

.policy-head h2 {
  margin: 0;
  font-size: 14.5px;
  color: var(--blue-900);
}

.pill {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid #d2e0f2;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.policy-box {
  max-height: 320px;
  overflow: auto;
  padding: 14px 18px;
  color: #33415a;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-color: #b9c9de transparent;
}

.policy-box p {
  margin: 0 0 10px;
}

.policy-box p:last-child {
  margin-bottom: 0;
}

.policy-box::-webkit-scrollbar {
  width: 10px;
}

.policy-box::-webkit-scrollbar-thumb {
  border: 3px solid #f7fafe;
  border-radius: 999px;
  background: #c3d2e5;
}

.policy-more a {
  font-weight: 600;
  text-underline-offset: 3px;
}

.policy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #dce6f4;
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  cursor: pointer;
}

.policy-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--blue-700);
  cursor: pointer;
}

.policy.has-error .policy-check {
  background: #fff8f7;
}

.policy > .field-error {
  padding: 0 18px 12px;
  background: var(--white);
}

/* Botones */

.btn {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--blue-700);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(11, 46, 89, 0.7);
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: var(--blue-800);
  color: var(--white);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  width: auto;
  margin-top: 18px;
  border-color: #c9d8ea;
  background: var(--white);
  color: var(--blue-700);
  box-shadow: none;
}

.btn--ghost:hover:not(:disabled) {
  background: #f2f7fd;
  color: var(--blue-800);
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-foot {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Avisos */

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
}

.alert--error {
  border: 1px solid #f3c4be;
  background: var(--danger-soft);
  color: #8c1d18;
}

.alert--warning {
  border: 1px solid #f2d9a6;
  background: var(--warning-soft);
  color: var(--warning);
}

.link-btn {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Éxito */

.success {
  padding: 14px 6px 6px;
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 30px;
  font-weight: 700;
}

.success h2 {
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--blue-900);
}

.success p {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.success-ref {
  margin-top: 18px !important;
  color: #33415a !important;
}

.success-ref strong {
  display: inline-block;
  margin-left: 6px;
  padding: 5px 10px;
  border: 1px dashed #c9d8ea;
  border-radius: 8px;
  background: #f2f7fd;
  color: var(--blue-800);
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.04em;
}

/* Artículo de política */

.article {
  max-width: 820px;
}

.article h1 {
  font-size: 28px;
}

.meta-line {
  margin: -2px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.article h2 {
  margin: 30px 0 10px;
  color: var(--blue-900);
  font-size: 18px;
  line-height: 1.3;
}

.article p,
.article li {
  color: #33415a;
  font-size: 15px;
  line-height: 1.7;
}

.article p {
  margin: 0 0 14px;
}

.article ul {
  margin: 10px 0 16px;
  padding-left: 22px;
}

.article li {
  margin-bottom: 6px;
}

.article a {
  text-underline-offset: 3px;
}

.article-actions {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid #e6edf6;
}

/* Pie */

.legal {
  max-width: 800px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

/* Responsive */

@media (max-width: 680px) {
  .shell {
    padding: 0 16px;
  }

  .header-note {
    display: none;
  }

  .header-inner {
    min-height: 88px;
  }

  .brand {
    padding: 6px 8px;
    border-radius: 10px;
  }

  .brand-logo {
    height: 56px;
  }

  .page {
    padding-top: 26px;
    padding-bottom: 40px;
  }

  .card {
    padding: 26px 20px 24px;
    border-radius: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  h1 {
    font-size: 25px;
  }

  .article h1 {
    font-size: 24px;
  }

  .policy-head {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .spinner {
    animation-duration: 2.4s;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .legal,
  .article-actions {
    display: none !important;
  }

  .card {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
