/* ==========================================================================
   Clique Studio - ad capture funnel
   Same tokens as cliquestudio.online (bold editorial dark, sharp corners,
   hairline rules, pink accent with a neon bloom). Mobile first: one column,
   thumb-zone CTAs, 16px+ inputs so iOS never zooms.
   ========================================================================== */

:root {
  --c-bg: #0A0A0A;
  --c-fg: #FAFAFA;
  --c-card: #141414;
  --c-card-hi: #1C1C1F;
  --c-muted-fg: #A1A1AA;
  --c-soft: #D4D4D8;
  --c-border: #27272A;
  --c-border-strong: #71717A;
  --c-accent: #EC4899;
  --c-accent-hover: #F472B6;
  --c-on-accent: #0A0A0A;
  --c-secondary: #22D3EE;
  --c-danger: #FF6B6B;
  --c-success: #4ADE80;
  --glow-pink: 236 72 153;

  --f-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --gutter: 20px;
  --w: 520px;
  --bar-h: 58px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--c-bg); }
body {
  margin: 0; min-height: 100dvh;
  background: var(--c-bg); color: var(--c-fg);
  font: 400 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ol, ul, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
a { color: var(--c-secondary); }
:focus-visible { outline: 2px solid var(--c-secondary); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.pink { color: var(--c-accent); }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar-h);
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  max-width: var(--w); margin: 0 auto; padding: 0 calc(var(--gutter) - 12px);
  padding-top: env(safe-area-inset-top);
  background: rgb(10 10 10 / .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--c-border); }
.wordmark {
  grid-column: 2; justify-self: center;
  font: 800 20px/1 var(--f-display); letter-spacing: -.03em;
}
.wordmark .dot { color: var(--c-accent); }
.wordmark .sub { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted-fg); margin-left: 6px; vertical-align: 2px; }
.bar__back {
  grid-column: 1; width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; color: var(--c-fg); cursor: pointer;
  visibility: hidden;
}
.bar__count { grid-column: 3; justify-self: end; padding-right: 8px; font: 500 11px/1 var(--f-mono); letter-spacing: .1em; color: var(--c-muted-fg); }
.bar__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 1; }
.bar__progress i {
  display: block; height: 100%; width: 0;
  background: var(--c-accent); box-shadow: 0 0 12px rgb(var(--glow-pink) / .8);
  transition: width .5s var(--ease);
}
body:not([data-step="0"]):not([data-step="4"]) .bar__back { visibility: visible; }

/* ---------- Screens ---------- */
.funnel { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.screen { display: none; position: relative; padding: 28px 0 32px; }
.screen.is-active { display: block; animation: enter .45s var(--ease) both; }
.screen.is-back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

.glow {
  position: absolute; z-index: -1; pointer-events: none;
  top: -40px; right: -120px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--glow-pink) / .30), transparent);
  filter: blur(10px);
}

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font: 500 11.5px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: 14px;
}
.eyebrow--cyan { color: var(--c-secondary); margin: 36px 0 14px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 0 rgb(var(--glow-pink) / .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgb(var(--glow-pink) / 0); } 100% { box-shadow: 0 0 0 0 rgb(var(--glow-pink) / 0); } }

h1, h2 {
  font: 800 clamp(40px, 11.5vw, 56px)/.98 var(--f-display);
  letter-spacing: -.04em; text-wrap: balance;
}
h1 .pink, h2 .pink { text-shadow: 0 0 34px rgb(var(--glow-pink) / .45); }
.lead { margin-top: 18px; font-size: 17px; line-height: 1.55; color: var(--c-soft); max-width: 34ch; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li {
  font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-soft); border: 1px solid var(--c-border-strong); padding: 8px 10px;
}
.chips li:first-child { color: var(--c-fg); border-color: var(--c-accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border: 1px solid transparent; border-radius: 0;
  font: 800 18px/1 var(--f-display); letter-spacing: -.01em; text-decoration: none;
  cursor: pointer; transition: background .14s, box-shadow .22s, transform .14s;
}
.btn:active { transform: scale(.98); }
.btn--xl { width: 100%; min-height: 60px; font-size: 19px; }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); box-shadow: 0 0 28px rgb(var(--glow-pink) / .45); }
.btn--primary:hover { background: var(--c-accent-hover); box-shadow: 0 0 38px rgb(var(--glow-pink) / .6); }
.btn--primary[disabled] { opacity: .7; cursor: progress; }
.btn--ghost { background: transparent; color: var(--c-fg); border-color: var(--c-border-strong); font-size: 15px; }
.btn[hidden] { display: none; }

