/* ═══════════════════════════════════════════════════════════════
   Anderson Barbosa · Briefing de Projeto
   Estilo Oficial: Bordas Arredondadas, Visual Glassmorphism & Paleta Dark
   ═══════════════════════════════════════════════════════════════ */

/* ── Gotham Font (auto-hospedada) ── */
@font-face {
  font-family: 'Gotham';
  src: url('./fonts/GothamBook.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: url('./fonts/GothamMedium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: url('./fonts/GothamBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: 'Gotham', 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Paleta Oficial do Portfólio */
  --bg: #0c1117;
  --card-bg: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-border-top: rgba(255, 255, 255, 0.18);

  --input-bg: rgba(8, 11, 18, 0.65);
  --input-border: rgba(255, 255, 255, 0.12);

  --blue: oklch(0.48 0.17 254);
  --blue-soft: oklch(0.70 0.13 254);
  --blue-hover: oklch(0.56 0.18 253);
  --blue-glow: oklch(0.48 0.17 254 / 0.35);

  --text-white: #ffffff;
  --text-main: #f3f4f8;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --danger: #ef4444;
  --success: #10b981;

  /* Bordas Arredondadas (Nunca Quadradas) */
  --r-input: 14px;
  --r-card: 22px;
  --r-pill: 999px;
  --r-modal: 26px;

  --max-w: 820px;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  background-color: var(--bg);
  overflow-x: hidden;
}

/* ── Fundo com Luzes Suaves ── */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
}

.glow-top {
  top: -120px;
  right: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
}

.glow-bottom {
  bottom: 0;
  left: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
  opacity: 0.12;
}

/* ── Top Header (Apenas a Logo no Canto Superior Direito) ── */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end; /* Logo estritamente no canto superior direito */
  align-items: center;
}

.top-logo .logo-img {
  height: 28px;
  width: auto;
  display: block;
  user-select: none;
}

/* ── Container da Página ── */
.main-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 44px 24px 80px;
  position: relative;
  z-index: 1;
}

/* ── Introdução Direta e Sóbria ── */
.intro-header {
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.intro-desc {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
}

/* ── Cards Arredondados com Efeito Glass (Sem nada quadrado) ── */
.card-section {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-top-color: var(--card-border-top);
  border-radius: var(--r-card); /* Bordas bem arredondadas */
  padding: clamp(22px, 3.5vw, 30px);
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-section:focus-within {
  border-color: rgba(70, 120, 255, 0.45);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(70, 120, 255, 0.25);
}

.card-section.has-error {
  border-color: rgba(239, 68, 68, 0.65) !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4), 0 10px 30px rgba(239, 68, 68, 0.15) !important;
}

.card-heading {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 19px);
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.required-star {
  color: #f87171;
  font-weight: 700;
  margin-left: 2px;
}

.card-instruction {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

/* ── Grid de 2 Colunas ── */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-block {
  display: flex;
  flex-direction: column;
}

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

.input-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Inputs e Textareas Arredondados ── */
.form-input,
.form-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--r-input); /* Bordas arredondadas e suaves */
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 14.5px;
  padding: 12px 18px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--blue-soft);
  background: rgba(10, 15, 26, 0.85);
  box-shadow: 0 0 0 3px oklch(0.48 0.17 254 / 0.25);
}

.form-textarea {
  resize: vertical;
  line-height: 1.6;
}

/* ── Cards de Radio Arredondados ── */
.radio-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; /* Borda arredondada */
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
}

.radio-card input[type="radio"],
.radio-card-sm input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  transition: all 0.2s ease;
}

.radio-card input:checked + .radio-circle,
.radio-card-sm input:checked + .radio-circle {
  border-color: var(--blue-soft);
}

.radio-card input:checked + .radio-circle::after,
.radio-card-sm input:checked + .radio-circle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-soft);
}

.radio-card.is-selected {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(70, 120, 255, 0.08);
}

.radio-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-main-title {
  font-size: 14.5px;
  color: var(--text-white);
  font-weight: 600;
}

.radio-sub-title {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Radio Inline (Domínio e Hospedagem) ── */
.radio-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-card-sm {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-pill); /* Pílula arredondada */
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.radio-card-sm:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.20);
}

.radio-card-sm input:checked ~ span {
  color: #ffffff;
  font-weight: 500;
}

.radio-card-sm:has(input:checked) {
  border-color: var(--blue-soft);
  background: rgba(70, 120, 255, 0.10);
}

.sub-input-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Mensagem de Erro por Campo ── */
.error-text {
  display: none;
  font-size: 12px;
  color: #fca5a5;
  margin-top: 6px;
  font-family: var(--font-mono);
}

.error-text.visible {
  display: block;
}

/* ── Seção LGPD ── */
.lgpd-section {
  padding: 22px 26px;
}

.lgpd-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
}

.lgpd-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 6px; /* Cantos arredondados */
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 0.2s ease;
}

.lgpd-label input:checked + .checkbox-box {
  border-color: var(--blue-soft);
  background: var(--blue);
}

.lgpd-label input:checked + .checkbox-box::after {
  content: '✓';
  position: absolute;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  top: -1px;
  left: 4px;
}

.lgpd-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.lgpd-text strong {
  color: var(--text-white);
}

.lgpd-link-row {
  margin-top: 10px;
  margin-left: 34px;
}

.link-privacy {
  background: none;
  border: none;
  color: var(--blue-soft);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
}

.link-privacy:hover {
  color: #93c5fd;
}

/* ── Área de Envio Limpa (Sem Card ao Redor) ── */
.submit-flow {
  margin-top: 28px;
  margin-bottom: 60px;
}

.submit-button {
  width: 100%;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  padding: 16px 36px;
  border: none;
  border-radius: var(--r-pill); /* Botão em formato de pílula arredondada */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow:
    0 0 0 1px oklch(0.50 0.18 253 / 0.40),
    0 6px 20px oklch(0.48 0.17 254 / 0.35);
  transition: all 0.2s ease;
}

.submit-button:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px oklch(0.56 0.18 253 / 0.60),
    0 10px 28px oklch(0.50 0.18 253 / 0.45);
}

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

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

/* ── Feedback / Avisos ── */
.alert-box {
  padding: 16px 20px;
  border-radius: 16px; /* Borda bem arredondada */
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.alert-success code {
  color: #93c5fd;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ── Loader Spinner ── */
.loader-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ── Rodapé Simples ── */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Modal LGPD ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-dialog {
  background: #101620;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-modal); /* Borda arredondada */
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.modal-top {
  padding: 20px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-white);
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.modal-body-content {
  padding: 24px 26px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.modal-body-content h4 {
  font-size: 14px;
  color: var(--text-white);
  margin-top: 16px;
  margin-bottom: 6px;
}

.modal-body-content h4:first-child {
  margin-top: 0;
}

.modal-body-content ul {
  padding-left: 20px;
  margin-top: 8px;
}

.modal-body-content li {
  margin-bottom: 6px;
}

.modal-body-content code {
  color: var(--blue-soft);
  font-family: var(--font-mono);
}

/* ── Responsivo ── */
@media (max-width: 680px) {
  .grid-2-cols {
    grid-template-columns: 1fr;
  }
  .card-section {
    padding: 20px 18px;
  }
  .radio-cards-row {
    flex-direction: column;
  }
  .radio-card-sm {
    width: 100%;
  }
  .footer-container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
