/* Caprock AI funnel page — v21 refresh. Light red/brass theme to match caprockai.io. Mobile-first, no framework. */

:root {
  --bg: #FFFFFF;
  --bg-soft: #F4F4F6;
  --card: #FFFFFF;
  --card-border: rgba(20, 20, 23, 0.12);
  --ink: #141417;
  --muted: #5C5C62;
  --accent: #CC0000;
  --accent-deep: #990000;
  --accent-ink: #FFFFFF;
  --danger: #B00020;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(90% 45% at 50% -10%, rgba(204, 0, 0, 0.05), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
/* film grain — same system as the site */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
}
/* keyboard focus: red ring */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  text-transform: uppercase;
}
.brand span { color: var(--accent); }

.lang-toggle {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
}
.lang-toggle button.active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- layout ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 20px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.foot {
  text-align: center;
  padding: 0 24px 26px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- hero ---------- */
.hero-kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.hero h1 .hl { color: var(--accent); }
.hero p.sub {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 28px;
  max-width: 34ch;
}
.micro {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- buttons ---------- */
.btn {
  display: block;
  width: 100%;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 17px 20px;
  cursor: pointer;
  min-height: 58px;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
  background: var(--accent-deep);
}
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 50px;
  margin-top: 10px;
  box-shadow: none;
}
.btn-ghost:active { background: var(--bg-soft); }

a.btn { text-decoration: none; text-align: center; }

/* ---------- quiz ---------- */
.dots {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.dots i {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--card-border);
}
.dots i.done { background: var(--accent); }

.q-title {
  font-size: 1.55rem;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.field {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1.15rem;
  padding: 16px 18px;
  min-height: 60px;
  margin-bottom: 18px;
  appearance: none;
}
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.14);
}
select.field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235c5c62' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}
select.field:invalid { color: var(--muted); }

.input-wrap { position: relative; }
.input-wrap .prefix {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.15rem;
  pointer-events: none;
}
.input-wrap .field { padding-left: 40px; }

.hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: -8px 0 18px;
}

.consent-line { margin: -14px 0 18px; }
.consent-line a { color: inherit; text-decoration: underline; }

.err {
  color: var(--danger);
  font-size: 0.92rem;
  margin: -6px 0 14px;
  min-height: 1.4em;
}

/* tappable cards */
.cards { display: grid; gap: 12px; margin-bottom: 6px; }
.card {
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 18px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(20, 20, 23, 0.06);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.card:active { transform: scale(0.985); }
.card .check {
  opacity: 0;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
}
.card.picked { border-color: var(--accent); background: #FDECEC; }
.card.picked .check { opacity: 1; }

/* ---------- result ---------- */
.result-card {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 26px 22px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(20, 20, 23, 0.06);
}
.result-card h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.math {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
}
.math .big { color: var(--accent); font-size: 1.9rem; }
.honest {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(204, 0, 0, 0.08);
  border: 1px solid rgba(204, 0, 0, 0.35);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 18px 0 6px;
}
.call-card {
  background: var(--card);
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  padding: 24px 22px;
  margin: 14px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(20, 20, 23, 0.06);
}
.call-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.call-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.next-step {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  margin-top: 14px;
}
.warn {
  background: rgba(176, 0, 32, 0.06);
  border: 1px solid rgba(176, 0, 32, 0.4);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* Editorial serif headlines — same system as the site */
.hero h1, .q-title, .result-card h2, .call-card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: 0;
}
.brand { font-family: Georgia, 'Times New Roman', serif; }
