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

:root {
  --bg: #0E1B16;
  --bg-soft: #122019;
  --card: #16241D;
  --card-border: #2A3A30;
  --ink: #F2EEE3;
  --muted: #9AA39B;
  --accent: #C9A96A;
  --accent-deep: #A9884F;
  --accent-ink: #0E1B16;
  --danger: #E08080;
  --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(201, 169, 106, 0.09), transparent 60%),
    radial-gradient(130% 80% at 50% 115%, rgba(0, 0, 0, 0.5), transparent 55%),
    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.05;
  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: brass ring with halo gap */
: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(--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: 1px solid #7A6234;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #E3C98F 0%, #C9A96A 45%, #A9884F 100%);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 17px 20px;
  cursor: pointer;
  min-height: 58px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 10px 28px -8px rgba(201, 169, 106, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 6px rgba(62, 44, 14, 0.4);
}
.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(201, 169, 106, 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: linear-gradient(180deg, rgba(242, 238, 227, 0.028), rgba(242, 238, 227, 0) 40%), 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:
    inset 0 1px 0 rgba(242, 238, 227, 0.07),
    0 26px 52px -26px rgba(0, 0, 0, 0.65);
  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: #1E1B13; }
.card.picked .check { opacity: 1; }

/* ---------- result ---------- */
.result-card {
  background: linear-gradient(180deg, rgba(242, 238, 227, 0.028), rgba(242, 238, 227, 0) 30%), var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 26px 22px;
  margin-bottom: 16px;
  box-shadow:
    inset 0 1px 0 rgba(242, 238, 227, 0.07),
    0 26px 52px -26px rgba(0, 0, 0, 0.65);
}
.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(201, 169, 106, 0.12);
  border: 1px solid rgba(201, 169, 106, 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: linear-gradient(180deg, rgba(242, 238, 227, 0.028), rgba(242, 238, 227, 0) 30%), var(--card);
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  padding: 24px 22px;
  margin: 14px 0;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(242, 238, 227, 0.07),
    0 26px 52px -26px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(201, 169, 106, 0.12);
}
.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; }
}

/* Forest & Brass refinement: editorial serif headlines */
.hero h1, .q-title, .result-card h2, .call-card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.4);
}
.brand { font-family: Georgia, 'Times New Roman', serif; }
