/* HealthyWallet quiz – KashKick (based on live 19100630, Scrambly).
   CSS copied from the live page; only the unused tooltip styles were removed. */

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

html, body {
  height: 100vh;
  height: 100dvh;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: linear-gradient(160deg, #0d1117 0%, #071a10 100%);
}

main {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#confettiCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ===== LAYOUT ===== */
.screens-area {
  flex: 1;
  min-height: 0;
  max-height: 480px;
  overflow: hidden;
  position: relative;
}

.screens-wrapper {
  display: flex;
  width: 400%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.screen {
  width: 25%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.screen-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  padding: clamp(4px, 1.5dvh, 14px) 16px;
  gap: clamp(8px, 2dvh, 16px);
}

/* ===== FOOTER ===== */
.global-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(4px, 1dvh, 10px) 20px clamp(6px, 1dvh, 12px);
  gap: clamp(2px, 0.5dvh, 6px);
  flex-shrink: 0;
}

/* ===== LOGO ===== */
.logo-header {
  display: none;
  justify-content: center;
  flex-shrink: 0;
}

#screen-4 .logo-header {
  display: flex;
}

.partner-logo {
  height: clamp(34px, 6.5dvh, 58px);
  width: auto;
}

/* ===== HEADLINES ===== */
.headline {
  text-align: center;
  text-transform: uppercase;
  font-weight: 900;
  font-size: clamp(20px, 3.8vw, 26px);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.headline--green { color: #00d68f; text-shadow: 0 0 24px rgba(0,214,143,0.3); }
.headline--white { color: #ffffff; }

.sub-headline {
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  font-size: clamp(11px, 2.6vw, 15px);
  line-height: 1.2;
  color: rgba(255,255,255,0.55);
}

/* ===== CARDS (shared) ===== */
.card {
  background: #ffffff;
  border-radius: 16px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card:active { transform: scale(0.94); }

.card.selected {
  border-color: #00d68f;
  box-shadow: 0 0 22px rgba(0,214,143,0.5);
}

/* ===== SCREEN 1: Brand Grid (2x4) ===== */
.grid-2x4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(4px, 1dvh, 10px) clamp(6px, 2vw, 14px);
  width: 100%;
  flex: 1;
  min-height: 0;
}

.brand-card {
  min-height: 0;
  padding: 8px;
}

.brand-card img {
  max-width: 58%;
  max-height: 78%;
  object-fit: contain;
}

/* Two logos in one card (stacked, thin divider between them) */
.brand-card--duo {
  flex-direction: column;
  gap: clamp(4px, 0.9dvh, 8px);
}

.brand-card--duo img {
  max-width: 62%;
  max-height: 30%;
}

/* Square/tall icon (Apple) needs more height to look the same size as a wide wordmark */
.brand-card--duo img.duo-icon {
  max-height: 40%;
}

.duo-divider {
  width: 36%;
  height: 1px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* ===== SCREEN 2: Goal Grid (2x2) ===== */
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(8px, 1.8dvh, 16px) clamp(8px, 2vw, 16px);
  width: 100%;
  flex: 1;
  min-height: 0;
}

.goal-card {
  min-height: 0;
  padding: 10px;
}

.goal-card span {
  font-size: clamp(26px, 8vw, 46px);
  font-weight: 900;
  color: #0a4f35;
  letter-spacing: -0.03em;
}

/* ===== SCREEN 3: Style Stack ===== */
#screen-3 { max-height: 700px; }

.card-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 1dvh, 11px);
  width: 100%;
  flex: 1;
  min-height: 0;
}

.style-card {
  flex: 1;
  min-height: 0;
  flex-direction: row;
  gap: 14px;
  padding: clamp(10px, 1.8dvh, 18px) 24px;
  justify-content: center;
  border-radius: 16px;
}

.card-emoji { font-size: clamp(24px, 3.6vw, 32px); line-height: 1; }

.card-label {
  font-size: clamp(15px, 2.5vw, 19px);
  font-weight: 700;
  color: #111827;
}

/* ===== SCREEN 4: Results ===== */
.screen-4-content { justify-content: center; }

.result-link {
  display: block;
  width: 100%;
  max-width: 420px;
  text-decoration: none;
  color: inherit;
}

.result-card {
  background: #ffffff;
  border-radius: 20px;
  padding: clamp(14px, 2.5dvh, 26px) clamp(14px, 4vw, 26px);
  text-align: center;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,214,143,0.2);
}

.result-text {
  font-size: clamp(13px, 3.2vw, 15px);
  color: #222;
  line-height: 1.5;
  margin-bottom: 8px;
  font-weight: 400;
}

.result-payoff {
  font-size: clamp(13px, 3.2vw, 15px);
  color: #222;
  line-height: 1.5;
  font-weight: 400;
}

.nowrap { white-space: nowrap; }

.payoff-highlight {
  color: #ee9500;
  font-weight: 700;
}

.payoff-highlight--congrats {
  font-size: clamp(19px, 4.2vw, 23px);
  display: block;
  margin-bottom: 8px;
}

.payoff-highlight--brand {
  color: #00a86b;
  font-weight: 700;
}

/* ===== CTA BUTTON ===== */
.cta-button {
  display: block;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(90deg, #00d68f, #00b578);
  color: #041f12;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(16px, 3vw, 18px);
  text-align: center;
  text-decoration: none;
  padding: 24px 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(0,214,143,0.4);
  letter-spacing: 0.02em;
}

.cta-button:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(0,214,143,0.55);
}

.cta-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0,214,143,0.3);
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(0,214,143,0.4); }
  50%       { box-shadow: 0 6px 30px rgba(0,214,143,0.65); }
}

