:root {
  --primary: #0A0047;
  --primary-dark: #06002B;
  --primary-mid: #2C3DA8;
  --primary-light: #2196F3;
  --bg: #F5F7FA;
  --bg-alt: #CECCDA;
  --text-dark: #1A2B4C;
  --text-body: #4A5568;
  --text-muted: #8094B3;
  --white: #FFFFFF;
  --border: rgba(10, 0, 71, 0.12);
  --error: #C0392B;
  --success: #1E8E5A;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
}

a {
  color: inherit;
}

/* ── BACKGROUND ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 169, 224, 0.18), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(10, 0, 71, 0.15), transparent 50%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10, 0, 71, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 0, 71, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 75%);
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

/* ── BADGE ── */
.badge {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: rgba(10, 0, 71, 0.08);
  border: 1px solid rgba(10, 0, 71, 0.15);
  border-radius: 999px;
  padding: 8px 18px;
}

/* ── HERO (index.html) ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.hero-content {
  max-width: 640px;
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 20px;
  box-shadow: 0 20px 60px rgba(10, 0, 71, 0.08);
}

.hero-content .badge {
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: clamp(20px, 5.2vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-content .subtitle {
  font-size: 16px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}

.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  margin: 0 auto 28px;
}

.question {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}

@media (min-width: 540px) {
  .actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  flex: 1;
}

.btn:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(10, 0, 71, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(10, 0, 71, 0.32);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(10, 0, 71, 0.06);
  transform: translateY(-2px);
}

/* ── FORM PAGE (cadastro.html) ── */
.form-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

.form-header {
  text-align: center;
  margin-bottom: 20px;
}

.form-header .badge {
  margin-bottom: 16px;
}

.form-header h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin: 8px 0 8px;
}

.form-header .subtitle {
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
}

/* ── FORM SECTIONS ── */
.form-section {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 10px;
  box-shadow: 0 8px 24px rgba(10, 0, 71, 0.06);
}

.form-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FIELDS ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .field.full {
    grid-column: 1 / -1;
  }
}

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

.field[hidden] {
  display: none;
}

.grid-2[hidden] {
  display: none;
}

.field label,
.form-section > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.field input,
.field select {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid rgba(10, 0, 71, 0.15);
  border-radius: 8px;
  padding: 9px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 0, 71, 0.12);
}

.field input::placeholder {
  color: var(--text-muted);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--error);
  min-height: 16px;
}

/* ── RADIO GROUP ── */
.field.full > label:first-child {
  margin-bottom: 4px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid rgba(10, 0, 71, 0.15);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  flex: 1;
  min-width: 120px;
  justify-content: center;
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(10, 0, 71, 0.06);
}

.radio-option input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ── CONDITIONAL FIELD ── */
.conditional {
  margin-top: 10px;
}

/* ── CHECKBOXES ── */
.checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-body);
  cursor: pointer;
}

.checkbox-option input {
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── SUBMIT ── */
.btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 4px;
}

.form-status {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
  min-height: 20px;
}

.form-status.error {
  color: var(--error);
}

/* ── THANK YOU ── */
.thank-you {
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 48px 28px;
  box-shadow: 0 12px 32px rgba(10, 0, 71, 0.06);
}

.thank-you-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

.thank-you h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.thank-you p {
  font-size: 15px;
  max-width: 440px;
  margin: 0 auto;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
