:root {
  --bg: #0a0e1a;
  --bg-2: #111827;
  --blue: #4f8ef7;
  --teal: #00d4aa;
  --text: #f0f4ff;
  --muted: #9aa6c2;
  --orange: #ff6b35;
  --chip: rgba(79, 142, 247, 0.12);
  --line: rgba(240, 244, 255, 0.12);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-x: max(16px, env(safe-area-inset-left, 0px));
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app {
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  padding-top: var(--safe-top);
  background-clip: content-box;
}

.progress-bar {
  height: 4px;
  width: 20%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.35s ease;
}

.slides {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 16px var(--safe-x) calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.slide.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.wrap {
  width: min(520px, 100%);
  margin: 0 auto;
  padding-bottom: 8px;
}

.brand {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 12px;
  line-height: 1.35;
}

.hero-stat {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 7.2vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 10px;
}

.hero-stat span {
  color: var(--blue);
}

.sub {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.ticker {
  display: flex;
  gap: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  font-size: 0.72rem;
  color: var(--teal);
  font-family: var(--font-display);
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker span {
  animation: ticker 10s linear infinite;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  font-size: 16px; /* prevents iOS zoom on focus */
  min-height: 48px;
}

.field input:focus {
  border-color: var(--blue);
}

.phone-row {
  display: flex;
  gap: 8px;
}

.prefix {
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 1.55rem);
  margin-bottom: 8px;
  line-height: 1.2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 12px 14px;
  min-height: 44px;
  cursor: pointer;
  transition: 0.15s ease;
  font-size: 0.92rem;
}

.chip.selected {
  border-color: var(--blue);
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  min-height: 52px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), #6aa0ff);
  color: #fff;
  margin-top: 8px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.micro {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 10px;
  line-height: 1.4;
}

.q-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.q-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.q-dot.on {
  background: var(--teal);
}

.question {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4.5vw, 1.2rem);
  line-height: 1.35;
  margin-bottom: 14px;
}

.answer {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  min-height: 52px;
  cursor: pointer;
  transition: 0.15s ease;
  font-size: 0.95rem;
  line-height: 1.4;
}

.answer:active,
.answer.selected {
  border-color: var(--blue);
  background: var(--chip);
}

.result-card {
  background: linear-gradient(160deg, #15203a, #0f172a);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.result-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  margin-bottom: 8px;
  line-height: 1.25;
}

.offer {
  background: rgba(79, 142, 247, 0.08);
  border: 1px solid rgba(79, 142, 247, 0.35);
  border-radius: var(--radius);
  padding: 18px;
}

.offer .eyebrow {
  color: var(--orange);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.offer .price {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.25;
}

.offer .price s {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 8px;
}

.offer ul {
  list-style: none;
  margin: 10px 0 14px;
}

.offer li {
  padding: 5px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.offer li::before {
  content: "✓ ";
  color: var(--teal);
  font-weight: 700;
}

.countdown {
  font-family: var(--font-display);
  color: var(--orange);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.pay-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
}

.pay-box .amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
}

.wa-label {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.wa-number {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 14px;
}

.upi-id {
  font-family: ui-monospace, monospace;
  margin: 8px 0 14px;
  color: var(--blue);
  word-break: break-all;
  font-size: 0.95rem;
}

.success {
  text-align: center;
}

.success h2 {
  color: var(--teal);
  font-size: clamp(1.5rem, 6vw, 1.8rem);
}

.error {
  color: #ff8f8f;
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 1.2em;
}

/* Sticky primary action on short phones when keyboard closed */
.form-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  padding-bottom: max(4px, var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
  margin-top: 4px;
}

@media (min-width: 700px) {
  .slide {
    padding: 40px;
    justify-content: center;
  }

  .brand {
    font-size: 0.85rem;
    margin-bottom: 18px;
  }

  .sub {
    margin-bottom: 22px;
  }
}

@media (max-height: 700px) {
  .slide {
    justify-content: flex-start;
  }

  .hero-stat {
    font-size: clamp(1.45rem, 6.5vw, 2.2rem);
  }

  .ticker {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .progress-bar,
  .ticker span {
    transition: none;
    animation: none;
  }
}
