/* =========================================================
   Telesales Executive application form
   ========================================================= */
:root {
  --bg-1: #0b1020;
  --bg-2: #141a3f;
  --brand: #6366f1;
  --brand-2: #a855f7;
  --accent: #22d3ee;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f5f6fb;
  --ok: #10b981;
  --danger: #ef4444;
  --radius: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-1);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input { font: inherit; }
a { color: var(--brand); }

/* ---------- Background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(124, 58, 237, .45), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(34, 211, 238, .30), transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: float 16s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; left: -120px; top: 10%;  background: #6366f1; }
.blob-2 { width: 360px; height: 360px; right: -100px; top: 55%; background: #a855f7; animation-delay: -5s; }
.blob-3 { width: 260px; height: 260px; left: 40%; bottom: -120px; background: #22d3ee; animation-delay: -9s; }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(30px, -40px, 0) scale(1.08); }
}

/* ---------- Layout ---------- */
.app {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.card {
  width: 100%; max-width: 600px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(2, 6, 23, .5), 0 0 0 1px rgba(255, 255, 255, .06);
  padding: 38px 36px 34px;
  position: relative; overflow: hidden;
  animation: cardIn .6s cubic-bezier(.2, .7, .2, 1) both;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: #4338ca; background: #eef2ff; padding: 6px 12px 6px 10px; border-radius: 999px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 100% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } }
.card-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -.7px; margin: 14px 0 6px; line-height: 1.15; }
.card-header p  { color: var(--muted); font-size: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip {
  font-size: 12.5px; font-weight: 600; color: #334155;
  background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}

/* ---------- Progress ---------- */
.progress { margin: 26px 0 22px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.progress-track { height: 8px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.progress-fill {
  height: 100%; width: 20%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }

/* ---------- Steps ---------- */
.step[hidden] { display: none; }
.step { animation: stepIn .4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.q-num {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--brand); margin-bottom: 8px;
}
.question { font-size: 21px; font-weight: 700; letter-spacing: -.3px; line-height: 1.35; margin-bottom: 18px; outline: none; }
.question strong { color: #4338ca; }

.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  font-size: 15.5px; font-weight: 500; color: var(--ink); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { border-color: #c7d2fe; box-shadow: 0 10px 26px rgba(79, 70, 229, .12); transform: translateY(-1px); }
.option:active { transform: translateY(0); }
.option:focus-visible { outline: 3px solid rgba(99, 102, 241, .35); outline-offset: 2px; }
.option-label small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.option-mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e1; position: relative;
  transition: border-color .2s, background .2s, transform .2s;
}
.option.is-selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}
.option.is-selected .option-mark { border-color: var(--brand); background: var(--brand); transform: scale(1.05); }
.option.is-selected .option-mark::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* ---------- Buttons ---------- */
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border: none; border-radius: 12px; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 3px solid rgba(99, 102, 241, .35); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 10px 24px rgba(99, 102, 241, .35);
  margin-left: auto; position: relative;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(99, 102, 241, .42); }
.btn-primary[disabled] { opacity: .75; cursor: progress; transform: none; }
.btn-back { background: transparent; color: var(--muted); padding: 12px 14px; }
.btn-back:hover { color: var(--ink); background: var(--soft); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: #c7d2fe; background: #f8faff; }

.btn-spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fields ---------- */
.fields { display: grid; gap: 16px; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 15px;
  background: #fff; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #a0aec0; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.field.has-error input, .field.has-error .dropzone { border-color: var(--danger); }
.field.has-error input:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.phone-input {
  display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.phone-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.phone-prefix {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; background: var(--soft);
  border-right: 1.5px solid var(--line); color: #334155; font-weight: 600; font-size: 15px; white-space: nowrap;
}
.phone-prefix svg { color: var(--brand); flex: none; }
.phone-input input[type="tel"] { border: none !important; border-radius: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; }
.field.has-error .phone-input { border-color: var(--danger); }
.field.has-error .phone-input:focus-within { box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.field-error { display: none; color: var(--danger); font-size: 12.5px; font-weight: 500; margin-top: 6px; }
.field.has-error .field-error { display: block; }
.form-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 12px;
  padding: 12px 14px; font-size: 14px; margin-top: 16px;
}
.form-error[hidden] { display: none; }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #c7cbe0; border-radius: 16px; padding: 26px 18px; text-align: center;
  background: var(--soft); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: #eef2ff; }
.dropzone.is-drag { border-color: var(--brand); background: #eef2ff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .15); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: #ecfdf5; cursor: default; text-align: left; padding: 14px 16px; }
.dz-idle p { font-size: 14.5px; color: #334155; }
.dz-idle strong { color: var(--brand); }
.dz-hint { color: var(--muted) !important; font-size: 12.5px !important; margin-top: 4px; }
.dz-icon {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center;
  background: #fff; color: var(--brand); box-shadow: 0 6px 18px rgba(79, 70, 229, .15);
}
.dropzone.has-file .dz-idle { display: none; }
.dz-file { display: flex; align-items: center; gap: 12px; }
.dz-file[hidden] { display: none; }
.dz-file-icon {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; color: #047857; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .18);
}
.dz-file-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dz-file-name { font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-file-size { font-size: 12.5px; color: var(--muted); }
.dz-remove {
  flex: none; width: 34px; height: 34px; border-radius: 10px; border: none; background: #fff; color: #64748b;
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.dz-remove:hover { background: #fee2e2; color: var(--danger); }

.privacy { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 18px; }
.privacy a { color: var(--brand); text-decoration: none; font-weight: 600; }
.privacy a:hover { text-decoration: underline; }

/* ---------- Honeypot ---------- */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ---------- Result screens ---------- */
.result { text-align: center; padding: 26px 8px 8px; animation: stepIn .45s cubic-bezier(.2, .7, .2, 1) both; }
.result[hidden] { display: none; }
.result-icon { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; animation: pop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.result-icon.good { background: #ecfdf5; color: var(--ok); box-shadow: 0 0 0 10px rgba(16, 185, 129, .08); }
.result-icon.bad  { background: #fef2f2; color: var(--danger); box-shadow: 0 0 0 10px rgba(239, 68, 68, .08); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.result h2 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 8px; outline: none; }
.result p  { color: var(--muted); font-size: 15px; max-width: 420px; margin: 0 auto 22px; }

/* ---------- Footer ---------- */
.foot { color: rgba(255, 255, 255, .6); font-size: 12.5px; margin-top: 18px; text-align: center; }
.foot a { color: #c4b5fd; text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .app { padding: 16px 12px 24px; }
  .card { padding: 28px 20px 24px; border-radius: 20px; }
  .card-header h1 { font-size: 24px; }
  .card-header p { font-size: 14px; }
  .question { font-size: 18px; }
  .option { padding: 14px 15px; font-size: 15px; }
  .field-row { grid-template-columns: 1fr; }
  .step-nav { flex-wrap: wrap; }
  .btn-primary { width: 100%; order: -1; margin-left: 0; }
  .btn-back { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
