/* Retain Capital — marketing site styles */

:root {
  --ink: #0b1220;
  --ink-soft: #1c2740;
  --slate: #48546b;
  --slate-light: #7c879c;
  --line: #e2e6ee;
  --paper: #ffffff;
  --paper-soft: #f6f8fb;
  --accent: #0e9f6e;
  --accent-dark: #0b7a55;
  --accent-soft: #e4f7ee;
  --warn-soft: #fdf3e7;
  --warn: #b06a12;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 12px 32px rgba(11, 18, 32, 0.06);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  color: var(--slate);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--ink-soft);
}

.btn-accent {
  background: var(--accent);
  color: var(--paper);
}

.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

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

.btn-lg {
  padding: 16px 30px;
  font-size: 1rem;
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Header */

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand svg,
.brand img {
  flex-shrink: 0;
  border-radius: 7px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle-checkbox {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Hero */

.hero {
  padding: 88px 0 72px;
  background: linear-gradient(180deg, var(--paper-soft), var(--paper) 70%);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.hero .container {
  max-width: 840px;
}

.hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
}

.hero .lede {
  font-size: 1.15rem;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-row {
  justify-content: center;
  margin-top: 36px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
}

.hero-stat {
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.hero-stat b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ink);
}

.hero-stat span {
  font-size: 0.85rem;
  color: var(--slate-light);
}

/* Panels / cards */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.section-head p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Stat comparison (fraud vs declines) */

.stat-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--line);
}

.stat-card.negative {
  background: var(--warn-soft);
  border-color: #f1e0c4;
}

.stat-card.positive {
  background: var(--accent-soft);
  border-color: #c9ecdb;
}

.stat-card .amount {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat-card.negative .amount {
  color: var(--warn);
}

.stat-card.positive .amount {
  color: var(--accent-dark);
}

.stat-card p {
  margin: 0;
  color: var(--ink-soft);
}

/* Process steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.93rem;
  margin: 0;
}

/* Feature / card grid */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

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

.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--paper);
}

.feature-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.05rem;
}

.feature-card p {
  font-size: 0.93rem;
  margin: 0;
}

/* CTA band */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  margin: 0 24px;
}

.cta-band h2 {
  color: var(--paper);
}

.cta-band p {
  color: #b7c0d4;
  max-width: 50ch;
  margin: 0 auto 28px;
}

.cta-band .btn-row {
  justify-content: center;
}

/* Tables / lists */

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--slate);
  font-size: 0.96rem;
}

.check-list svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
}

/* Offices */

.offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 24px;
}

.office-card h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.office-card p {
  font-size: 0.93rem;
  margin: 0;
}

/* Team */

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.team-card {
  flex: 0 1 calc(25% - 18px);
  text-align: center;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.avatar-photo {
  width: clamp(100px, 22vw, 250px);
  height: clamp(100px, 22vw, 250px);
  border-radius: var(--radius);
  object-fit: cover;
  margin: 0 auto 16px;
}

.team-card h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.team-card .role,
.advisor-card .role {
  font-size: 0.85rem;
  color: var(--slate-light);
  font-weight: 500;
}

/* Advisors */

.advisor-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.advisor-card {
  text-align: center;
  padding: 24px 18px;
}

.advisor-card .avatar-photo {
  width: 100px;
  height: 100px;
  margin-bottom: 14px;
}

.advisor-card h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.advisor-card .role {
  margin-bottom: 16px;
}

.advisor-companies {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
}

.advisor-companies li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* FAQ */

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.faq-item p {
  margin: 0;
}

/* Forms */

.form-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--paper);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field-currency {
  position: relative;
}

.field-currency .prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-light);
  font-size: 0.96rem;
}

.field-currency input {
  padding-left: 28px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--slate-light);
  margin-top: 4px;
}

/* Honeypot: present in the DOM for bots that scrape every input, but kept
   off-screen (not display:none) for real users and assistive tech. Some
   simple bots specifically skip display:none fields, so positioning is used
   instead. */
.form-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  font-size: 0.88rem;
  color: #b42318;
  margin-top: 12px;
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: #aab4c8;
  padding: 64px 0 32px;
  margin-top: 96px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #26314c;
}

.footer-grid .brand {
  color: var(--paper);
  margin-bottom: 12px;
}

.footer-grid p {
  color: #8b96ac;
  font-size: 0.9rem;
  max-width: 32ch;
}

.footer-col h4 {
  color: var(--paper);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

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

.footer-col a {
  color: #aab4c8;
  text-decoration: none;
  font-size: 0.92rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.85rem;
  color: #6f7a91;
  flex-wrap: wrap;
  gap: 12px;
}

/* Page hero (interior pages) */

.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  max-width: 30ch;
}

.page-hero p {
  max-width: 60ch;
  font-size: 1.05rem;
}

.legal p, .legal li {
  color: var(--slate);
}

.legal h2 {
  margin-top: 2em;
  font-size: 1.3rem;
}

.legal-updated {
  color: var(--slate-light);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

/* Churn-to-growth chart animation */

#churn-chart-svg .churn-fill,
#churn-chart-svg .baseline-fill,
#churn-chart-svg .recover-fill {
  transition-property: height, y;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  /* transition-duration is set inline per phase by the animation script */
}

@media (prefers-reduced-motion: reduce) {
  #churn-chart-svg .churn-fill,
  #churn-chart-svg .baseline-fill,
  #churn-chart-svg .recover-fill {
    transition: none;
  }
}

/* Responsive */

@media (max-width: 880px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }

  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle-checkbox:checked ~ .main-nav {
    max-height: 400px;
    padding: 8px 24px 16px;
  }

  .form-panel {
    grid-template-columns: 1fr;
  }

  .steps,
  .grid-3,
  .grid-4,
  .advisor-grid {
    grid-template-columns: 1fr 1fr;
  }

  .team-card {
    flex-basis: calc(50% - 12px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-compare,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header .container {
    height: auto;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand {
    font-size: 0.9rem;
    gap: 8px;
  }

  .header-cta .btn {
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  .steps,
  .grid-3,
  .grid-4,
  .footer-grid,
  .advisor-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    flex-basis: 100%;
  }

  .hero-stats {
    flex-wrap: wrap;
    row-gap: 18px;
  }

  .cta-band {
    padding: 40px 24px;
    margin: 0 16px;
  }

  .section {
    padding: 56px 0;
  }
}
