/* UWUPI — Meta ads onboarding landing page. Mobile first. */
:root {
  --ink: #0f1229;
  --ink-2: #3d4566;
  --muted: #6b7394;
  --line: #e3e6f0;
  --soft: #f6f7fb;
  --brand: #7c3aed;
  --brand-dark: #6d28d9;
  --brand-tint: #f3efff;
  --blue: #1f8fff;
  --pink: #e83fd1;
  --green: #25d366;
  --danger: #e11d48;
  --ok: #059669;
  --radius: 16px;
  --grad: linear-gradient(90deg, var(--blue) 0%, var(--brand) 50%, var(--pink) 100%);
  --shadow: 0 30px 70px -28px rgba(76, 29, 149, .38), 0 2px 6px rgba(15, 18, 41, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 100% -10%, #e4dcff 0%, transparent 60%),
    radial-gradient(700px 500px at -10% 30%, #dceaff 0%, transparent 60%),
    linear-gradient(#fbfbff, #f5f2ff);
  min-height: 100vh;
  line-height: 1.5;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand-dark); }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(124, 58, 237, .45); outline-offset: 2px; }

/* Top bar */
.top { padding: 12px 0; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top__logo { height: 52px; width: auto; }
.top__call {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 18, 41, .05);
}
.top__call svg { color: var(--brand); }
.top__call:hover { border-color: #cfd3e6; }
.top__actions { display: flex; align-items: center; gap: 8px; }
.top__phone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 14px; white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(15, 18, 41, .6);
}
.top__phone svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top__phone:hover { background: #1a2547; }
/* Phones: WhatsApp shrinks to its icon (the floating button is there too); the number stays readable. */
@media (max-width: 560px) {
  .top__call span { display: none; }
  .top__call { width: 44px; padding: 0; justify-content: center; }
  .top__phone { padding: 0 12px; font-size: 13px; }
}

/* Layout */
.hero { display: grid; gap: 22px; padding-top: 4px; padding-bottom: 40px; }

/* Pitch */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
h1 { margin-top: 14px; font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 12px; font-size: 1.05rem; color: var(--muted); max-width: 34rem; }

.pitch__visual { display: none; }
.benefits { display: none; }

/* Card */
.card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 18px;
  scroll-margin-top: 12px;
  backdrop-filter: blur(12px);
}
.card__head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: .95rem; margin-top: 4px; }

/* Progress */
.steps { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; }
.steps__item { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #9aa1bd; white-space: nowrap; }
.steps__item span {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--soft); border: 1px solid var(--line); font-size: 12px; transition: all .25s;
}
.steps__item.is-active { color: var(--ink); }
.steps__item.is-active span { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(124, 58, 237, .15); }
.steps__item.is-done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps__item.is-done { color: var(--ink-2); }
.steps__line { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; min-width: 12px; }
.steps__line i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .35s ease; }

/* Steps */
form { margin-top: 10px; }
.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.step.is-active { animation: in .35s ease both; }
@keyframes in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.step__title { padding: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin-bottom: 12px; }

