/*
 * Finbro marketing site.
 *
 * The tokens are lifted from the app (src/theme.ts) rather than re-chosen, so
 * someone who clicks through from the site does not feel they have landed
 * somewhere else.
 */

:root {
  --bg: #07070a;
  --surface: #111319;
  --surface-2: #171a21;
  --line: #23262f;
  --line-hot: #41202a;
  --red: #ff2b3d;
  --red-deep: #8e0f1e;
  --good: #2bffc6;
  --text: #edeff3;
  --mid: #98a0ae;
  --dim: #5a6170;
  --faint: #3d434f;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --gutter: 24px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A faint grid, so the background is not a flat void. Pointer-events off so it
   never intercepts a click. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 760px;
}

/* ------------------------------------------------------------------ type */

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-weight: 900;
  font-size: clamp(2.4rem, 6.5vw, 4.1rem);
}

h2 {
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

h3 {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  color: var(--mid);
  line-height: 1.65;
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 14px;
}

.eyebrow.muted {
  color: var(--dim);
}

.muted {
  color: var(--mid);
}

.dim {
  color: var(--dim);
}

.accent {
  color: var(--red);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 10, 0.82);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.13em;
  color: var(--text);
}

.wordmark .tile {
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  font-size: 0.87rem;
  color: var(--mid);
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .nav .hide-sm {
    display: none;
  }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--mid);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--dim);
  color: var(--text);
}

.btn-sm {
  padding: 9px 15px;
  font-size: 0.66rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* -------------------------------------------------------------- sections */

section {
  padding: clamp(52px, 7vw, 92px) 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-head p {
  margin-top: 14px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(32px, 4vw, 52px);
}

/* Two columns once there is room for the demo card beside the copy. Below
   that it stacks, and the card still earns its place on a phone. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.hero h1 {
  max-width: 14ch;
}

.hero .lede {
  max-width: 48ch;
  margin-top: 20px;
}

.hero .btn-row {
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--dim);
}

/* -------------------------------------------------------------- hero card */

.demo {
  padding: 22px;
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
}

.demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.demo-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.demo-q {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.demo-rule {
  height: 1px;
  background: var(--line);
  margin: 20px 0 16px;
}

.demo-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.demo-rows li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--mid);
}

.demo-rows .dot {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line-hot);
  display: grid;
  place-items: center;
  font-size: 0.56rem;
  color: var(--red);
  font-family: var(--mono);
}

.demo-foot {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ------------------------------------------------------------------ stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 64px);
}

.stat {
  background: var(--surface);
  padding: 22px 20px;
}

.stat .n {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat .k {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------------------- panels */

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}

.panel.hot {
  border-color: var(--line-hot);
}

/* The app marks panel corners with small brackets; same detail here. */
.panel.marked::before,
.panel.marked::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1px solid var(--faint);
  pointer-events: none;
}

.panel.marked::before {
  top: 7px;
  left: 7px;
  border-right: 0;
  border-bottom: 0;
}

.panel.marked::after {
  bottom: 7px;
  right: 7px;
  border-left: 0;
  border-top: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------- track cards */

.track-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.track-card:hover {
  border-color: var(--line-hot);
  background: var(--surface-2);
  transform: translateY(-2px);
}

/* Standalone, because the hero card uses it too. */
.tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--line-hot);
  border-radius: var(--r-sm);
  padding: 4px 8px;
}

.track-card p {
  margin: 0;
  color: var(--mid);
  font-size: 0.91rem;
  line-height: 1.55;
}

.track-card .meta {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--dim);
}

/* ------------------------------------------------------------------ steps */

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step .num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-hot);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.74rem;
  color: var(--red);
}

.step p {
  margin: 6px 0 0;
  color: var(--mid);
  font-size: 0.93rem;
}

/* ------------------------------------------------------------- questions */

.qlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.qlist li {
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.qlist .topic {
  flex: none;
  min-width: 110px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.qlist .q {
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .qlist li {
    flex-direction: column;
    gap: 7px;
  }
}

/* --------------------------------------------------------------- pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.plan {
  padding: 28px;
}

.plan .price {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 14px 0 4px;
}

.plan .price .amount {
  font-weight: 900;
  font-size: 2.7rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan .price .per {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.features {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  display: grid;
  gap: 11px;
}

.features li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.93rem;
  color: var(--text);
}

.features li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 9px;
}

.features li.off {
  color: var(--dim);
}

.features li.off::before {
  background: var(--faint);
}

/* -------------------------------------------------------------------- faq */

details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  color: var(--red);
  font-size: 1.15rem;
  line-height: 1;
}

details[open] summary::after {
  content: "\2212";
}

details p {
  margin: 14px 0 0;
  color: var(--mid);
  font-size: 0.94rem;
  max-width: 70ch;
}

/* ------------------------------------------------------------------- cta */

.cta-band {
  border: 1px solid var(--line-hot);
  border-radius: var(--r-lg);
  padding: clamp(32px, 5vw, 54px);
  background: radial-gradient(
      ellipse 70% 130% at 50% 0%,
      rgba(255, 43, 61, 0.11),
      transparent 70%
    ),
    var(--surface);
  text-align: center;
}

.cta-band h2 {
  max-width: 18ch;
  margin: 0 auto;
}

.cta-band .lede {
  max-width: 50ch;
  margin: 16px auto 0;
}

.cta-band .btn-row {
  justify-content: center;
  margin-top: 28px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-col h4 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--mid);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--dim);
}

/* --------------------------------------------------------------- prose */

.prose h2 {
  font-size: 1.5rem;
  margin: 40px 0 14px;
}

.prose h3 {
  margin: 28px 0 10px;
}

.prose p,
.prose li {
  color: var(--mid);
  font-size: 0.97rem;
  line-height: 1.7;
}

.prose strong {
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 20px;
  display: grid;
  gap: 8px;
  margin: 0 0 1rem;
}

.prose a {
  color: var(--red);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--mid);
}

.prose th {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------- utilities */

.center {
  text-align: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  background: var(--surface);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 10px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--red);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}

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