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

:root {
  --bg-page: #f3f4f6;
  --bg-card: #ffffff;
  --bg-soft: #f9fafb;
  --accent: #22c55e;
  --accent-strong: #16a34a;
  --accent-soft: #bbf7d0;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --danger: #dc2626;
  --focus-ring: #2563eb;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100%;
}

::selection {
  background: #111827;
  color: #ffffff;
}

body {
  display: flex;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 520px;
  margin: 16px;
}

.shell {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.07),
    0 0 0 1px rgba(148, 163, 184, 0.2);
  padding: 18px 18px 20px;
  min-height: 98vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .shell {
    padding: 22px 24px 26px;
  }
}

/* HEADER */

.top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

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

.brand-dot {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #4ade80, #22c55e 40%, #0ea5e9 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* PROGRESS */

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.25s ease-out;
}

.progress-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* STEPS */

.steps {
  margin-top: 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.step {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.22s ease-out;
}

.step-active {
  display: flex;
}

.headline {
  font-size: 1.2rem;
  margin: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #111827;
}

.sub {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.question {
  margin: 4px 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-card {
  margin-top: 4px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: #ecfdf3;
  border: 1px solid var(--accent-soft);
  font-size: 0.96rem;
  color: #14532d;
}

/* OPTIONS */

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.opt {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.18s ease;
}

.opt::after {
  content: "→";
  font-size: 0.9rem;
  color: var(--text-muted);
}

.opt:hover {
  border-color: #a3e635;
  background: #f1f5f9;
  transform: translateY(-1px);
}

.opt.opt-selected {
  border-color: var(--accent);
  background: #ecfdf3;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

/* FIELDS */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.field span {
  font-size: 0.96rem;
  color: #111827;
}

.field input,
.field select {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  padding: 9px 11px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.18s ease;
}

.field input::placeholder {
  color: #9ca3af;
}

.field input:focus,
.field select:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.45);
}

.error {
  margin: 0;
  font-size: 0.82rem;
  color: var(--danger);
  min-height: 1em;
}

/* GRID */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* PHONE */

.phone {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-prefix {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  font-size: 0.95rem;
  color: #374151;
}

.phone input {
  flex: 1;
}

/* NAV BUTTONS */

.nav {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.btn {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(34, 197, 94, 0.4);
}

.btn-ghost {
  background: #f9fafb;
  color: #374151;
  border: 1px solid var(--border-soft);
}

.btn-ghost:hover {
  background: #e5e7eb;
}

/* THANK YOU / RESULT */

.thankyou {
  gap: 0;
}

.success-section {
  background: #ffffff;
  padding: 18px 10px 14px;
  text-align: center;
  border-bottom: 3px solid #10b981;
}

.checkmark {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.checkmark svg {
  width: 40px;
  height: 40px;
  stroke: white;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
}

.success-section h1 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.success-section p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* PHONE ALERT */

.phone-alert {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 18px 12px 20px;
  position: relative;
}

.phone-alert h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  text-align: center;
}

.time-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.phone-alert p {
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: center;
}

/* VIDEO SECTION */

.video-section {
  background: #fef3c7;
  padding: 18px 12px 14px;
  border-top: 3px solid #f59e0b;
}

.video-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.video-section h3 {
  margin: 0 0 6px;
  color: #78350f;
  font-size: 1rem;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  margin: 8px 0 10px;
}

.video-container > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-benefits {
  display: grid;
  gap: 8px;
}

.video-benefit {
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #10b981;
  font-size: 0.86rem;
}

/* FOOTER */

.footer {
  margin-top: 16px;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

.footer-links {
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.link-btn {
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.footer-legal {
  margin: 0;
  line-height: 1.5;
}

.divider {
  color: #9ca3af;
}

/* POPUP */

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  padding: 15px;
  justify-content: center;
  align-items: center;
}

.popup-overlay.active {
  display: flex;
}

.popup-container {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.popup-header {
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background-color: #fafafa;
}

.popup-header h2 {
  margin: 0;
  font-size: 0.95rem;
  color: #4b5563;
  font-weight: 500;
  padding-right: 30px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: #9ca3af;
  cursor: pointer;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.popup-content {
  padding: 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.popup-content h3 {
  margin: 14px 0 6px;
  font-size: 0.95rem;
  color: #111827;
}

.popup-content p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.5;
}

.popup-footer {
  padding: 14px 18px;
  border-top: 1px solid #e5e7eb;
  background-color: #fafafa;
  text-align: right;
}

.accept-btn {
  background-color: #22c55e;
  color: white;
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ANIMATIONS */

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