/* ─────────────────────────────────────────
   RESET & VARIABLES
───────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

:root {
  --navy-900: #0a1929;
  --navy-800: #102a43;
  --navy-700: #1a3a5c;
  --cyan-500: #0ea5e9;
  --cyan-400: #38bdf8;
  --cyan-300: #7dd3fc;
  --green:    #22c55e;
  --red:      #ef4444;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-600: #475569;
  --slate-700: #334155;
  --font-main: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

html, body {
  min-height: 100vh;
  background: var(--slate-100);
  font-family: var(--font-main);
  color: var(--navy-900);
}

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 16px 72px;
}

.card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 40px -8px rgba(0, 0, 0, 0.13);
  width: 100%;
  max-width: 660px;
  overflow: hidden;
}

/* ─────────────────────────────────────────
   TOP BAR
───────────────────────────────────────── */
.top-bar {
  background: var(--navy-900);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #0369a1, #075985);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-3deg);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.4);
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.logo-name {
  font-size: 19px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.4px;
}

.top-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan-400);
  letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────
   PROGRESS BAR
───────────────────────────────────────── */
.progress-wrap {
  background: var(--navy-800);
  height: 4px;
}

.progress-bar {
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-500), var(--cyan-300));
  border-radius: 0 2px 2px 0;
  transition: width 0.45s ease;
}

/* ─────────────────────────────────────────
   BLOCK HEADER (shared by all question steps)
───────────────────────────────────────── */
.block-head {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  padding: 30px 36px 26px;
  position: relative;
  overflow: hidden;
}

.block-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.block-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan-300);
  font-size: 9px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.block-num-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan-400);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan-400);
  flex-shrink: 0;
}

.block-title {
  font-size: 24px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.block-title .accent {
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  display: inline-block;
  padding-right: 0.12em;
  padding-left: 0.02em;
}

.block-desc {
  font-size: 12px;
  color: var(--slate-400);
  line-height: 1.65;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  max-width: 88%;
}

/* ─────────────────────────────────────────
   QUESTIONS BODY
───────────────────────────────────────── */
.q-body {
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.question {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.45;
}

.q-num {
  color: var(--cyan-500);
  font-size: 12px;
  font-weight: 800;
  margin-right: 7px;
}

.q-hint {
  font-size: 11px;
  color: var(--slate-400);
  font-weight: 500;
  margin-top: -4px;
}

.q-note {
  font-size: 12px;
  color: var(--slate-600);
  line-height: 1.55;
  margin-top: -2px;
}

.q-optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-300);
  margin-left: 6px;
}

.q-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* ─────────────────────────────────────────
   OPTION CARDS (radio & checkbox)
───────────────────────────────────────── */
.opt-grid {
  display: grid;
  gap: 8px;
}

.opt-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border: 1.5px solid var(--slate-200);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
  user-select: none;
  background: white;
}

.opt-card:hover {
  border-color: var(--cyan-400);
  background: rgba(56, 189, 248, 0.04);
}

.opt-card.selected {
  border-color: var(--cyan-500);
  background: rgba(14, 165, 233, 0.07);
}

.opt-card input[type="radio"],
.opt-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan-500);
  flex-shrink: 0;
  cursor: pointer;
}

.opt-card span {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-700);
  line-height: 1.35;
}

.opt-card.selected span {
  color: var(--navy-900);
  font-weight: 600;
}

/* ─────────────────────────────────────────
   SCALE (1–10)
───────────────────────────────────────── */
.scale-wrap {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.scale-btn {
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--scale-color, var(--slate-200));
  border-radius: 11px;
  background: white;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  color: var(--scale-color, var(--slate-600));
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scale-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.scale-btn.selected {
  background: var(--scale-color, var(--cyan-500));
  border-color: var(--scale-color, var(--cyan-500));
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ─────────────────────────────────────────
   TEXT / NUMBER / SELECT INPUTS
───────────────────────────────────────── */
.q-input {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--slate-200);
  border-radius: 11px;
  font-size: 14px;
  font-family: var(--font-main);
  color: var(--navy-900);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: white;
}

.q-input:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.q-input::placeholder {
  color: var(--slate-300);
}

.q-select {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 1.5px solid var(--slate-200);
  border-radius: 11px;
  font-size: 14px;
  font-family: var(--font-main);
  color: var(--navy-900);
  outline: none;
  background: white;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.q-select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

/* ─────────────────────────────────────────
   NAVIGATION BUTTONS
───────────────────────────────────────── */
.nav-bar {
  padding: 20px 36px 24px;
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.nav-bar.end {
  justify-content: flex-end;
}

.btn-back {
  padding: 11px 22px;
  border: 1.5px solid var(--slate-200);
  border-radius: 11px;
  background: white;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-main);
  color: var(--slate-600);
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s;
}

.btn-back:hover {
  border-color: var(--slate-400);
  color: var(--navy-900);
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-main);
  color: white;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
  box-shadow: 0 4px 16px rgba(10, 25, 41, 0.25);
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(10, 25, 41, 0.35);
}

.btn-next svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-next.cyan {
  background: linear-gradient(135deg, var(--cyan-500), #0369a1);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.btn-next.cyan:hover {
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.45);
}

/* ─────────────────────────────────────────
   WELCOME SCREEN
───────────────────────────────────────── */
.welcome-head {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  padding: 44px 36px 38px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.welcome-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 65%, rgba(56, 189, 248, 0.18) 0%, transparent 65%);
}

