:root {
  --bg: #05070c;
  --text: #f3f5fa;
  --muted: #8b93a7;
  --dim: #5b6377;
  --line: rgba(255, 255, 255, .08);
  --field: #0a0d15;
  --field-line: rgba(255, 255, 255, .12);
  --green: #25d366;
  --green-soft: #5ee38d;
  --blue: #4f7dff;
  --blue-deep: #2f55e6;
  --red: #ff6b6b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* soft background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at 50% -5%, rgba(79, 125, 255, .22), transparent 70%),
    radial-gradient(60% 40% at 50% 105%, rgba(37, 211, 102, .10), transparent 70%);
}

.wrap { width: 100%; max-width: 420px; }

.top-note {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.top-note i { width: 4px; height: 4px; margin-top: 7px; border-radius: 50%; background: var(--blue); }

.card {
  position: relative;
  padding: 30px 20px 22px;
  border: 1px solid rgba(110, 140, 255, .18);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(20, 25, 40, .94), rgba(11, 14, 22, .96));
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .8), 0 0 60px -20px rgba(79, 125, 255, .35);
  text-align: center;
  animation: rise .55s cubic-bezier(.2, .8, .2, 1) both;
}
.card.success { border-color: rgba(37, 211, 102, .2); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .8), 0 0 60px -20px rgba(37, 211, 102, .3); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.app-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  border-radius: 21px;
  background: linear-gradient(160deg, #6ee89a, #1fb457);
  box-shadow: 0 0 0 7px rgba(37, 211, 102, .08), 0 12px 40px rgba(37, 211, 102, .38);
  animation: float 4s ease-in-out infinite;
}
.app-icon.round { border-radius: 50%; }
.app-icon svg { width: 36px; height: 36px; fill: #fff; }
@keyframes float { 50% { transform: translateY(-4px); } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(37, 211, 102, .35);
  border-radius: 999px;
  background: rgba(37, 211, 102, .08);
  color: var(--green-soft);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.pill svg { width: 13px; height: 13px; fill: currentColor; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

h1 {
  margin: 14px 0 8px;
  font-size: clamp(26px, 7.6vw, 32px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.sub { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.sub b { color: var(--text); font-weight: 700; }

/* ── Form ─────────────────────────────── */
form { margin-top: 24px; text-align: left; }

.lbl {
  display: block;
  margin: 0 0 9px 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

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

.cc {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 56px;
  padding: 0 11px 0 13px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: var(--field);
  font-size: 16px;
  font-weight: 700;
  transition: border-color .2s, box-shadow .2s;
}
.cc { color: var(--text); font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cc .flag { font-size: 21px; line-height: 1; }
.cc .chev { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2.4; transition: transform .2s; }
.cc[aria-expanded="true"] .chev { transform: rotate(180deg); }
.cc:focus-visible, .cc[aria-expanded="true"] { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 125, 255, .25); }
.cc:active { transform: scale(.97); }

/* ── Country search dropdown ──────────── */
.phone-wrap { position: relative; }

.cc-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid rgba(110, 140, 255, .28);
  border-radius: 18px;
  background: #0b0f1a;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .85), 0 0 40px -16px rgba(79, 125, 255, .45);
  animation: drop .18s ease-out both;
}
.cc-panel[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.cc-search { position: relative; padding: 10px; border-bottom: 1px solid var(--line); }
.cc-search svg {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  pointer-events: none;
}
.cc-search input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid rgba(110, 140, 255, .55);
  border-radius: 12px;
  outline: none;
  background: #070a12;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px stops iPhone from zooming in */
  font-weight: 500;
}
.cc-search input::placeholder { color: #5b6377; }
.cc-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 125, 255, .2); }

.cc-list {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.cc-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.cc-opt .f { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.cc-opt .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-opt .d { flex: 0 0 auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-opt.is-active, .cc-opt:active { background: rgba(79, 125, 255, .12); }
.cc-opt[aria-selected="true"] { background: rgba(79, 125, 255, .18); box-shadow: inset 3px 0 0 var(--blue); }
.cc-opt[aria-selected="true"] .d { color: #9db4ff; }
@media (hover: hover) { .cc-opt:hover { background: rgba(255, 255, 255, .05); } }

.cc-empty { padding: 22px 16px; color: var(--muted); font-size: 14px; text-align: center; }

/* While the dropdown is open: card stays put, extra room below lets the page scroll above the keyboard */
body.picker-open { align-items: flex-start; padding-bottom: 75vh; }

.num {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  outline: none;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: border-color .2s, box-shadow .2s;
}
.num::placeholder { color: #485066; font-weight: 500; }
.num:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 125, 255, .25); }

.invalid .num { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 107, 107, .18); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.err { min-height: 20px; margin: 7px 2px 4px; color: var(--red); font-size: 13px; font-weight: 600; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Buttons ──────────────────────────── */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  padding: 0 52px;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #6b8eff, var(--blue-deep));
  box-shadow: 0 14px 34px -10px rgba(79, 125, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .6); outline-offset: 3px; }
.btn .wa { position: absolute; left: 18px; width: 25px; height: 25px; fill: #fff; }
.btn .arrow { position: absolute; right: 18px; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.btn::after { /* light sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: sweep 3.2s ease-in-out 1s infinite;
}
@keyframes sweep { 40%, 100% { transform: translateX(100%); } }

.btn.green {
  background: linear-gradient(135deg, #48e386, #1eb456);
  box-shadow: 0 14px 34px -10px rgba(37, 211, 102, .6), inset 0 1px 0 rgba(255, 255, 255, .3);
  text-transform: none;
  letter-spacing: 0;
  font-size: 17px;
}

.btn[aria-busy="true"] { pointer-events: none; filter: saturate(.8); }
.btn[aria-busy="true"] .label, .btn[aria-busy="true"] .arrow { opacity: 0; }
.btn[aria-busy="true"]::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
.note svg { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.consent { margin-top: 8px; color: var(--dim); font-size: 11.5px; line-height: 1.5; text-align: center; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.perk {
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.perk svg { display: block; width: 20px; height: 20px; margin: 0 auto 6px; fill: none; stroke: var(--green-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Thank-you steps ───────────────────── */
.steps { display: grid; gap: 10px; margin: 22px 0; text-align: left; list-style: none; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 600; counter-increment: s; }
.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(37, 211, 102, .12);
  color: var(--green-soft);
  font-size: 14px;
  font-weight: 800;
}

.small { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.divider { height: 1px; margin: 20px 0 16px; background: var(--line); }

@media (min-width: 480px) {
  .card { padding: 36px 30px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