.cta-button.pulse { animation: ctaPulse 2s ease-in-out infinite; }

/* Keep the CTA on one line on very narrow screens (320px) */
@media (max-width: 340px) {
  .cta-button { padding-left: 8px; padding-right: 8px; letter-spacing: 0; }
}

/* ===== SOCIAL PROOF ===== */
.social-proof {
  font-size: clamp(12px, 2.3vw, 15px);
  color: rgba(255,255,255,0.65);
  text-align: center;
  flex-shrink: 0;
}

/* ===== PROGRESS BAR ===== */
.progress-section {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.step-label {
  font-size: clamp(10px, 2.2vw, 13px);
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 1.5px;
  transition: opacity 0.3s ease;
}

.progress-track {
  width: 100%;
  height: clamp(22px, 2.8vw, 30px);
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d68f, #00b578);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { left: -60%; }
  100% { left: 120%; }
}

.progress-fill span {
  font-size: clamp(10px, 1.8vw, 12px);
  font-weight: 700;
  color: #041f12;
  position: relative;
  z-index: 1;
}

.progress-fill.done {
  background: linear-gradient(90deg, #00d68f, #00ff9d);
  box-shadow: 0 0 14px rgba(0,214,143,0.5);
}

/* ===== ENTRANCE ANIMATIONS ===== */
.anim-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen.active .anim-item { opacity: 1; transform: translateY(0); }

.screen.active .anim-item:nth-child(1)  { transition-delay: 0.05s; }
.screen.active .anim-item:nth-child(2)  { transition-delay: 0.10s; }
.screen.active .anim-item:nth-child(3)  { transition-delay: 0.15s; }
.screen.active .anim-item:nth-child(4)  { transition-delay: 0.20s; }
.screen.active .anim-item:nth-child(5)  { transition-delay: 0.25s; }
.screen.active .anim-item:nth-child(6)  { transition-delay: 0.30s; }
.screen.active .anim-item:nth-child(7)  { transition-delay: 0.35s; }
.screen.active .anim-item:nth-child(8)  { transition-delay: 0.40s; }
.screen.active .anim-item:nth-child(9)  { transition-delay: 0.45s; }
.screen.active .anim-item:nth-child(10) { transition-delay: 0.50s; }

.screen.active .screen-content > .anim-item:nth-child(1) { transition-delay: 0.00s; }
.screen.active .screen-content > .anim-item:nth-child(2) { transition-delay: 0.08s; }
.screen.active .screen-content > .anim-item:nth-child(3) { transition-delay: 0.16s; }
.screen.active .screen-content > .anim-item:nth-child(4) { transition-delay: 0.24s; }
.screen.active .screen-content > .anim-item:nth-child(5) { transition-delay: 0.32s; }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  }
}

@keyframes selectPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.07); }
  100% { transform: scale(1); }
}

.card.selected { animation: selectPop 0.25s ease; }

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .screens-area { max-height: 640px; }

  .style-card {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: clamp(22px, 4dvh, 48px) 16px;
  }

  .screen-content { max-height: 700px; max-width: 480px; }
  .global-footer { max-width: 480px; margin: 0 auto; }
  .partner-logo { height: clamp(46px, 7.5dvh, 72px); }
  .headline { font-size: clamp(18px, 2.7vw, 26px); }
  .goal-card span { font-size: clamp(32px, 4vw, 42px); }
}

@media (min-width: 1024px) {
  .headline { font-size: clamp(20px, 1.8vw, 28px); }
  .sub-headline { font-size: clamp(12px, 1.3vw, 17px); }
  .card-label { font-size: clamp(14px, 1.3vw, 20px); }
}

/* ===== COMPLIANCE FOOTER =====
   Sits below the one-screen quiz (a fixed 100dvh block above it),
   so it never shows above the fold – only reachable by scrolling. */
.compliance-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
}

.compliance-links {
  margin-bottom: 12px;
}

.compliance-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
}

.compliance-links .dot {
  display: inline-block;
  margin: 0 8px;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
}

.compliance-disclaimer { margin-bottom: 10px; }
.compliance-copyright { color: rgba(255,255,255,0.3); }
