/* DexaFit Vancouver – New Client Special funnel */

:root {
  --ink: #0b1324;
  --text: #1f2937;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e5e9f0;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --blue: #1677ff;
  --blue-600: #0f63e0;
  --blue-50: #eef5ff;
  --blue-100: #dceaff;
  --brand-blue: #3b9cf0;
  --green: #16a34a;
  --error: #dc2626;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -8px rgba(15, 23, 42, .10);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 24px 48px -16px rgba(15, 23, 42, .18);
  --ring: 0 0 0 4px rgba(22, 119, 255, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }

button { font-family: inherit; }

a { color: inherit; }

.logo { width: calc(150px * var(--logo-scale, 1)); }

.footer {
  padding: 32px 16px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}

.footer a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Funnel shell ---------- */

body.funnel {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 50% -160px, rgba(59, 156, 240, .16), transparent 70%),
    linear-gradient(#fff, #fff);
}

.topbar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px 16px 0;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
}

.back {
  position: absolute;
  left: 16px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s var(--ease);
}

.back:hover { background: #fff; border-color: #cfd6e2; }
.back:active { transform: scale(.96); }
.back[hidden] { display: none; }

.progress {
  flex-basis: 100%;
  height: 4px;
  margin-top: 22px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.progress[hidden] { display: none; }

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-blue), var(--blue));
  transition: width .45s var(--ease);
}

.page {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

/* ---------- Funnel steps ---------- */

.step {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: stepIn .4s var(--ease);
}

.step[hidden] { display: none; }

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

.step h1 {
  margin: 44px 0 0;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.step--intro { max-width: 940px; }

.step--intro h1 {
  margin-top: clamp(48px, 10vh, 96px);
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

/* Optional announcement bar above the intro headline (landing.banner) */
.announce {
  margin: clamp(32px, 7vh, 64px) 0 0;
  width: 100%;
  padding: 14px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #3aa3f5 0%, var(--blue) 60%, var(--blue-600) 100%);
  color: #fff;
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  box-shadow: 0 10px 24px -12px rgba(22, 119, 255, .6);
  text-wrap: balance;
}

.announce + h1 { margin-top: 36px !important; }

.price-old {
  color: var(--faint);
  font-weight: 700;
  text-decoration-thickness: 3px;
  text-decoration-color: rgba(148, 163, 184, .9);
}

.price-new {
  background: linear-gradient(135deg, var(--brand-blue), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step .sub {
  margin: 22px 0 0;
  max-width: 520px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: balance;
}

.fields {
  width: 100%;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field:hover { border-color: #d4dbe6; }

.field:focus-within {
  background: #fff;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

.field.invalid { border-color: var(--error); box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }

.field .icon {
  flex: 0 0 auto;
  width: 56px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--faint);
}

.field:focus-within .icon { color: var(--blue); }

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  padding-right: 18px;
}

.field input::placeholder { color: var(--faint); font-weight: 400; }

/* Browser/OS autofill: keep our colours instead of the default yellow/blue fill. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out;
}

.field:focus-within input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset; }

/* honeypot spam trap – visually hidden, not display:none (some bots skip those) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* phone country picker */
.country {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 14px 0 18px;
  margin-right: 12px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  border-right: 1px solid var(--line);
}

.country select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.country .flag { font-size: 20px; line-height: 1; }
.country .chev { width: 12px; height: 12px; color: var(--muted); }
.country .dial { margin-left: 4px; }

.error-msg {
  margin: -2px 2px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
}

.error-msg:empty { display: none; }

/* checkboxes */
.checks {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.check:hover { border-color: #d4dbe6; }
.check:has(input:checked) { border-color: rgba(22, 119, 255, .45); background: var(--blue-50); }

.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid #c7d0dd;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background .15s, border-color .15s;
}

.check input::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(.4);
  opacity: 0;
  transition: transform .2s var(--ease), opacity .15s;
}

.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { opacity: 1; transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.check input:focus-visible { box-shadow: var(--ring); }
.check.invalid { border-color: var(--error); }
.check.invalid input { border-color: var(--error); }
.check a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  margin-top: 6px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 8px 20px -6px rgba(22, 119, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: background .15s, transform .15s var(--ease), box-shadow .15s;
}

.btn:hover { background: var(--blue-600); box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 12px 26px -8px rgba(22, 119, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn:active { transform: translateY(1px) scale(.995); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .7; cursor: progress; }

.btn--hero {
  width: auto;
  margin-top: 40px;
  height: 64px;
  padding: 0 34px 0 40px;
  border-radius: 999px;
  font-size: 19px;
  background: linear-gradient(135deg, #3aa3f5 0%, var(--blue) 55%, var(--blue-600) 100%);
}

.btn--hero svg { transition: transform .2s var(--ease); }
.btn--hero:hover svg { transform: translateX(3px); }

@media (max-width: 640px) {
  .logo { width: calc(128px * var(--logo-scale, 1)); }
  .topbar { padding-top: 16px; }
  .back { top: 12px; width: 38px; height: 38px; }
  .progress { margin-top: 16px; }
  .step h1 { margin-top: 30px; }
  .fields { margin-top: 26px; }
  .field { height: 56px; }
  .field input, .country { font-size: 16px; }
  .btn { height: 54px; }
  .announce { margin-top: 28px; padding: 12px 16px; }
  .announce + h1 { margin-top: 26px !important; }
  .btn--hero { width: 100%; height: 60px; margin-top: 32px; }
}

/* Touch screens: don't leave hover styles stuck on after a tap. */
@media (hover: none) {
  .field:hover, .check:hover { border-color: var(--line); }
  .btn:hover { background: var(--blue); }
  .back:hover { background: rgba(255, 255, 255, .8); border-color: var(--line); }
}

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