/* Fields */
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .label { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 700; margin-bottom: 7px; padding: 0; color: var(--ink); }
.opt { font-size: 12px; font-weight: 600; color: #9aa1bd; }
input[type="text"], input[type="tel"], input[type="email"], select {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; font-size: 16px; /* 16px stops iOS zoom */
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a84a6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; cursor: pointer;
}
select:invalid { color: #9aa1bd; }
input::placeholder { color: #a3a9c2; }
input:hover, select:hover { border-color: #cdd2e4; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(225, 29, 72, .12) !important; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.error { font-size: 13.5px; font-weight: 600; color: var(--danger); margin-top: 6px; display: none; }
.error.show { display: block; }
.error.show + .hint, .hint:has(+ .error.show) { display: none; }

.phone { display: flex; gap: 8px; }
.phone select { width: 104px; flex-shrink: 0; padding-left: 12px; padding-right: 30px; background-position: right 8px center; }
.phone input { flex: 1; min-width: 0; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 15px; color: var(--ink-2);
  transition: all .15s;
}
.chip:hover span { border-color: #cdd2e4; }
.chip input:checked + span { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(124, 58, 237, .2); }
.chips.invalid .chip span { border-color: #f6a5b7; }

/* Plans */
.plans { display: grid; gap: 10px; }
.plan {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: all .15s;
}
.plan input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan:hover { border-color: #cdd2e4; }
.plan__body { flex: 1; min-width: 0; }
.plan__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; }
.plan__meta { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.plan__tag, .plan__pop { font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.plan__tag { display: none; background: #dcfce7; color: #047857; }
.plan.is-suggested .plan__tag { display: inline-block; }
.plan__pop { background: var(--brand-tint); color: var(--brand-dark); }
.plan__check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cdd2e4; flex-shrink: 0; transition: all .15s; }
.plan:has(input:checked) { border-color: var(--brand); background: #faf8ff; box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }
.plan:has(input:checked) .plan__check { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat; }
.plan:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(124, 58, 237, .22); }
.plan--ghost { border-style: dashed; }
.plans.invalid .plan { border-color: #f6a5b7; }

/* Captcha */
.captcha label { justify-content: flex-start; gap: 6px; }
.captcha label svg { color: var(--ok); }
#captcha-q { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--brand-tint); color: var(--brand-dark); padding: 1px 8px; border-radius: 8px; }
.captcha__row { display: flex; gap: 8px; }
.captcha__row input { width: 110px; text-align: center; font-weight: 700; font-size: 18px; }
.icon-btn { width: 54px; height: 54px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: #cdd2e4; }

/* Buttons */
.actions { display: flex; gap: 10px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 22px;
  border-radius: 999px; border: 0; font-weight: 800; font-size: 16.5px; cursor: pointer; text-decoration: none;
  transition: transform .1s, filter .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn--primary { flex: 1; min-width: 0; white-space: nowrap; padding: 0 18px; background: var(--grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(124, 58, 237, .65); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--primary[disabled] { opacity: .7; cursor: progress; }
.btn--ghost { flex-shrink: 0; background: #fff; border: 1.5px solid var(--line); color: var(--ink-2); padding: 0 18px; }
.btn--ghost:hover { border-color: #cdd2e4; }
.btn--wa { background: var(--green); color: #fff; margin-top: 18px; width: 100%; box-shadow: 0 12px 26px -12px rgba(37, 211, 102, .9); }
.btn--wa svg { width: 22px; height: 22px; }
.btn--wa:hover { filter: brightness(1.05); }
.btn--primary.is-wa { background: var(--green); box-shadow: 0 14px 30px -12px rgba(37, 211, 102, .9); }
.fineprint { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.done { text-align: center; padding: 12px 4px 4px; animation: in .35s ease both; }
.done:focus { outline: none; }
.done__icon {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #34d399, #059669); color: #fff; font-size: 34px; font-weight: 800;
  box-shadow: 0 16px 30px -12px rgba(5, 150, 105, .6);
}
.done h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.done .muted { max-width: 22rem; margin: 8px auto 0; font-size: 1rem; }
.next { list-style: none; margin: 22px 0 0; padding: 16px; border-radius: 16px; background: var(--soft); text-align: left; display: grid; gap: 10px; counter-reset: n; }
.next li { counter-increment: n; display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--ink-2); }
.next b { white-space: nowrap; color: var(--ink); }
.next li::before { content: counter(n); display: inline-grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; }
.link { margin-top: 16px; background: none; border: 0; color: var(--brand-dark); font-weight: 700; cursor: pointer; padding: 8px; }
.link:hover { text-decoration: underline; }

/* Footer + floating WhatsApp */
.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 8px 16px 96px; }
.foot a { color: var(--muted); display: inline-block; padding: 12px 4px; }
.fab {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; box-shadow: 0 14px 30px -10px rgba(37, 211, 102, .9);
  transition: transform .15s;
}
.fab svg { width: 30px; height: 30px; stroke: none; }
.fab:hover { transform: scale(1.06); }

/* Tablet & up */
@media (min-width: 640px) {
  .card { padding: 30px; }
  .top__logo { height: 60px; }
  .plans { grid-template-columns: 1fr 1fr; }
  .plan { align-items: flex-start; }
}

/* Small phones: Back becomes a round arrow so "Send to WhatsApp" fits on one line. */
@media (max-width: 420px) {
  .btn { font-size: 16px; }
  #back { width: 56px; padding: 0; font-size: 0; }
  #back::before { content: "←"; font-size: 20px; }
}
@media (max-width: 380px) {
  .top__call span { display: none; }
  .top__call { width: 44px; padding: 0; justify-content: center; }
  .steps__item { font-size: 0; gap: 0; }
  .steps__item span { font-size: 12px; }
}

/* Desktop: pitch left, form right */
@media (min-width: 1000px) {
  .hero { grid-template-columns: 1fr 480px; gap: 56px; align-items: start; padding-top: 24px; padding-bottom: 56px; }
  .pitch { position: sticky; top: 24px; padding-top: 12px; }
  .lead { font-size: 1.2rem; }
  .pitch__visual { display: block; position: relative; width: 300px; margin: 30px 0 8px 40px; }
  .mascot { width: 300px; height: 300px; border-radius: 50%; object-fit: cover; border: 6px solid #fff; box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
  .bubble { position: absolute; padding: 10px 14px; border-radius: 14px; background: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 14px 30px -12px rgba(15, 18, 41, .3); white-space: nowrap; }
  .bubble--a { left: -40px; top: 34px; }
  .bubble--b { right: -90px; bottom: 40px; }
  .benefits { display: grid; gap: 10px; list-style: none; padding: 0; margin: 24px 0 0; max-width: 30rem; }
  .benefits li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
  .benefits b { min-width: 74px; color: var(--brand-dark); }
  .fab { display: none; }
  .foot { padding-bottom: 28px; }
}
@keyframes float { 50% { transform: translateY(-8px); } }

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

/* Lead submission error (direct submit to /api/lead.php) */
.send-error { margin: 0 0 12px; text-align: center; }
