/* AXEN Realty — lead funnel styles. Mobile-first, no external fonts. */
:root {
  --ink: #141b2d;
  --ink-2: #3f4659;
  --muted: #6e7486;
  --line: #e4e1da;
  --line-strong: #cfcac0;
  --bg: #ffffff;
  --bg-soft: #f7f5f1;
  --brand: #83031c;
  --brand-dark: #620215;
  --brand-tint: #fbf3f4;
  --gold: #b08d57;
  --error: #b42318;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; }
.app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
main { flex: 1 0 auto; display: flex; flex-direction: column; }

@media (min-width: 720px) {
  body { background: var(--bg-soft); }
  .shell { align-items: flex-start; padding: 48px 24px; }
  .app {
    min-height: 0;
    max-width: 560px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(20, 27, 45, .04), 0 18px 48px -24px rgba(20, 27, 45, .18);
    padding: 0 44px;
  }
}

/* ---------- Top bar & progress ---------- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 60px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}
.back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; padding: 0 10px 0 2px; margin-left: -6px;
  border: 0; background: none; color: var(--ink-2);
  font-size: 15px; cursor: pointer; border-radius: 10px;
}
.back:hover { color: var(--ink); }
.back:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.topbar-logo { width: 44px; height: auto; }
.step-count { justify-self: end; font-size: 13px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 20%; background: var(--brand); border-radius: 3px; transition: width .35s var(--ease); }

/* ---------- Screens ---------- */
.screen { padding: 28px 0 24px; animation: enter .28s var(--ease) both; }
.screen.is-back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen, .screen.is-back { animation: none; }
  .progress span { transition: none; }
}

