/* ═══ SIGN-UP, ONE QUESTION AT A TIME (2026-11-10)
   Owner: "make it more friendly and easier to fill in, inspired by the Advanto onboarding
   page". Same language as the app's first run (public/meta-start/live-onboarding.css):
   soft daylight behind everything, one question per screen, a progress bar, big rounded
   fields, and cards you tap that light up when chosen. Loaded after app-look.css on
   signup.html only. */

/* Daylight background with slow drifting colour, as in the onboarding. */
.sx-page { position: relative; min-height: 100vh; overflow: hidden;
  background: linear-gradient(165deg, #effcf6 0%, #f1f0ff 48%, #fff4ec 100%); }
.sx-page > .shape-canvas { display: none; }
.sx-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.sx-bg i { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .75; animation: sxDrift 19s ease-in-out infinite alternate; }
.sx-bg i:nth-child(1) { width: 60vmax; height: 60vmax; left: -24vmax; top: -30vmax; background: #c6f4e1; }
.sx-bg i:nth-child(2) { width: 52vmax; height: 52vmax; right: -22vmax; top: 10vmax; background: #e2dcff; animation-duration: 23s; }
.sx-bg i:nth-child(3) { width: 48vmax; height: 48vmax; left: 10vmax; bottom: -30vmax; background: #ffe2c8; animation-duration: 27s; }
@keyframes sxDrift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .sx-bg i { animation: none; } }
.sx-page .hero-inner { position: relative; z-index: 1; width: 100%; padding: clamp(96px, 14vh, 150px) var(--gutter, 20px) clamp(48px, 8vh, 90px);
  display: flex; justify-content: center; }
.sx-page .hero-chat { width: min(100%, 760px); text-align: left; }
.sx-page .hero-h1v2 { font-size: clamp(38px, 5.4vw, 88px); line-height: 1.04; margin: 10px 0 0; }
.sx-page .signup-sub { max-width: none; font-size: clamp(17px, 1.5vw, 24px); color: var(--ink-2); margin: 12px 0 0; }

/* The card that holds the questions. */
.sx { max-width: none; margin: clamp(22px, 4vh, 36px) 0 0; padding: clamp(20px, 3vw, 40px);
  background: rgba(255, 255, 255, .92); border: 2px solid var(--line); border-radius: 28px; box-shadow: 0 6px 0 var(--line);
  display: flex; flex-direction: column; gap: 16px; }
.sx-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 900; font-size: clamp(14px, 1.1vw, 18px); color: var(--ink-2); }
.sx-bar { height: 14px; border-radius: 99px; background: #e6eef1; overflow: hidden; }
.sx-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #58cc02; transition: width .35s ease; }
.sx-step { display: flex; flex-direction: column; gap: 14px; animation: sxIn .28s ease both; }
.sx-step[hidden] { display: none; }
@keyframes sxIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sx-step { animation: none; } }
.sx-step h2 { font-size: clamp(26px, 3.2vw, 46px); line-height: 1.1; margin: 6px 0 4px; }

.sx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sx-field { display: flex; flex-direction: column; gap: 8px; }
.sx-field > span { font-weight: 900; font-size: clamp(15px, 1.1vw, 19px); color: var(--ink); }
.sx-field small { font-weight: 700; color: var(--muted); margin-left: 6px; }
.sx-field input, .sx-field textarea { width: 100%; font: 750 clamp(17px, 1.3vw, 22px) var(--font); color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: 0 3px 0 var(--line); }
.sx-field input:focus, .sx-field textarea:focus { outline: none; border-color: #58cc02; box-shadow: 0 3px 0 #58cc02; }
.sx-field textarea { resize: vertical; min-height: 96px; }

/* Cards you tap: logo + name, lit green when chosen. */
.sx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sx-card { position: relative; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.sx-card > input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.sx-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: clamp(104px, 11vw, 150px);
  padding: 14px 10px; background: #fff; border: 2px solid var(--line); border-radius: 20px; box-shadow: 0 4px 0 var(--line);
  transition: transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .12s ease; }
.sx-face b { font-weight: 900; font-size: clamp(15px, 1.15vw, 20px); color: var(--ink); text-align: center; }
.sx-face .plug { width: clamp(44px, 3.6vw, 60px); height: clamp(44px, 3.6vw, 60px); border-radius: 14px; box-shadow: none; }
.sx-face .plug svg { width: 56%; height: 56%; }
.plug.whatsapp { background: #25d366; display: inline-flex; align-items: center; justify-content: center; }
.sx-card:hover .sx-face { transform: translateY(-1px); }
.sx-card:active .sx-face { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.sx-card > input:checked + .sx-face { background: #effbe3; border-color: #58cc02; box-shadow: 0 4px 0 #58cc02; }
.sx-card > input:checked + .sx-face::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: #58cc02; color: #fff; font-weight: 1000; font-size: 15px; display: grid; place-items: center; }
.sx-card > input:focus-visible + .sx-face { outline: 3px solid #1cb0f6; outline-offset: 2px; }
.sx-handle { font: 750 15px var(--font); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.sx-handle:disabled { display: none; }

.sx-check { display: flex; align-items: center; gap: 12px; font-weight: 850; font-size: clamp(15px, 1.1vw, 19px); cursor: pointer; }
.sx-check input { width: 24px; height: 24px; accent-color: #58cc02; }

.sx-error { margin: 0; padding: 12px 16px; border-radius: 16px; background: #fff0ee; border: 2px solid #ffb8ae; color: #a8321f; font-weight: 850; }
.sx-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; margin-top: 4px; }
.sx-actions .btn { justify-content: center; width: 100%; }
.sx .price-note { margin: 0; text-align: center; color: var(--muted); font-weight: 750; }

/* The thank-you, on the same card. */
.sx-page .signup-done { max-width: none; margin-top: 24px; padding: clamp(20px, 3vw, 36px); background: rgba(255, 255, 255, .92);
  border: 2px solid var(--line); border-radius: 28px; box-shadow: 0 6px 0 var(--line); }
.sx-page .signup-done .chat-bubble { font-size: clamp(16px, 1.3vw, 21px); }

@media (max-width: 640px) {
  .sx-row { grid-template-columns: 1fr; }
  .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-grid:not(.sx-grid-6) .sx-card:last-child:nth-child(odd) { grid-column: span 2; }
}

/* Beat the old single-page form rules (style.css .signup-form …) on this card. */
.sx [hidden], .sx .btn[hidden] { display: none !important; }
.sx label { font-size: inherit; font-weight: inherit; text-transform: none; letter-spacing: normal; color: inherit; }
.sx label span { display: inline; }
.sx .sx-field { display: flex; flex-direction: column; gap: 8px; }
.sx .sx-field > span { display: block; font-weight: 900; font-size: clamp(15px, 1.1vw, 19px); color: var(--ink); }
.sx .sx-card { display: flex; flex-direction: column; gap: 10px; }
.sx .sx-face { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sx .sx-face b { display: block; font-weight: 900; font-size: clamp(15px, 1.15vw, 20px); color: var(--ink); text-transform: none; letter-spacing: normal; }
.sx .sx-handle { padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 15px; }
.sx .sx-check { display: flex; flex-direction: row; align-items: center; gap: 12px; font-weight: 850; }
.sx .btn { font-family: var(--font); margin-top: 0; }
.sx-actions { align-items: stretch; }
.sx-actions:has(#sx-submit:not([hidden])) #sx-next { display: none !important; }
.sx[hidden], .sx-page .signup-done[hidden] { display: none !important; }
.sx-page .signup-done .chat-msg { display: flex; align-items: flex-start; gap: 12px; }
.sx-page .signup-done .chat-ava { width: 48px; height: 48px; flex: none; }
