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

:root {
  --navy:    #0f2850;
  --blue:    #1a5ccf;
  --blue-lt: #3b7de8;
  --bg:      #f0f4fb;
  --white:   #ffffff;
  --border:  #d0dcf0;
  --text:    #1a2440;
  --muted:   #6b7a99;
  --green:   #1a9c50;
  --green-bg:#e8f8ee;
  --red:     #d63838;
  --red-bg:  #fff0f0;
  --radius:  10px;
  --shadow:  0 4px 24px rgba(15,40,80,.10);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── LAYOUT ─────────────────────────────────── */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  flex: 1;
  padding: 40px 16px 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ── HEADER ─────────────────────────────────── */
.site-header {
  background: linear-gradient(160deg, #04091e 0%, #091640 45%, #0f2850 100%);
  box-shadow: 0 8px 40px rgba(0,0,0,.60);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(26,92,207,.30) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 100%, rgba(196,152,24,.12) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(26,92,207,.10) 0%, transparent 55%);
  pointer-events: none;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, #c49818 25%, #1a5ccf 65%, transparent 100%);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 68px;
  position: relative;
}

.site-logo {
  max-height: 220px;
  max-width: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 0 40px rgba(26,92,207,.45))
    drop-shadow(0 12px 32px rgba(0,0,0,.65));
}

/* ── FORM CARD ───────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 820px;
  overflow: clip;
}

.form-card-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3d75 100%);
  padding: 32px 36px 28px;
  color: var(--white);
}

.form-card-header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.form-card-header p {
  font-size: .92rem;
  color: #a8c4f0;
}

form {
  padding: 32px 36px 36px;
}

/* ── FIELDS GRID ─────────────────────────────── */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin-bottom: 28px;
}

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group.full-width { grid-column: 1 / -1; }

label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
}

.req { color: var(--red); margin-left: 2px; }
.optional { color: var(--muted); font-weight: 400; font-size: .8rem; }

input, textarea, select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--text);
  background: #fafcff;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,92,207,.12);
  background: var(--white);
}

input.invalid, textarea.invalid, select.invalid {
  border-color: var(--red);
  background: var(--red-bg);
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  resize: none;
}

select option[value=""] { color: var(--muted); }

.field-error {
  font-size: .78rem;
  color: var(--red);
  display: none;
}

.field-error.show { display: block; }

/* ── POLICY BOX ──────────────────────────────── */
.policy-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.policy-tabs {
  display: flex;
  background: #f5f8ff;
  border-bottom: 1.5px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
}

.tab-btn:hover { background: #eaf0ff; color: var(--navy); }

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: var(--white);
}

.policy-scroll {
  height: 320px;
  overflow-y: auto;
  padding: 24px 28px;
}

.policy-scroll::-webkit-scrollbar { width: 5px; }
.policy-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.policy-panel.hidden { display: none; }

.policy-main-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.policy-updated {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 16px;
  font-style: italic;
}

.policy-section { margin-bottom: 18px; }

.policy-section h3 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  background: #eef3ff;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.policy-section p {
  font-size: .83rem;
  color: #374060;
  line-height: 1.7;
}

/* ── ACCEPT CHECKBOX ─────────────────────────── */
.accept-block {
  background: #f6f9ff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
  margin-top: 1px;
}

.checkbox-wrap input[type="checkbox"]:checked ~ .checkmark {
  background: var(--green);
  border-color: var(--green);
}

.checkbox-wrap input[type="checkbox"]:checked ~ .checkmark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.accept-text {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.5;
}

.accept-block.invalid-check .checkmark {
  border-color: var(--red);
  background: var(--red-bg);
}

/* ── SUBMIT BUTTON ───────────────────────────── */
.btn-submit {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity .2s, transform .1s;
  letter-spacing: .02em;
}

.btn-submit svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-submit:hover { opacity: .9; }
.btn-submit:active { transform: scale(.995); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── FOOTER ──────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #7a99c8;
  text-align: center;
  padding: 18px;
  font-size: .8rem;
}

/* ── MODAL OVERLAY ───────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.overlay.hidden { display: none; }

.modal {
  background: var(--white);
  border-radius: 18px;
  padding: 48px 40px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: popIn .25s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--green);
}

.modal h2 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.modal p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.btn-modal-close {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 12px 36px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.btn-modal-close:hover { opacity: .85; }

/* ── ACCEPTED STATE ──────────────────────────── */
.accepted-state {
  padding: 48px 36px 52px;
  box-sizing: border-box;
}
.accepted-state.hidden { display: none; }

/* Layout de bloque — sin flex-column para evitar colapso de width en hijos */
.accepted-banner {
  text-align: center;
}

.accepted-icon-wrap {
  width: 88px;
  height: 88px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 0 10px rgba(26,156,80,.08), 0 0 0 20px rgba(26,156,80,.04);
}

.accepted-icon-wrap svg {
  width: 40px;
  height: 40px;
  stroke: var(--green);
  stroke-width: 3;
}

.accepted-banner h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 10px;
}

.accepted-sub {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 auto 28px;
  max-width: 540px;
}

.accepted-info {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  text-align: left;
  box-sizing: border-box;
}

.a-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 18px;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.a-row:last-child { border-bottom: none; }
.a-row:nth-child(odd) { background: #f6f9ff; }

.a-row span {
  flex-shrink: 0;
  width: 170px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.a-row strong {
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
  min-width: 0;
}

.accepted-congrats {
  width: 100%;
  background: linear-gradient(135deg, #0a1c4a 0%, #1a3d75 100%);
  border-radius: var(--radius);
  padding: 28px 32px 26px;
  text-align: center;
  box-sizing: border-box;
}

.accepted-congrats-icon {
  font-size: 2rem;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

.accepted-congrats h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f0d060;
  margin: 0 0 12px;
}

.accepted-congrats p {
  font-size: .87rem;
  color: #b8cff0;
  line-height: 1.75;
  margin: 0 0 10px;
}

.accepted-congrats p:last-of-type { margin-bottom: 14px; }

.accepted-congrats-firma {
  display: block;
  font-size: .82rem;
  font-style: italic;
  color: #7aa3d8;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 600px) {
  .header-inner { padding: 52px 16px 48px; }
  .site-logo { max-height: 160px; max-width: 86%; }
  .form-card-header { padding: 24px 20px 20px; }
  form { padding: 24px 20px 28px; }
  .fields-grid { grid-template-columns: 1fr; }
  .field-group.full-width { grid-column: 1; }
  .policy-scroll { padding: 18px 16px; }
  .modal { padding: 36px 24px 28px; }
  .accepted-state { padding: 36px 20px 40px; }
  .a-row { flex-direction: column; gap: 3px; }
  .a-row span { width: auto; }
}
