/* Caprock AI funnel page — v1. Mobile-first, no framework. */

:root {
  --bg: #0d0f12;
  --bg-soft: #14171c;
  --card: #171b21;
  --card-border: #262c35;
  --ink: #f2ede4;
  --muted: #9aa3ad;
  --accent: #f5a524;
  --accent-deep: #c77f0a;
  --accent-ink: #1a1206;
  --danger: #f26d6d;
  --radius: 16px;
}

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

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

body {
  background:
    radial-gradient(120% 40% at 50% -8%, rgba(245, 165, 36, 0.10), 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;
}

/* ---------- 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(--card);
  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: 0;
  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;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.98); background: var(--accent-deep); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 50px;
  margin-top: 10px;
}
.btn-ghost:active { background: var(--card); }

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(245, 165, 36, 0.18);
}
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='%239aa3ad' 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;
}

.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;
  transition: border-color 0.12s ease, background 0.12s ease, transform 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: #1e1a10; }
.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;
}
.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(245, 165, 36, 0.12);
  border: 1px solid rgba(245, 165, 36, 0.4);
  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;
}
.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(242, 109, 109, 0.1);
  border: 1px solid rgba(242, 109, 109, 0.45);
  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; }
}
