:root {
  --ink: #0b0c0a;
  --ink-2: #14160f;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f1f2ea;
  --muted: #a4a898;
  --lime: #d4f57a;
  --coral: #ff7f6a;
  --peri: #9ba8ff;
  --teal: #3fd0c0;
  --moss: #5f8f3e;
  --green: #1db954;
  --display: "Unbounded", "Archivo Black", "Arial Black", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- aurora: glow lives at the edges, the middle stays near-black ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.aurora i {
  position: absolute;
  width: 120vmin; height: 90vmin;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
  animation: drift 38s ease-in-out infinite alternate;
}
.aurora .a1 { background: radial-gradient(closest-side, #4f7d2c, transparent); top: -62vmin; left: -30vmin; opacity: 0.85; }
.aurora .a2 { background: radial-gradient(closest-side, var(--coral), transparent); bottom: -64vmin; left: -70vmin; opacity: 0.5; animation-duration: 46s; animation-delay: -12s; }
.aurora .a3 { background: radial-gradient(closest-side, var(--peri), transparent); top: 18%; right: -100vmin; opacity: 0.45; animation-duration: 52s; animation-delay: -20s; }
.aurora .a4 { background: radial-gradient(closest-side, var(--teal), transparent); bottom: -66vmin; right: -60vmin; opacity: 0.5; animation-duration: 44s; animation-delay: -6s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8vmin, 5vmin, 0) scale(1.12); }
  100% { transform: translate3d(-6vmin, 8vmin, 0) scale(0.94); }
}

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.26;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- frame ---------- */
.frame {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  max-width: 34rem;
  margin: 0 auto;
  display: flex; flex-direction: column;
  padding: max(0.75rem, env(safe-area-inset-top)) 1.25rem max(0.75rem, env(safe-area-inset-bottom));
}

.top { display: flex; flex-direction: column; gap: 0.9rem; }
.progress { display: flex; gap: 5px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.progress span::after {
  content: ""; display: block; height: 100%; width: 0;
  background: var(--lime); border-radius: inherit;
  transition: width 0.35s ease;
}
.progress span.done::after { width: 100%; }

.brand {
  display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start;
  color: var(--text); text-decoration: none;
  font: 600 0.8rem/1 var(--display); letter-spacing: 0.02em;
}
.mark { width: 2.4rem; height: 1.5rem; }

/* ---------- steps ---------- */
form { flex: 1; display: flex; flex-direction: column; }
.step { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem 0 1rem; animation: rise 0.45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.step-body { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.step-body.center { align-items: center; text-align: center; }

h1, h2 {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  color: var(--lime);
  line-height: 1; letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.9rem, 9.3vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 8vw, 2.9rem); margin-bottom: 0.4rem; }
h2.coral { color: var(--coral); }
h2.peri { color: var(--peri); }

.eyebrow {
  padding: 0; margin-bottom: 0.9rem;
  font: 700 0.78rem/1.3 var(--body); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--coral);
}
.lede { margin: 0; font-size: 1.2rem; max-width: 26ch; }
.hint, .fine { margin: 0; color: var(--muted); font-size: 0.92rem; }
.hero-mark { width: 9.5rem; height: auto; margin-bottom: 0.5rem; filter: drop-shadow(0 0 22px rgba(212, 245, 122, 0.35)); }

label { display: flex; flex-direction: column; gap: 0.4rem; font-weight: 500; font-size: 0.92rem; color: var(--muted); }
input:not([type="checkbox"], [type="file"]), select {
  width: 100%;
  padding: 0.95rem 1rem;
  font: 500 1.125rem/1.2 var(--body); color: var(--text);
  background: rgba(11, 12, 10, 0.62);
  border: 1.5px solid var(--line); border-radius: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
input::placeholder { color: #6f7366; }
input:not([type="checkbox"], [type="file"]):focus-visible, select:focus-visible { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(212, 245, 122, 0.18), 0 0 30px rgba(212, 245, 122, 0.12); }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

select { appearance: none; -webkit-appearance: none; }
select:invalid, select:has(option[value=""]:checked) { color: #6f7366; }
select option { color: var(--text); background: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 0.8rem; }
.grid2 label { min-width: 0; }

.upload-row { display: flex; flex-direction: column; gap: 0.55rem; padding-bottom: 0.3rem; }
.upload { position: relative; align-self: flex-start; cursor: pointer; }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload span {
  display: inline-block; padding: 0.8rem 1.2rem;
  font: 600 0.82rem/1 var(--display); color: var(--lime);
  border: 1.5px solid var(--lime); border-radius: 999px;
  background: rgba(212, 245, 122, 0.08);
}
.upload:focus-within span { outline: 3px solid var(--peri); outline-offset: 3px; }

.check { flex-direction: row; align-items: flex-start; gap: 0.7rem; color: var(--text); font-size: 0.98rem; cursor: pointer; }
.check input { width: 1.35rem; height: 1.35rem; margin: 0.1rem 0 0; accent-color: var(--lime); flex: none; }

.error { margin: 0 0 0.75rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: rgba(255, 127, 106, 0.14); border: 1px solid rgba(255, 127, 106, 0.5); color: #ffd2ca; font-size: 0.95rem; }

/* ---------- buttons ---------- */
button { font: inherit; cursor: pointer; }
.cta {
  margin-top: 0.6rem;
  padding: 1.05rem 1.6rem;
  font: 600 0.95rem/1 var(--display);
  color: var(--ink); background: var(--lime);
  border: 0; border-radius: 999px;
  box-shadow: 0 0 40px rgba(212, 245, 122, 0.35);
  transition: transform 0.15s;
}
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: scale(0.97); }
.ghost {
  padding: 0.8rem 1.15rem;
  font: 500 0.95rem/1 var(--body); color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--line); border-radius: 999px;
}
.ghost:hover { border-color: rgba(255, 255, 255, 0.4); }
.ghost.danger { color: var(--coral); }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0 0.75rem; }
.nav button { display: grid; place-items: center; border-radius: 50%; border: 0; }
.nav svg { width: 1.6rem; height: 1.6rem; }
.back { width: 3rem; height: 3rem; color: var(--text); background: rgba(255, 255, 255, 0.08); border: 1.5px solid var(--line) !important; }
.next {
  width: 4.5rem; height: 4.5rem;
  color: var(--ink); background: var(--lime);
  box-shadow: 0 0 0 6px rgba(212, 245, 122, 0.14), 0 0 44px rgba(212, 245, 122, 0.4);
  transition: transform 0.15s;
}
.next:hover { transform: scale(1.05); }
.next:active { transform: scale(0.94); }
.next[disabled] { opacity: 0.5; }
:is(button, a):focus-visible { outline: 3px solid var(--peri); outline-offset: 3px; }

/* ---------- halos ---------- */
.halo {
  position: relative;
  display: inline-flex;
  padding: 2.5px;
  border-radius: 999px;
  background: conic-gradient(from var(--spin), var(--lime), var(--teal), var(--peri), var(--coral), var(--green), var(--lime));
  animation: spin 14s linear infinite;
  max-width: 100%;
}
.halo::before {
  content: ""; position: absolute; inset: -5px; z-index: -1;
  border-radius: inherit; background: inherit;
  filter: blur(16px); opacity: 0.75;
}
.halo > span {
  display: block; min-width: 0;
  padding: 0.5rem 0.95rem;
  border-radius: inherit;
  background: var(--ink);
  font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.halo.avatar > span {
  display: grid; place-items: center;
  width: 5.5rem; height: 5.5rem; padding: 0;
  font: 800 1.9rem/1 var(--display); color: var(--lime);
}
.halo.avatar.sm > span { width: 3rem; height: 3rem; font-size: 1rem; }
@keyframes spin { to { --spin: 360deg; } }

/* ---------- results ---------- */
.bridge { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; isolation: isolate; }
.bridge .amp { color: var(--muted); font: 600 0.8rem/1 var(--display); }

.card {
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1.25rem;
  background: rgba(11, 12, 10, 0.6);
  border: 1.5px solid var(--line); border-radius: 24px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  isolation: isolate;
}
.card.hit { border-color: rgba(212, 245, 122, 0.55); box-shadow: 0 0 60px rgba(212, 245, 122, 0.12); }
.who { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.who > div:last-child { min-width: 0; }
.who .name { font: 800 1.35rem/1.1 var(--display); overflow-wrap: anywhere; }
.who .verdict { color: var(--lime); font-weight: 700; margin-top: 0.3rem; }
.who .verdict.maybe { color: var(--peri); }
.contact { padding: 0.8rem 1rem; border-radius: 14px; background: rgba(212, 245, 122, 0.1); overflow-wrap: anywhere; }
.contact small { display: block; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.contact b { font-size: 1.15rem; }
.reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.reasons li { padding: 0.3rem 0.65rem; border-radius: 999px; font-size: 0.82rem; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.section-label { margin: 0.6rem 0 0; font: 700 0.78rem/1.3 var(--body); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

.pulse { display: flex; gap: 6px; align-items: center; height: 3rem; }
.pulse i { width: 6px; height: 100%; border-radius: 6px; background: var(--lime); animation: bars 1s ease-in-out infinite; transform-origin: center; }
.pulse i:nth-child(2) { animation-delay: 0.15s; background: var(--teal); }
.pulse i:nth-child(3) { animation-delay: 0.3s; background: var(--peri); }
.pulse i:nth-child(4) { animation-delay: 0.45s; background: var(--coral); }
@keyframes bars { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.poster { width: 100%; max-width: 19rem; height: auto; align-self: center; border-radius: 22px; border: 1.5px solid var(--line); box-shadow: 0 0 70px rgba(155, 168, 255, 0.18); }
.row.mid { justify-content: center; }
.row.mid .cta { margin-top: 0; }

.group { border: 0; margin: 0; padding: 0.4rem 0 0; min-width: 0; display: flex; flex-direction: column; gap: 0.95rem; }
.group .eyebrow { margin-bottom: 0.2rem; }
.hint.ok { color: var(--lime); }
.hint.warn { padding: 0.8rem 1rem; border-radius: 14px; border: 1px solid rgba(155, 168, 255, 0.4); background: rgba(155, 168, 255, 0.1); color: var(--text); }
.cta[disabled] { opacity: 0.5; }
.step:not([data-step="intro"]) { justify-content: flex-start; }

.callout { margin: 0; padding: 0.9rem 1.05rem; border-radius: 16px; border: 1.5px solid rgba(212, 245, 122, 0.45); background: rgba(212, 245, 122, 0.09); color: var(--text); font-size: 1rem; }

.foot { padding: 0.6rem 0 0.2rem; text-align: center; color: #7d8174; font-size: 0.78rem; }

@media (min-width: 40rem) {
  .frame { padding-top: 1.75rem; padding-bottom: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora i, .halo, .pulse i, .step { animation: none; }
  .pulse i { transform: scaleY(0.6); }
  * { transition: none !important; }
}
