/* Recourse — public intake site. Static, no framework. Dark "signal" theme. */
:root {
  --font-ui: 'Hanken Grotesk', system-ui, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-serif: 'Newsreader', Georgia, serif;

  --accent: #5b54f0;
  --accent-text: #ffffff;
  --accent-strong: #a6a2ff;
  --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--surface));

  --bg: #0a0b10;
  --surface: #14161d;
  --surface-2: #1c1f29;
  --text: #edeef3;
  --text-muted: #969cab;
  --border: #282c38;
  --good: #34d399;
  --warn: #f0b454;

  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 80px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { min-height: 100%; }
input, textarea, button { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
::selection { background: var(--accent-soft); }
a { color: inherit; }

/* scrollbars on inner scrollers */
.scroll::-webkit-scrollbar { width: 10px; }
.scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9px; }

/* ---------- animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bar  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rise { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.fade { animation: fade .35s ease both; }
.bar  { animation: bar 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }

/* ---------- landing atmosphere (subtle drifting smoke/haze) ---------- */
.start { position: relative; overflow: hidden; }
.start > .topbar, .start > .center-col, .start > .footer { position: relative; z-index: 2; }
/* fixed to the viewport so the haze fills the whole page at any scroll position (never cuts off mid-page) */
.bg-smoke { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-smoke .blob { position: absolute; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; will-change: transform; }
.bg-smoke .b1 {
  width: 64vw; height: 64vw; left: -16vw; top: -22vh; opacity: .42;
  background: radial-gradient(circle at center, #6b5cf6, transparent 64%);
  animation: drift1 28s ease-in-out infinite alternate;
}
.bg-smoke .b2 {
  width: 58vw; height: 58vw; right: -18vw; bottom: -24vh; opacity: .38;
  background: radial-gradient(circle at center, #8b3df0, transparent 64%);
  animation: drift2 34s ease-in-out infinite alternate;
}
.bg-smoke .b3 {
  width: 44vw; height: 44vw; left: 28vw; bottom: -14vh; opacity: .3;
  background: radial-gradient(circle at center, #2746e0, transparent 60%);
  animation: drift3 40s ease-in-out infinite alternate;
}
/* wispy grayscale fractal noise = the "smoke" texture, lightened over the dark bg */
.smoke-noise {
  position: absolute; inset: -25%; opacity: .055; mix-blend-mode: screen; will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 46% 46%;
  animation: smokeShift 70s linear infinite;
}
/* vignette: sits above the haze, below the content — fixed so it tracks the viewport too */
.start::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(135% 90% at 50% -10%, transparent 38%, rgba(4,5,9,.55) 100%);
}
@keyframes drift1 { from { transform: translate(0,0) scale(1);    } to { transform: translate(7vw,5vh) scale(1.16);   } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-6vw,-4vh) scale(1.22); } }
@keyframes drift3 { from { transform: translate(0,0);             } to { transform: translate(5vw,-5vh) scale(1.12);  } }
@keyframes smokeShift { from { transform: translate(0,0) rotate(0deg); } to { transform: translate(-10%,7%) rotate(6deg); } }

/* ---------- motto ---------- */
.motto {
  margin: 30px auto 0; max-width: 480px;
  font-family: var(--font-serif); font-style: italic; font-size: clamp(15px, 4vw, 18.5px);
  line-height: 1.5; color: var(--text-muted); letter-spacing: .005em;
}
.motto .em { color: var(--accent-strong); font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .rise, .fade, .bar { animation: none !important; }
  .bg-smoke .blob, .smoke-noise { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .rise, .fade, .bar { animation: none !important; }
}
/* if the tab is hidden, browsers freeze CSS animations at frame 0 (opacity:0);
   disable entrances while hidden so content is always visible on background opens */
html[data-paused] .rise, html[data-paused] .fade, html[data-paused] .bar { animation: none !important; }
html[data-paused] .bg-smoke .blob, html[data-paused] .smoke-noise { animation-play-state: paused !important; }

/* ---------- layout shells ---------- */
.screen { min-height: 100%; display: flex; flex-direction: column; }
.wrap { width: 100%; margin: 0 auto; }
.center-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 80px; text-align: center; }
.step-col { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 20px 72px; }
.step-col.top { align-items: flex-start; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 18px 24px; max-width: 1180px; margin: 0 auto; width: 100%;
}
.topbar .right { display: flex; align-items: center; gap: 14px; }
.tagline { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }

/* ---------- wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.wordmark .mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  color: var(--accent-text); display: grid; place-items: center; flex-shrink: 0;
}
.wordmark .name {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  letter-spacing: -0.03em; color: var(--text);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 11px; font-family: var(--font-ui); font-weight: 600; cursor: pointer;
  letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
  transition: transform .12s, filter .15s, background .15s, border-color .15s;
  border: 1px solid transparent; min-height: 44px; padding: 12px 20px; font-size: 15px;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(.97); }
.btn.lg { padding: 15px 26px; font-size: 16.5px; min-height: 52px; border-radius: 12px; }
.btn.sm { padding: 9px 15px; font-size: 14px; min-height: 40px; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.soft { background: var(--accent-soft); color: var(--accent-strong); }
.btn.quiet { background: transparent; color: var(--text-muted); border-color: transparent; padding-left: 12px; padding-right: 12px; }
.btn.full { width: 100%; }
.btn svg { flex-shrink: 0; }

.linkbtn {
  border: none; background: transparent; cursor: pointer; padding: 0;
  color: var(--accent-strong); font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.02em;
}
.linkbtn:hover { text-decoration: underline; }

/* ---------- badge / eyebrow ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em;
  text-transform: uppercase; white-space: nowrap;
  background: var(--surface-2); color: var(--text-muted);
}
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-strong);
}

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: center; align-items: center; font-family: var(--font-mono);
  font-size: 12.5px; color: var(--text-muted); letter-spacing: 0.02em;
}

/* ---------- hero (landing) ---------- */
.hero { max-width: 640px; width: 100%; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(38px, 9vw, 66px);
  line-height: 1.0; letter-spacing: -0.04em; margin: 22px 0 0; color: var(--text);
}
.hero p {
  font-size: clamp(16.5px, 4.5vw, 20px); line-height: 1.5; color: var(--text-muted);
  margin: 20px auto 0; max-width: 460px;
}
.hero-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- pricing ---------- */
.pricing-head { text-align: center; max-width: 640px; margin: 0 auto; }
.pricing-head h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 6.5vw, 52px);
  line-height: 1.04; letter-spacing: -0.035em; margin: 12px 0 0;
}
.pricing-head p { font-size: clamp(16px, 4vw, 18px); line-height: 1.5; color: var(--text-muted); margin: 18px auto 0; max-width: 520px; }