/* Hook CTA rides in the thumb zone while the proof scrolls beneath it */
.cta-dock {
  position: sticky; bottom: 0; z-index: 10;
  margin: 26px calc(var(--gutter) * -1) 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--c-bg) 72%, rgb(10 10 10 / 0));
}
.cta-dock--form, .cta-dock--static { position: static; background: none; padding-bottom: 0; }
.cta-dock--static { display: grid; gap: 10px; margin-top: 30px; }
.micro { margin-top: 10px; text-align: center; font-size: 13px; color: var(--c-muted-fg); }

/* ---------- Hook proof ---------- */
.reel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
.reel figure { flex: 0 0 78%; scroll-snap-align: start; border: 1px solid var(--c-border); background: var(--c-card); }
.reel img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.reel figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; font: 700 14px/1.2 var(--f-display); }
.reel figcaption span { font: 500 10px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted-fg); }

.steps { list-style: none; border-top: 1px solid var(--c-border); }
.steps li { display: grid; grid-template-columns: 42px 1fr; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--c-border); }
.steps b { font: 500 12px/1.6 var(--f-mono); color: var(--c-accent); }
.steps strong { display: block; font: 700 17px/1.3 var(--f-display); letter-spacing: -.01em; }
.steps span { display: block; margin-top: 3px; font-size: 14.5px; color: var(--c-muted-fg); }
.steps--tight { margin-top: 28px; }

/* ---------- Questions ---------- */
/* float takes the legend out of fieldset-border rendering so padding applies normally */
.q { float: left; width: 100%; font: 800 clamp(30px, 8.6vw, 40px)/1.02 var(--f-display); letter-spacing: -.035em; text-wrap: balance; margin-bottom: 24px; }
.q .eyebrow { margin-bottom: 12px; }

.q + * { clear: both; }
.options { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.options--list { grid-template-columns: 1fr; }
.opt {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  min-height: 132px; padding: 16px 14px;
  background: var(--c-card); border: 1px solid var(--c-border);
  cursor: pointer; transition: border-color .14s, background .14s, box-shadow .22s, transform .14s;
}
.opt--row { flex-direction: row; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 18px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:active { transform: scale(.98); }
.opt:hover { border-color: var(--c-border-strong); }
.opt:has(input:focus-visible) { outline: 2px solid var(--c-secondary); outline-offset: 2px; }
.opt:has(input:checked) { border-color: var(--c-accent); background: #1a0f15; box-shadow: 0 0 22px rgb(var(--glow-pink) / .28); }
.opt__ico svg { width: 26px; height: 26px; fill: none; stroke: var(--c-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.opt__txt strong { display: block; font: 700 16px/1.2 var(--f-display); letter-spacing: -.01em; }
.opt__txt small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--c-muted-fg); }
.opt--row .opt__txt strong { font-size: 17px; }
.opt__tag { font: 500 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent); border: 1px solid var(--c-accent); padding: 5px 7px; }

/* ---------- Fields ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; color: var(--c-soft); }
.opt-label { font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted-fg); margin-left: 4px; }
.field input {
  width: 100%; height: 56px; padding: 0 16px;
  background: var(--c-card); color: var(--c-fg);
  border: 1px solid var(--c-border-strong); border-radius: 0;
  font: 500 17px/1 var(--f-body); /* >=16px: no iOS zoom */
  transition: border-color .14s, box-shadow .22s;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: #6b6b73; }
.field input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent), 0 0 20px rgb(var(--glow-pink) / .25); }
.field input[aria-invalid="true"] { border-color: var(--c-danger); }
.field__error { margin-top: 6px; font-size: 13.5px; color: var(--c-danger); }
.field__error[hidden] { display: none; }

.form-status { margin-top: 14px; font-size: 14px; color: var(--c-danger); text-align: center; }
.form-status:empty { display: none; }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgb(10 10 10 / .3); border-top-color: var(--c-on-accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Done ---------- */
.screen--done { padding-top: 40px; outline: none; }
.tick {
  width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 24px;
  border: 1px solid var(--c-accent); box-shadow: 0 0 30px rgb(var(--glow-pink) / .45);
}
.tick svg { width: 32px; height: 32px; fill: none; stroke: var(--c-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.screen--done.is-active .tick svg { animation: draw .6s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Larger screens: same column, framed ---------- */
@media (min-width: 700px) {
  body { background: radial-gradient(900px 600px at 80% -10%, rgb(var(--glow-pink) / .10), transparent 60%), var(--c-bg); }
  .screen { padding-top: 56px; }
  .reel figure { flex-basis: 64%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tick svg { stroke-dashoffset: 0; }
}
