/* ============================================================
   Business Connection Plan — Comunidade Brasileiros nos EUA
   Paleta navy/gold compartilhada com /analise (TREND'S Business)
   ============================================================ */

:root {
  --bg:      #080809;
  --bg2:     #0D0D0F;
  --bg3:     #18181b;
  --border:  rgba(255,255,255,0.08);
  --text:    #EDEAE3;
  --muted:   #8f8b83;
  --accent:  #C4A265;
  --accent2: #d9c08c;
  --red:     #c0392b;
  --white:   #ffffff;
  --font:    'Fraunces', Georgia, serif;
  --sans:    'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,8,9,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: rgba(196,162,101,0.25); }

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 55px; width: auto; display: block; border-radius: 4px; }
@media (min-width: 640px) { .nav-logo img { height: 65px; } }

/* ─── Hero ─── */
.apply-hero {
  padding: 128px 0 52px;
  text-align: center;
}

.apply-hero h1 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 16px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(196,162,101,0.3);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
}

.apply-hero p:not(.hero-eyebrow) {
  color: var(--muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Progress ─── */
.apply-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 44px 0 0;
}

.ap-step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }

.ap-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg);
  transition: all 0.2s;
  position: relative; z-index: 1;
}

.ap-step.active .ap-dot { border-color: var(--accent); color: var(--accent); background: rgba(196,162,101,0.1); }
.ap-step.done .ap-dot { border-color: var(--accent); background: var(--accent); color: var(--bg); }

.ap-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ap-step.active .ap-label, .ap-step.done .ap-label { color: var(--accent); }

.ap-spacer { width: 56px; height: 1px; background: var(--border); align-self: flex-start; margin-top: 18px; }
.ap-spacer.done { background: var(--accent); }

/* ─── Form wrapper / panels ─── */
.apply-form-wrap { max-width: 640px; margin: 0 auto; padding: 0 24px 100px; }

.form-panel { display: none; }
.form-panel.active { display: block; }

.panel-title { font-family: var(--font); font-weight: 500; font-size: 1.4rem; color: var(--white); margin-bottom: 8px; margin-top: 44px; }
.panel-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 32px; }

/* ─── Fields ─── */
.field-group { margin-bottom: 22px; }

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--accent); }
.field-input.is-error { border-color: var(--red); }