.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.tier { display: flex; flex-direction: column; position: relative; padding: 26px; min-width: 0; }
.tier.featured { border: 1.5px solid var(--accent); }
.tier .tier-tag { position: absolute; top: -11px; left: 26px; }
.tier .tier-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.tier .tier-blurb { font-size: 14px; color: var(--text-muted); margin: 6px 0 18px; line-height: 1.4; min-height: 38px; }
.tier .tier-price { display: flex; align-items: baseline; gap: 7px; margin-bottom: 18px; }
.tier .tier-price b { font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -0.03em; }
.tier .tier-price span { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.tier ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tier li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.tier li svg { color: var(--accent-strong); margin-top: 2px; flex-shrink: 0; }

.schedule { margin-top: 52px; }
.schedule-head { text-align: center; max-width: 560px; margin: 0 auto 24px; }
.schedule-head h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 5vw, 26px); letter-spacing: -0.025em; margin: 0; }
.schedule-head p { font-size: 15.5px; color: var(--text-muted); margin: 10px 0 0; }
.schedule-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }

.acc { overflow: hidden; padding: 0; }
.acc-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
  padding: 18px 22px; border: none; background: transparent; cursor: pointer; color: var(--text);
}
.acc-toggle:hover { background: var(--surface-2); }
.acc-toggle .acc-label { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.acc-toggle .acc-meta { display: flex; align-items: center; gap: 12px; }
.acc-toggle .acc-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.acc-toggle .chev { color: var(--text-muted); transition: transform .2s; }
.acc.open .chev { transform: rotate(90deg); }
.acc-body { padding: 0 22px 12px; }

.sched-row {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 4px; border: none; border-bottom: 1px solid var(--border); background: transparent; color: var(--text);
  transition: padding .14s, background .14s; border-radius: 10px;
}
.sched-row:last-child { border-bottom: none; }
.sched-row:hover { background: var(--surface-2); padding-left: 12px; padding-right: 12px; }
.sched-row:hover .sched-arrow { opacity: 1; }
.sched-main { flex: 1; min-width: 0; }
.sched-main .t { font-family: var(--font-ui); font-weight: 600; font-size: 15.5px; }
.sched-main .s { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.sched-price { text-align: right; flex-shrink: 0; }
.sched-price .p { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.sched-price .u { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sched-arrow { color: var(--accent-strong); flex-shrink: 0; opacity: 0.45; transition: opacity .14s; }

.pricing-cta { text-align: center; margin-top: 44px; }
.pricing-cta .card { max-width: 620px; margin: 0 auto; background: var(--surface-2); }
.pricing-cta h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 4.5vw, 22px); letter-spacing: -0.02em; margin: 0; }
.pricing-cta p { font-size: 15.5px; line-height: 1.5; color: var(--text-muted); margin: 10px auto 20px; max-width: 420px; }

/* ---------- questionnaire ---------- */
.q-wrap { width: 100%; max-width: 560px; }
.progress { display: flex; gap: 6px; align-items: center; max-width: 560px; width: 100%; margin: 0 auto; padding: 0 20px; }
.progress .dot { height: 4px; width: 10px; border-radius: 999px; background: var(--surface-2); transition: all .3s; }
.progress .dot.on { background: var(--accent); }
.progress .dot.cur { width: 22px; }

.q-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 6vw, 30px); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 6px; }
.q-sub { font-size: 16px; color: var(--text-muted); margin: 0 0 22px; }