.screen-welcome, .screen-success {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 0 28px;
  padding-top: max(40px, calc(env(safe-area-inset-top) + 28px));
}
.logo { width: 168px; height: auto; margin: 0 auto; }
.rule { display: block; width: 44px; height: 1px; background: var(--gold); margin: 26px auto 22px; }
.headline {
  margin: 0 0 14px;
  font-size: clamp(27px, 7.6vw, 36px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .015em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}
.lead { margin: 0 0 30px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }
.microcopy { margin: 14px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

.q-title {
  margin: 0 0 8px;
  font-size: clamp(21px, 5.6vw, 25px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.q-title:focus { outline: none; }
.q-sub { margin: 0 0 22px; color: var(--muted); font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
  touch-action: manipulation;
}
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(131, 3, 28, .55); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #efe9ea; color: #a8999c; box-shadow: none; cursor: default; transform: none; }
.btn-primary.is-loading:disabled { background: var(--brand); color: #fff; opacity: .85; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn-small { min-height: 44px; width: auto; padding: 10px 18px; font-size: 13px; }
.btn-link {
  border: 0; background: none; padding: 6px 0; min-height: 32px;
  color: var(--brand); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.btn .spinner {
  display: none; width: 20px; height: 20px; margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Answer cards ---------- */
.options { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px 14px 18px;
  text-align: left;
  font-size: 16.5px; font-weight: 550; line-height: 1.3;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .08s;
  touch-action: manipulation;
}
@media (hover: hover) { .option:hover { border-color: var(--line-strong); background: #fcfbf9; } }
.option:active { transform: scale(.99); }
.option:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.option-mark {
  flex: none;
  width: 22px; height: 22px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color .15s, border-color .15s;
}
.option-mark svg { opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.option[aria-checked="true"] {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.option[aria-checked="true"] .option-mark { background: var(--brand); border-color: var(--brand); color: #fff; }
.option[aria-checked="true"] .option-mark svg { opacity: 1; transform: none; }
.next-btn { margin-top: 4px; }

/* ---------- Form ---------- */
form { display: block; }
.field { margin: 0 0 16px; }
.field label:not(.check) { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  font-size: 17px; /* ≥16px prevents iOS zoom */
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: #a7abb6; }
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 27, 45, .08); }
.field.has-error input[type="text"], .field.has-error input[type="tel"], .field.has-error input[type="email"], .field.has-error .cc { border-color: var(--error); }
.field-error { margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }

.phone { display: flex; gap: 8px; }
.cc {
  position: relative; flex: none;
  display: flex; align-items: center;
  height: 54px; min-width: 104px;
  padding: 0 28px 0 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
}
.cc:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 27, 45, .08); }
.cc-display { font-size: 16px; white-space: nowrap; pointer-events: none; }
.cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cc-caret { position: absolute; right: 9px; top: 50%; margin-top: -7px; color: var(--muted); pointer-events: none; }
.phone input { flex: 1; min-width: 0; }

.field-check { margin-bottom: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); padding: 4px 0; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  flex: none; width: 24px; height: 24px; margin-top: -1px;
  border: 1.5px solid var(--line-strong); border-radius: 7px; background: var(--bg);
  display: grid; place-items: center;
  transition: background-color .15s, border-color .15s;
}
.check-box::after {
  content: ""; width: 11px; height: 6px; margin-top: -3px;
  border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff;
  transform: rotate(-45deg) scale(.6); opacity: 0; transition: opacity .12s, transform .12s;
}
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check-box { outline: 2px solid var(--brand); outline-offset: 2px; }
.field.has-error .check-box { border-color: var(--error); }
.optional { color: var(--muted); }

.turnstile { min-height: 65px; margin: 6px 0 0; }
.form-error {
  margin: 0 0 14px; padding: 12px 14px;
  font-size: 14px; line-height: 1.45; color: var(--error);
  background: #fef3f2; border: 1px solid #fecdca; border-radius: 10px;
}
.secure-note { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 14px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.secure-note svg { flex: none; margin-top: 2px; }

/* ---------- Success ---------- */
.success-icon { color: var(--gold); margin-bottom: 22px; }
.success-icon svg { animation: pop .45s var(--ease) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px;
  padding: 18px 0 22px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; align-items: center; }
.footer a, .footer .btn-link { color: var(--muted); font-size: 12.5px; font-weight: 400; text-decoration: underline; text-underline-offset: 2px; min-height: 32px; display: inline-flex; align-items: center; }
.footer a:hover, .footer .btn-link:hover { color: var(--ink); }

/* ---------- Cookie banner (only when Meta Pixel is configured) ---------- */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 520px; margin: 0 auto;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px -12px rgba(20, 27, 45, .28);
  font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
}
.cookie p { margin: 0 0 10px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie-actions .btn { flex: 1; min-height: 40px; padding: 8px 14px; }
body.has-cookie .app { padding-bottom: 132px; }
@media (max-width: 480px) {
  .cookie { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); padding: 12px 14px; font-size: 12.5px; border-radius: 14px; }
}
@media (min-width: 720px) { body.has-cookie .app { padding-bottom: 0; } body.has-cookie .shell { padding-bottom: 150px; } }

.noscript { padding: 16px; text-align: center; color: var(--error); }

/* ---------- Small screens (320px) ---------- */
@media (max-width: 359px) {
  .app { padding-left: 16px; padding-right: 16px; }
  .logo { width: 140px; }
  .lead { font-size: 15.5px; }
  .option { font-size: 15.5px; min-height: 56px; padding: 12px 14px; }
  .btn { letter-spacing: .05em; font-size: 14px; }
  .cc { min-width: 92px; padding-right: 24px; padding-left: 10px; }
  .back span { display: none; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 8px 0 36px; }
.legal-header { display: flex; align-items: center; justify-content: space-between; height: 64px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.legal-header img { width: 46px; }
.legal-header a.home { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.legal h1 { font-size: clamp(24px, 6vw, 30px); line-height: 1.2; text-transform: uppercase; letter-spacing: .015em; margin: 0 0 6px; }
.legal .meta { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }
.legal h2 { font-size: 17px; margin: 30px 0 8px; letter-spacing: .01em; }
.legal p, .legal li { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal .notice { padding: 12px 14px; background: var(--bg-soft); border-left: 3px solid var(--gold); border-radius: 6px; font-size: 14px; }
.ph { background: #fff4d6; color: #7a4b00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
@media (min-width: 720px) { .app.legal-app { max-width: 760px; } }