select.field-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f8b83' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
select.field-input option { background: #18181b; }
textarea.field-input { resize: vertical; min-height: 100px; font-family: var(--sans); }

.field-error { display: none; font-size: 0.78rem; color: #e87070; margin-top: 6px; }

/* Phone */
.phone-wrap { display: flex; }
.phone-code {
  flex-shrink: 0; min-width: 108px;
  background: var(--bg2); border: 1px solid var(--border); border-right: none;
  border-radius: 6px 0 0 6px;
  padding: 14px 24px 14px 10px;
  font-family: var(--sans); font-size: 0.9rem; color: var(--text);
  outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f8b83' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color 0.2s;
}
.phone-code:focus { border-color: var(--accent); }
.phone-code option { background: #18181b; }
.phone-code.is-error { border-color: var(--red); }
.phone-num { flex: 1; border-radius: 0 6px 6px 0 !important; }

/* Pills */
.pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-option input { display: none; }
.pill-option label {
  cursor: pointer;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.15s;
  user-select: none;
  display: block;
}
.pill-option input:checked + label {
  border-color: var(--accent); color: var(--accent); background: rgba(196,162,101,0.08);
}

/* Checkboxes */
.check-group { display: flex; flex-direction: column; gap: 10px; }
.check-option { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check-option input { display: none; }
.check-box {
  width: 20px; height: 20px;
  border: 1px solid var(--border); border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.check-option input:checked ~ .check-box { border-color: var(--accent); background: var(--accent); }
.check-option input:checked ~ .check-box::after { content: '✓'; font-size: 0.7rem; color: var(--bg); font-weight: 700; }
.check-option span { font-size: 0.9rem; color: var(--text); }

/* Nivel cards (step 1 persona picker) */
.nivel-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.nivel-card input { display: none; }
.nivel-card label {
  display: flex; flex-direction: column;
  padding: 16px 20px;
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.15s;
}
.nivel-card label:hover { border-color: rgba(196,162,101,0.4); }
.nivel-card .nc-title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.nivel-card .nc-sub { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.nivel-card input:checked + label { border-color: var(--accent); background: rgba(196,162,101,0.06); }
.nivel-card input:checked + label .nc-title { color: var(--accent); }

/* Nav buttons */
.form-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border);
}
.btn-back {
  font-size: 0.85rem; color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 0; display: flex; align-items: center; gap: 6px; transition: color 0.15s;
}
.btn-back:hover { color: var(--text); }

.btn-next {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 14px 32px;
  background: linear-gradient(135deg, #d9c08c, #C4A265 55%, #a8874f);
  color: #080809;
  border: none; border-radius: 100px; cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(196,162,101,0.5);
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn-next:hover { box-shadow: 0 10px 30px -6px rgba(196,162,101,0.7); transform: translateY(-1px); }
.btn-next:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Agreement box */
.agreement-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-bottom: 24px; }
.agreement-box p { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }

/* Success screen */
.success-screen { display: none; text-align: center; padding: 80px 24px 120px; max-width: 560px; margin: 0 auto; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 28px; color: var(--accent);
}
.success-screen h2 { font-family: var(--font); font-weight: 500; font-size: 1.8rem; color: var(--white); margin-bottom: 14px; }
.success-screen p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }

/* Global error */
.global-error {
  display: none; padding: 14px 18px; background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.25); border-radius: 6px;
  font-size: 0.85rem; color: #e87070; margin-bottom: 20px;
}

.footer { text-align: center; padding: 40px 24px; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
  .apply-progress { gap: 0; }
  .ap-spacer { width: 30px; }
}

/* ─── Agreement document page ─── */
.nda-stage { display: none; }
.nda-stage.active { display: block; }

.nda-doc-header { text-align: center; padding: 128px 24px 24px; max-width: 780px; margin: 0 auto; }
.nda-doc-header h2 { font-family: var(--font); font-weight: 500; font-size: 1.4rem; color: var(--white); margin-bottom: 8px; }
.nda-doc-header p { font-size: 0.88rem; color: var(--muted); }

.nda-doc-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px 60px; }

.nda-scroll {
  background: #050506;
  border: 1px solid var(--border);
  border-radius: 8px;
  height: calc(100vh - 300px);
  min-height: 380px; max-height: 580px;
  overflow-y: auto;
  padding: 32px 36px;
  margin-bottom: 20px;
}
.nda-scroll::-webkit-scrollbar { width: 5px; }
.nda-scroll::-webkit-scrollbar-track { background: #101012; }
.nda-scroll::-webkit-scrollbar-thumb { background: #333336; border-radius: 3px; }

.ndt-org { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); text-align: center; margin-bottom: 6px; }
.ndt-sub { font-size: 0.78rem; color: var(--muted); text-align: center; margin-bottom: 4px; }
.ndt-meta { font-size: 0.78rem; color: #666; text-align: center; margin-bottom: 28px; line-height: 1.6; }
.ndt-h3 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 22px 0 8px; }
.ndt-p { font-size: 0.84rem; line-height: 1.75; color: #b0b0b0; margin-bottom: 9px; }
.ndt-ul { margin: 4px 0 12px; }
.ndt-ul li { font-size: 0.82rem; color: #999; padding: 2px 0 2px 18px; position: relative; line-height: 1.5; list-style: none; }
.ndt-ul li::before { content: '–'; position: absolute; left: 2px; color: var(--accent); }

.ndt-value { background: rgba(196,162,101,0.06); border: 1px solid rgba(196,162,101,0.2); border-radius: 8px; padding: 18px 20px; text-align: center; margin: 20px 0; }
.ndt-value .amt { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.ndt-value .lbl { font-size: 0.72rem; color: #888; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.ndt-sorg { font-size: 0.82rem; font-weight: 600; color: var(--accent); margin-bottom: 3px; }
.ndt-srep { font-size: 0.82rem; color: #aaa; margin-bottom: 3px; }

.scroll-hint { text-align: center; font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; transition: opacity 0.3s; }
.scroll-hint.done { opacity: 0; }

.btn-sign {
  width: 100%;
  background: linear-gradient(135deg, #d9c08c, #C4A265 55%, #a8874f);
  color: #080809;
  border: none; border-radius: 100px;
  padding: 16px; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer; transition: background 0.2s, opacity 0.2s;
  box-shadow: 0 8px 24px -8px rgba(196,162,101,0.5);
}
.btn-sign:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.btn-sign:not(:disabled):hover { box-shadow: 0 10px 30px -6px rgba(196,162,101,0.7); }

.sign-error { display: none; margin-top: 14px; padding: 12px 16px; background: rgba(192,57,43,0.1); border: 1px solid rgba(192,57,43,0.25); border-radius: 6px; font-size: 0.82rem; color: #e87070; }

.ref-badge {
  display: inline-block; margin-top: 18px;
  background: rgba(196,162,101,0.1); border: 1px solid rgba(196,162,101,0.3);
  border-radius: 100px; padding: 8px 18px;
  font-size: 0.78rem; color: var(--accent); letter-spacing: 0.1em;
}
