/* ===== Variables ===== */
:root {
  --navy:      #0F172A;
  --blue:      #2563EB;
  --blue-lt:   #3B82F6;
  --indigo:    #6366F1;
  --white:     #FFFFFF;
  --grey-lt:   #F1F5F9;
  --grey:      #64748B;
  --grey-dk:   #1E293B;
}

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

/* ===== Body & Background ===== */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--grey-lt);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 1rem 5rem;
  position: relative;
  overflow-x: hidden;
}

/* ===== Background decorative orbs ===== */
body::before {
  content: '';
  position: fixed;
  top: -140px;
  right: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  left: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ===== Background grid ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Decorative diamonds ===== */
.deco {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.deco-1 {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(37, 99, 235, 0.18);
  transform: rotate(45deg);
  top: 12%;
  left: 6%;
  animation: float 6s ease-in-out infinite;
}

.deco-2 {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(99, 102, 241, 0.15);
  transform: rotate(45deg);
  top: 55%;
  right: 5%;
  animation: float 8s ease-in-out infinite reverse;
}

.deco-3 {
  width: 18px;
  height: 18px;
  background: rgba(37, 99, 235, 0.12);
  transform: rotate(45deg);
  bottom: 25%;
  left: 8%;
  animation: float 7s ease-in-out infinite;
}

.deco-circle {
  width: 120px;
  height: 120px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 50%;
  top: 70%;
  right: 8%;
  animation: float-circle 9s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: rotate(45deg) translateY(0px); }
  50%       { transform: rotate(45deg) translateY(-12px); }
}

@keyframes float-circle {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ===== Survey wrapper ===== */
.survey-wrapper {
  width: 100%;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ===== Progress wrapper & track ===== */
.progress-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-track {
  flex: 1;
  height: 4px;
  background: rgba(30, 41, 59, 0.12);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.progress-track.visible { opacity: 1; }

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--indigo));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Gift badge ===== */
.gift-badge {
  font-size: 1.2rem;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.4s;
  animation: giftPulse 2.2s ease-in-out infinite;
  cursor: default;
}

.gift-badge.visible { opacity: 1; }

@keyframes giftPulse {
  0%, 100% { transform: scale(1) rotate(-5deg); }
  30%       { transform: scale(1.2) rotate(5deg); }
  60%       { transform: scale(0.95) rotate(-3deg); }
}

/* ===== Step counter ===== */
.step-counter {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  padding: 0.55rem 0 0.35rem;
  min-height: 1.7rem;
  text-align: right;
}

/* ===== Card ===== */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2.5rem 0;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.08),
    0 24px 80px rgba(37, 99, 235, 0.08),
    0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

/* Gradient top border */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--indigo), var(--blue));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Steps ===== */
.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Powered by footer ===== */
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--grey-lt);
  margin-top: 1.5rem;
}

.powered-by span {
  font-size: 0.72rem;
  color: #bbb;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.powered-by a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.powered-by a:hover { opacity: 1; }

.logo-img {
  height: 22px;
  width: auto;
  display: block;
}

/* ===== Gift callout ===== */
.gift-callout {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}

.gift-callout .gift-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.gift-callout-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.25rem;
}

.gift-callout-text p {
  font-size: 0.84rem;
  color: var(--grey);
  line-height: 1.5;
  margin: 0;
}

/* ===== Intro ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: #eff6ff;
  padding: 0.28rem 0.8rem;
  border-radius: 100px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  width: fit-content;
}

.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.intro-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.intro-body {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--grey);
}

.intro-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.intro-list li {
  font-size: 0.92rem;
  color: var(--grey-dk);
  padding-left: 1.5rem;
  position: relative;
}

.intro-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.intro-meta span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 0.28rem 0.8rem;
  border-radius: 100px;
}

.intro-thanks {
  font-size: 0.85rem;
  color: #aaa;
  font-style: italic;
  border-top: 1px solid var(--grey-lt);
  padding-top: 1rem;
}

/* ===== Question step ===== */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
}

.question {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* ===== Option cards ===== */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
  background: #fafbff;
}

.option:hover {
  border-color: var(--blue-lt);
  background: #eff6ff;
}

.option.selected,
.option:has(input:checked) {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s;
  cursor: pointer;
}

.option input[type="radio"]:checked {
  border-color: var(--blue);
  background: var(--blue);
}

.option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.option span {
  font-size: 0.92rem;
  color: var(--grey-dk);
  line-height: 1.45;
}

.option.selected span,
.option:has(input:checked) span {
  color: var(--blue);
  font-weight: 500;
}

/* ===== Validation message ===== */
.validation-msg {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 1.1em;
  opacity: 0;
  transition: opacity 0.2s;
}

.validation-msg.visible { opacity: 1; }

/* ===== Optional / open text ===== */
.optional-note {
  font-size: 0.82rem;
  color: #aaa;
  font-style: italic;
}

textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--grey-dk);
  background: #fafbff;
  resize: vertical;
  min-height: 130px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
}

/* ===== Contact fields ===== */
.step-description {
  font-size: 0.92rem;
  color: var(--grey);
  line-height: 1.6;
}

.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--grey-dk);
}

.optional-label {
  font-weight: 400;
  color: #bbb;
}

.form-group input[type="email"],
.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--grey-dk);
  background: #fafbff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
}

/* ===== Submit error ===== */
.submit-error {
  font-size: 0.88rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.65rem 1rem;
}

.submit-error.hidden { display: none; }

/* ===== Navigation ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--grey-lt);
  margin-top: 0.5rem;
}

.nav--right {
  justify-content: flex-end;
  border-top: 1px solid var(--grey-lt);
  padding: 1.25rem 0 1.5rem;
  margin-top: 0.5rem;
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary,
.btn-submit {
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary,
.btn-submit {
  position: relative;
  background: linear-gradient(90deg, #2563EB, #6366F1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.1s;
  z-index: 0;
}

.btn-primary::after,
.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #3B82F6, #818CF8);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.btn-primary:hover::after,
.btn-submit:hover::after { opacity: 1; }

.btn-primary:hover,
.btn-submit:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-submit:active { transform: scale(0.97); }

.btn-submit:disabled {
  background: #93c5fd;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-submit:disabled::after { display: none; }

.btn-secondary {
  background: transparent;
  color: var(--grey);
  border: 1.5px solid #e2e8f0;
}

.btn-secondary:hover {
  background: var(--grey-lt);
  border-color: #cbd5e1;
  color: var(--blue);
}

/* ===== Thank-you page ===== */
.thankyou-wrapper { max-width: 560px; }

.thankyou-wrapper .card {
  padding: 3.5rem 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

.thankyou-wrapper h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.thankyou-wrapper p {
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.7;
  max-width: 400px;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  body { padding: 1rem 0.75rem 3rem; }
  .card { padding: 1.75rem 1.25rem 0; }
  .intro-title { font-size: 1.3rem; }
  .question { font-size: 1.05rem; }

  .nav {
    flex-direction: column-reverse;
    gap: 0.6rem;
  }

  .btn-primary, .btn-secondary, .btn-submit {
    width: 100%;
    text-align: center;
  }
}