.welcome-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan-300);
  font-size: 9px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.welcome-badge-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan-400);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan-400);
  flex-shrink: 0;
}

.welcome-title {
  font-size: 28px;
  font-weight: 800;
  color: white;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.welcome-title .accent {
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  display: inline-block;
  padding-right: 0.12em;
  padding-left: 0.02em;
}

.welcome-subtitle {
  font-size: 13px;
  color: var(--slate-400);
  line-height: 1.7;
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
}

.welcome-body {
  padding: 30px 36px;
}

.welcome-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.wstat {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
}

.wstat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
}

.wstat-val .unit {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan-500);
}

.wstat-lbl {
  font-size: 10px;
  color: var(--slate-400);
  font-weight: 600;
  margin-top: 5px;
  line-height: 1.3;
}

.welcome-perks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.perk {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.perk-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--cyan-500), #0369a1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.3);
}

.perk-icon svg {
  width: 11px;
  height: 11px;
  color: white;
}

.perk-text {
  font-size: 13px;
  color: var(--slate-700);
  line-height: 1.55;
}

.perk-text strong {
  color: var(--navy-900);
}

.welcome-note {
  font-size: 11px;
  color: var(--slate-400);
  text-align: center;
  line-height: 1.65;
  padding-top: 18px;
  border-top: 1px solid var(--slate-100);
}

.welcome-note strong {
  color: var(--slate-600);
}

/* ── WELCOME EMAIL BOX ── */
.welcome-email-box {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.welcome-email-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-email-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cyan-500), #0369a1);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.25);
}

.welcome-email-icon svg {
  width: 17px;
  height: 17px;
  color: white;
}

.welcome-email-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.2;
  margin-bottom: 4px;
}

.welcome-optional-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-400);
  background: var(--slate-200);
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: 0.3px;
}

.welcome-email-desc {
  font-size: 12px;
  color: var(--slate-600);
  line-height: 1.55;
  margin-top: -4px;
}

.welcome-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
  user-select: none;
  background: white;
}

.check-card:hover {
  border-color: var(--cyan-400);
  background: rgba(56, 189, 248, 0.04);
}

.check-card.selected {
  border-color: var(--cyan-500);
  background: rgba(14, 165, 233, 0.07);
}

.check-card input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--cyan-500);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  pointer-events: none;
}

.check-card span {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-700);
  line-height: 1.4;
}

.check-card.selected span {
  color: var(--navy-900);
  font-weight: 600;
}

/* ─────────────────────────────────────────
   FINAL SCREEN
───────────────────────────────────────── */
.final-head {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  padding: 34px 36px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.final-icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--cyan-500), #0369a1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.final-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.final-title {
  font-size: 22px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.4px;
  position: relative;
  z-index: 1;
}

.final-sub {
  font-size: 12px;
  color: var(--slate-400);
  margin-top: 9px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  max-width: 78%;
  margin-left: auto;
  margin-right: auto;
}

.final-intro {
  padding: 28px 36px 0;
  border-left: 3px solid var(--cyan-400);
  margin: 28px 36px 0;
}

.final-intro p {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.75;
}

.final-body {
  padding: 28px 36px;
}

.final-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-900);
}

.field-label .opt-tag {
  color: var(--slate-400);
  font-weight: 500;
  margin-left: 4px;
}

.field-label .req {
  color: var(--cyan-500);
  margin-left: 2px;
}

.final-note {
  margin-top: 22px;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 11px;
  color: var(--slate-600);
  line-height: 1.65;
}

.final-note strong {
  color: var(--navy-900);
}

.btn-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--cyan-500), #0369a1);
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-main);
  color: white;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
  letter-spacing: 0.2px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(14, 165, 233, 0.5);
}

/* ─────────────────────────────────────────
   THANK-YOU SCREEN
───────────────────────────────────────── */
.thankyou {
  padding: 54px 36px;
  text-align: center;
}

.ty-icon {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--green), #16a34a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.ty-icon svg {
  width: 34px;
  height: 34px;
  color: white;
}

.ty-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 12px;
  letter-spacing: -0.4px;
}

.ty-body {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.75;
  max-width: 400px;
  margin: 0 auto 28px;
}

.ty-body strong {
  color: var(--navy-900);
}

.ty-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-900);
}

/* ─────────────────────────────────────────
   VALIDATION ERROR
───────────────────────────────────────── */
.err-msg {
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  display: none;
}

.has-error .q-input,
.has-error .q-select {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.has-error .err-msg {
  display: block;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 540px) {
  .block-head,
  .q-body,
  .nav-bar,
  .welcome-body,
  .final-body,
  .thankyou {
    padding-left: 20px;
    padding-right: 20px;
  }

  .welcome-head,
  .block-head,
  .final-head {
    padding-left: 20px;
    padding-right: 20px;
  }

  .welcome-stats {
    grid-template-columns: 1fr 1fr;
  }

  .welcome-stats .wstat:last-child {
    grid-column: span 2;
  }

  .scale-btn {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .block-title {
    font-size: 20px;
  }

  .welcome-title {
    font-size: 22px;
  }

  .btn-next,
  .btn-back {
    padding: 11px 18px;
    font-size: 13px;
  }
}
