/* ===== Reset & tokens ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0c;
  --bg-card: #141418;
  --bg-input: #1c1c22;
  --border: #2a2a34;
  --border-focus: #c9a227;
  --text: #f4f4f6;
  --text-muted: #9a9aa8;
  --accent: #d4af37;
  --accent-hover: #e8c547;
  --accent-glow: rgba(212, 175, 55, 0.25);
  --error: #f87171;
  --success: #4ade80;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.required {
  color: var(--accent);
}

/* ===== Layout ===== */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 3.5rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -40% 10% auto;
  height: 320px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Main card ===== */
.main {
  flex: 1;
  padding: 0 1.5rem 3rem;
  margin-top: -2.5rem;
}

.card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card__hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ===== Form ===== */
.form__group {
  margin-bottom: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form__input,
.form__select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9aa8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form__input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form__input:hover,
.form__select:hover {
  border-color: #3a3a48;
}

.form__input:focus,
.form__select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form__input.is-invalid,
.form__select.is-invalid {
  border-color: var(--error);
}

.form__error {
  display: block;
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.35rem;
  min-height: 1.1em;
}

/* ===== Checkboxes ===== */
.form__checks {
  border: none;
  margin: 1.5rem 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.45;
}

.check__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check__box {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}

.check__input:checked + .check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.check__input:checked + .check__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0a0a0c;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check__input:focus-visible + .check__box {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.check__text {
  color: var(--text-muted);
}

.check--lgpd .check__text {
  color: var(--text);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--accent-hover);
}

/* ===== Submit ===== */
.btn-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #0a0a0c;
  background: linear-gradient(135deg, var(--accent) 0%, #b8941f 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

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

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-submit.is-loading .btn-submit__label {
  opacity: 0;
}

.btn-submit__loader {
  display: none;
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(10, 10, 12, 0.3);
  border-top-color: #0a0a0c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.is-loading .btn-submit__loader {
  display: block;
}

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

.btn-secondary,
.btn-primary {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* ===== Success ===== */
.sucesso {
  text-align: center;
  padding: 2rem 0 0.5rem;
}

.sucesso__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(74, 222, 128, 0.12);
  border-radius: 50%;
}

.sucesso__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.sucesso__text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ===== Footer ===== */
.footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== Modal ===== */
.modal {
  border: none;
  padding: 0;
  max-width: min(520px, calc(100vw - 2rem));
  width: 100%;
  background: transparent;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal__inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.2s;
}

.modal__close:hover {
  color: var(--text);
}

.modal__body {
  padding: 1.25rem 1.5rem;
  max-height: 50vh;
  overflow-y: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal__body h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin: 1.25rem 0 0.4rem;
}

.modal__body h3:first-of-type {
  margin-top: 0.75rem;
}

.modal__body p {
  margin-bottom: 0.5rem;
}

.modal__footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}