.search {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 14px; margin-bottom: 14px;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search svg { color: var(--text-muted); flex-shrink: 0; }
.search input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; color: var(--text); padding: 14px 0; }

.type-scroll { max-height: min(48vh, 440px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 4px; }
.type-group-label { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }
.type-options { display: flex; flex-direction: column; gap: 7px; }
.type-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%;
  padding: 15px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: var(--font-ui); font-size: 15.5px; font-weight: 500; cursor: pointer;
  transition: all .15s; min-height: 52px;
}
.type-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.type-option:hover .arrow { opacity: 1; }
.type-option .arrow { color: var(--accent-strong); opacity: 0; flex-shrink: 0; }
.type-empty { color: var(--text-muted); font-size: 15px; padding: 12px 2px; }

.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%;
  padding: 17px 20px; border-radius: 13px; cursor: pointer; transition: all .15s; min-height: 58px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--font-ui); font-size: 16.5px; font-weight: 500;
}
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.opt.active { border-color: var(--accent); background: var(--accent-soft); }
.opt .ring {
  width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center;
  border: 2px solid var(--border); background: transparent; color: var(--accent-text); transition: all .15s;
}
.opt.active .ring { border-color: var(--accent); background: var(--accent); }
.opt-list { display: flex; flex-direction: column; gap: 11px; }

/* details form */
.field-label { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--text); margin: 0 0 7px; }
.field {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; outline: none;
  background: var(--surface); color: var(--text); font-size: 16px;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.field { resize: vertical; line-height: 1.5; min-height: 84px; }
.field-wrap { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; background: var(--surface); }
.field-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-wrap .pre { color: var(--text-muted); font-size: 16px; }
.field-wrap .field { border: none; box-shadow: none; padding: 14px 0; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.divider { height: 1px; background: var(--border); }
.err { color: var(--warn); font-size: 14px; margin-top: 14px; }
.submit-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.submit-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }

/* ---------- submitted ---------- */
.done-wrap { width: 100%; max-width: 560px; text-align: center; }
.done-check { width: 60px; height: 60px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; margin: 0 auto 22px; }
.done-wrap h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 7vw, 42px); line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.done-wrap > p { font-size: 17px; line-height: 1.5; color: var(--text-muted); margin: 18px auto 30px; max-width: 440px; }
.steps-card { overflow: hidden; padding: 0; text-align: left; }
.step-item { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.step-item:last-child { border-bottom: none; }
.step-num { width: 26px; height: 26px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.step-item .t { font-family: var(--font-ui); font-weight: 600; font-size: 15.5px; }
.step-item .s { font-size: 13.5px; color: var(--text-muted); margin-top: 1px; }

.spinner { width: 18px; height: 18px; border-radius: 999px; border: 2px solid color-mix(in srgb, var(--accent-text) 40%, transparent); border-top-color: var(--accent-text); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .topbar { padding: 16px 18px; }
  .tagline { display: none; }
  .tier-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .sched-price .u { display: none; }
  .center-col { padding: 28px 20px 64px; }
  .footer-inner { gap: 8px 16px; }
}
