/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --blue-darkest: #0f2340;
  --blue-dark:    #1F3864;
  --blue-mid:     #2E5FA3;
  --blue-light:   #4a80c8;
  --blue-pale:    #D6E4F7;
  --blue-ghost:   #EAF2FB;
  --gold:         #C9A84C;
  --gold-light:   #F0D080;
  --white:        #ffffff;
  --gray-50:      #F8FAFD;
  --gray-100:     #EEF2F8;
  --gray-200:     #DDE5F0;
  --gray-400:     #8EA4C0;
  --gray-600:     #4A5E78;
  --gray-800:     #1E2D42;
  --text:         #1a2b3e;
  --text-muted:   #5a7090;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(30,60,114,0.07);
  --shadow:    0 4px 20px rgba(30,60,114,0.10);
  --shadow-lg: 0 12px 48px rgba(30,60,114,0.16);

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body:    'Montserrat', system-ui, sans-serif;
  --max-w: 820px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--blue-darkest);
  padding: 72px 32px 0;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--blue-darkest);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-bottom: 56px;
}

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--gold-light);
}

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  font-weight: 300;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.dot { opacity: 0.4; }

/* PROGRESS BAR */
.progress-bar-wrap {
  position: relative;
  z-index: 1;
  padding: 20px 32px;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 100%;
}

.progress-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--blue-light);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  min-width: 110px;
  text-align: right;
}

/* ============================================================
   WELCOME CARD
   ============================================================ */
.welcome-card {
  max-width: var(--max-w);
  margin: 36px auto 0;
  padding: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  animation: fadeUp 0.6s ease both;
}

/* franja lateral decorativa */
.welcome-card::before {
  content: '';
  width: 6px;
  flex-shrink: 0;
  background: var(--gold);
}

.welcome-inner {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 36px 36px 36px 32px;
  flex: 1;
}

.welcome-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 4px 16px rgba(30,60,114,0.18);
}

.welcome-body {
  flex: 1;
}

.welcome-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.welcome-greeting {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.welcome-message {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 10px;
}

.welcome-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  border-radius: 99px;
  margin: 20px 0;
  opacity: 0.6;
}

.welcome-signature {
  display: flex;
  align-items: center;
  gap: 14px;
}

.welcome-sig-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.welcome-sig-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
}

.welcome-sig-role {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .welcome-card { margin: 20px 16px 0; }
  .welcome-inner { flex-direction: column; gap: 18px; padding: 24px 20px; }
  .welcome-avatar { width: 60px; height: 60px; font-size: 18px; }
}

/* ============================================================
   INTRO CARD
   ============================================================ */
.intro-card {
  max-width: var(--max-w);
  margin: 32px auto;
  padding: 24px 28px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 4px solid var(--blue-mid);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.intro-icon { font-size: 28px; margin-top: 2px; flex-shrink: 0; }

.intro-card h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.intro-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   FORM SECTIONS
   ============================================================ */
.form-section {
  max-width: var(--max-w);
  margin: 0 auto 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
  background: var(--blue-dark);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}

.section-header:hover { opacity: 0.93; }

.section-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
}

.section-header p {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
}

.section-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-count {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
  padding: 3px 10px;
  border-radius: 99px;
}

.section-chevron {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: transform 0.3s;
}

.section-chevron.open { transform: rotate(180deg); }

.section-body {
  padding: 28px;
  display: none;
}

.section-body.open { display: block; }

/* QUESTION BLOCKS */
.question-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.question-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.question-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.q-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-ghost);
  color: var(--blue-mid);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.q-text {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.55;
  font-weight: 500;
}

.q-note {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 3px;
}

/* ============================================================
   FIELDS
   ============================================================ */
.fields-grid {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .fields-grid { grid-template-columns: 1fr; }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: 0.02em;
}

.req { color: #e05050; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46,95,163,0.12);
}

input.invalid,
textarea.invalid {
  border-color: #e05050;
  box-shadow: 0 0 0 3px rgba(224,80,80,0.1);
}

textarea { min-height: 80px; }

/* answer textarea inside questions */
.answer-field {
  width: 100%;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 72px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.answer-field:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46,95,163,0.12);
}

.answer-field::placeholder { color: var(--gray-400); }

/* ============================================================
   EXTRA INFO
   ============================================================ */
.extra-info-section {
  max-width: var(--max-w);
  margin: 0 auto 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.extra-info-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.extra-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-ghost);
  border: 2px solid var(--blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-mid);
  flex-shrink: 0;
}

.extra-info-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 2px;
}

.extra-info-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.extra-info-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.extra-info-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.extra-info-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.extra-info-field {
  width: 100%;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 110px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.extra-info-field:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46,95,163,0.10);
}

.extra-info-field::placeholder { color: var(--gray-400); }

@media (max-width: 600px) {
  .extra-info-section { margin: 0 16px 20px; }
  .extra-info-body { padding: 20px; }
}

/* ============================================================
   SUBMIT
   ============================================================ */
.submit-section {
  max-width: var(--max-w);
  margin: 0 auto 64px;
}

.submit-card {
  background: var(--blue-darkest);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}


.submit-card h2 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
}

.submit-card > p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
  position: relative;
}

/* COPY TOGGLE */
.copy-toggle {
  margin: 0 auto 28px;
  max-width: 420px;
  position: relative;
}

.copy-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.copy-label:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(201,168,76,0.4);
}

.copy-checkbox-wrap {
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
}

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

.copy-checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.copy-checkmark::after {
  content: '';
  width: 6px;
  height: 10px;
  border: 2px solid var(--blue-darkest);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.15s;
}

.copy-checkbox-wrap input:checked ~ .copy-checkmark {
  background: var(--gold);
  border-color: var(--gold);
}

.copy-checkbox-wrap input:checked ~ .copy-checkmark::after {
  opacity: 1;
}

.copy-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}

.copy-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.submit-row {
  display: flex;
  justify-content: center;
  position: relative;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--gold);
  color: var(--blue-darkest);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  padding: 16px 40px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 24px rgba(201,168,76,0.4);
  letter-spacing: 0.02em;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,76,0.5);
}

.btn-submit:active { transform: translateY(0); }

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-icon { font-size: 18px; }

.submit-note {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  position: relative;
}

/* ============================================================
   OVERLAYS
   ============================================================ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,35,64,0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.overlay.active { display: flex; }

.overlay-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.35s cubic-bezier(.34,1.56,.64,1) both;
}

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

.overlay-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.overlay-error .overlay-icon {
  background: #ef4444;
}

.overlay-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.overlay-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.overlay-sub {
  font-size: 13px !important;
  color: var(--gray-400) !important;
}

.btn-close {
  margin-top: 16px;
  background: var(--blue-mid);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 10px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-close:hover { background: var(--blue-dark); }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15,35,64,0.3);
  border-top-color: var(--blue-darkest);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .hero { padding: 48px 20px 0; }
  .intro-card { margin: 20px 16px; }
  .form-section { margin: 0 16px 20px; }
  .section-body { padding: 20px; }
  .submit-section { margin: 0 16px 48px; }
  .submit-card { padding: 36px 24px; }
  .btn-submit { padding: 14px 28px; font-size: 14px; }
}
