@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg:           #021B1A;
  --bg-card:      rgba(3, 34, 33, 0.9);
  --bg-elevated:  rgba(3, 98, 76, 0.15);
  --green:        #00DF81;
  --green-dim:    rgba(0, 223, 129, 0.1);
  --green-glow:   rgba(0, 223, 129, 0.18);
  --red:          #f43f5e;
  --text:         #F1F7F6;
  --muted:        #8aada8;
  --muted2:       #4a6662;
  --border:       rgba(241,247,246,0.07);
  --border-hover: rgba(0,223,129,0.3);
  --font:         'Plus Jakarta Sans', system-ui, sans-serif;
  --radius:       14px;
  --radius-lg:    20px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── SHELL ── */
.app-shell {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.app-shell::-webkit-scrollbar { display: none; }

@media (min-width: 520px) {
  body {
    background: radial-gradient(circle at top right, #032221, #021B1A);
    display: flex; align-items: center; justify-content: center;
  }
  .app-shell {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
    background: var(--bg);
    border: 1px solid rgba(0,223,129,0.08);
    border-radius: var(--radius-lg);
    margin: 20px;
    height: calc(100dvh - 40px);
    max-height: 860px;
  }
}

/* ── BLOBS ── */
.bg-blob {
  position: fixed; border-radius: 50%;
  z-index: -1; pointer-events: none;
  filter: blur(80px); opacity: 0.5;
}
.blob-1 { width: 280px; height: 280px; top: -80px; right: -80px; background: rgba(0,223,129,0.1); animation: bfloat 18s infinite alternate; }
.blob-2 { width: 240px; height: 240px; bottom: -80px; left: -80px; background: rgba(3,98,76,0.2); animation: bfloat 24s infinite alternate-reverse; }
@keyframes bfloat { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,30px) scale(1.1); } }

/* ── PROGRESS ── */
#progress-bar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 20px;
  display: none; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
#progress-bar.visible { display: flex; }
#progress-track { flex: 1; height: 4px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
#progress-fill { height: 100%; background: linear-gradient(90deg, #03624C, var(--green)); border-radius: 99px; width: 0; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
#progress-text { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; min-width: 60px; text-align: right; }

/* ── SCREENS ── */
.screen { display: none; flex-direction: column; min-height: 100dvh; padding: 0 24px 60px; }
.screen.active { display: flex; animation: fadeUp 0.35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.screen-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-top: 28px; }

/* ── TYPOGRAPHY ── */
h1 { font-size: clamp(26px, 7vw, 34px); font-weight: 900; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(22px, 6vw, 28px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
p  { font-size: 15px; color: var(--muted); line-height: 1.65; }
.hl { color: var(--green); }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-dim); border: 1px solid rgba(8,201,153,0.25);
  border-radius: 99px; padding: 5px 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--green);
}

/* ── QUESTION META ── */
.q-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); }
.q-sub   { font-size: 14px; color: var(--muted); }
.q-meta  { display: flex; flex-direction: column; gap: 6px; }

/* ── OPTIONS ── */
.options { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 20px;
  background: var(--bg-card); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: var(--font); font-size: 15px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.option-btn:hover { border-color: var(--border-hover); background: rgba(8,201,153,0.04); }
.option-btn.selected {
  border-color: var(--green); background: var(--green-dim);
  color: var(--green); font-weight: 600;
  box-shadow: 0 0 18px rgba(8,201,153,0.08);
}

/* ── BUTTONS ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 17px 24px; border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s ease; letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-green {
  background: linear-gradient(135deg, var(--green), #2CC295);
  color: #021B1A; font-weight: 800;
  box-shadow: 0 10px 25px -5px rgba(0,223,129,0.25);
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 15px 30px -5px rgba(0,223,129,0.35); }
.btn-large { padding: 19px 24px; font-size: 17px; }

/* ── FORM ── */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%; padding: 14px 16px;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 16px;
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color 0.2s;
}
input:focus, select:focus { border-color: var(--green); background: rgba(8,201,153,0.03); }
input.error, select.error { border-color: var(--red); }
select {
  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 fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px; cursor: pointer;
}
select option { background: #1a1a1a; color: var(--text); }
::placeholder { color: var(--muted2); }
.field-error { font-size: 12px; color: var(--red); min-height: 16px; font-weight: 500; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

/* ── SOCIAL PROOF ── */
.social-proof {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.avatars { display: flex; }
.avatars span {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--bg); margin-left: -10px;
  font-size: 11px; font-weight: 800; letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatars span:first-child { margin-left: 0; }
/* Paleta secundária oficial do brandbook */
.av-1 { background: #06302B; color: #2FA98C; }
.av-2 { background: #0B453A; color: #AACBC4; }
.av-3 { background: #095544; color: #00DF81; }
.av-4 { background: #17876D; color: #021B1A; }

/* ── STATS ROW ── */
.stats-row { display: flex; gap: 2px; }
.stat-pill {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 8px; text-align: center;
}
.stat-pill strong { display: block; font-size: 18px; font-weight: 900; color: var(--green); line-height: 1; margin-bottom: 4px; }
.stat-pill span { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* ── LOADING ── */
.spinner {
  width: 56px; height: 56px;
  border: 3px solid rgba(255,255,255,0.07);
  border-top-color: var(--green); border-radius: 50%;
  animation: spin 0.75s linear infinite; margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-bar-wrap { width: 100%; height: 5px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; margin-top: 24px; }
#loading-progress { height: 100%; width: 5%; background: linear-gradient(90deg, #03624C, var(--green)); border-radius: 99px; }

/* ── STATUS ICON ── */
.status-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin: 0 auto;
}
.status-icon.approved {
  background: rgba(8,201,153,0.1); border: 2px solid rgba(8,201,153,0.3);
  position: relative;
}
.status-icon.approved::after {
  content: '';
  display: block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* ── SAFE AREA ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .screen { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}
