/* ===========================================================
   Surplus Funds Recovery USA — Design System
   Editorial / registry aesthetic: quiet, documentary, confident.
   Signature: hairline "ledger" dividers + corner-bracket frames,
   standing in for the paper trail this business is built on.
   =========================================================== */

:root {
  /* Color */
  --paper: #FBFAF8;
  --paper-tint: #F3EEE8;
  --ink: #201229;
  --ink-soft: #4A3B57;
  --deep-purple: #422367;
  --purple: #5E318A;
  --gold: #A76839;
  --gold-light: #EDBD7E;
  --earth: #643A39;
  --neutral: #8B7268;
  --line: #E4DCD3;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.55rem + 1vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.9rem + 1.75vw, 3.25rem);
  --step-4: clamp(2.75rem, 2.2rem + 2.75vw, 4.5rem);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --container: 1180px;
  --radius: 3px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; color: var(--deep-purple); }
p { margin: 0 0 1em; }
a { color: var(--purple); }
ul, ol { margin: 0; padding: 0; }
button { font-family: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  background: var(--deep-purple);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--space-sm); }

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.4em;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* ---------- Ledger divider (signature motif) ---------- */
.ledger-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  position: relative;
}
.section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--neutral);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 auto;
  max-width: var(--container);
  padding: 0 var(--space-md);
}
.section-divider::before,
.section-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-sm);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--deep-purple);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.wordmark strong { font-weight: 600; }
.wordmark span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--neutral);
  text-transform: uppercase;
  margin-top: 2px;
}
.nav {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav a:hover { color: var(--purple); }
.header-actions { display: flex; align-items: center; gap: var(--space-sm); }
.menu-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; padding: var(--space-sm) var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.mobile-nav a { color: var(--ink); text-decoration: none; font-size: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover { background: var(--earth); }
.btn-ghost {
  background: transparent;
  border-color: var(--deep-purple);
  color: var(--deep-purple);
}
.btn-ghost:hover { background: var(--deep-purple); color: var(--white); }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-2xl) var(--space-xl);
  position: relative;
}
.hero__inner {
  max-width: 760px;
}
.hero h1 {
  font-size: var(--step-4);
  margin-block: var(--space-md) var(--space-md);
  color: var(--deep-purple);
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero__photo {
  max-width: 340px;
  margin: 0 0 var(--space-lg);
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
}
.hero__sub {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 55ch;
  margin-bottom: var(--space-lg);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin-bottom: var(--space-md); }
.hero__note {
  font-size: 0.85rem;
  color: var(--neutral);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* ---------- Section rhythm ---------- */
.section { padding-block: var(--space-2xl); }
#what-are-surplus-funds,
#how-it-works,
#faq,
#about,
#check {
  scroll-margin-top: 110px;
}
.section--tint { background: var(--paper-tint); }
.section__head { max-width: 640px; margin-bottom: var(--space-lg); }
.section__head h2 { font-size: var(--step-3); margin-top: var(--space-sm); }
.section__head p { color: var(--ink-soft); font-size: var(--step-0); margin-top: var(--space-sm); }

/* ---------- Two column ---------- */
.grid-2 {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.prose p { color: var(--ink-soft); max-width: 55ch; }
.prose p + p { margin-top: 1em; }

/* ---------- Breakdown bar (surplus visual) ---------- */
.breakdown {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-lg);
  background: var(--white);
}
.breakdown__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neutral);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.breakdown__bar {
  display: flex;
  height: 44px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.breakdown__segment { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--white); }
.breakdown__segment--debt { background: var(--neutral); flex: 62; }
.breakdown__segment--costs { background: var(--earth); flex: 13; }
.breakdown__segment--surplus { background: var(--gold); flex: 25; color: var(--ink); font-weight: 600; }
.breakdown__legend { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-md); font-size: 0.82rem; color: var(--ink-soft); }
.breakdown__legend span { display: inline-flex; align-items: center; gap: 0.5em; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.swatch--debt { background: var(--neutral); }
.swatch--costs { background: var(--earth); }
.swatch--surplus { background: var(--gold); }
.breakdown__foot { margin-top: var(--space-md); font-size: 0.8rem; color: var(--neutral); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  border-top: 2px solid var(--deep-purple);
  padding-top: var(--space-sm);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.step h3 { font-size: var(--step-1); margin-top: 0.4em; margin-bottom: 0.4em; }
.step p { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--deep-purple);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 1px solid var(--deep-purple);
  border-radius: 50%;
  position: relative;
}
.faq-item summary .icon::before,
.faq-item summary .icon::after {
  content: "";
  position: absolute;
  background: var(--deep-purple);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-item summary .icon::before { width: 10px; height: 1.5px; }
.faq-item summary .icon::after { width: 1.5px; height: 10px; transition: transform 0.2s var(--ease); }
.faq-item[open] summary .icon::after { transform: translate(-50%, -50%) scaleY(0); }
.faq-item .faq-answer { padding-bottom: var(--space-md); color: var(--ink-soft); max-width: 65ch; }

/* ---------- Founder ---------- */
.founder {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 800px) {
  .founder { grid-template-columns: 280px 1fr; }
}
.founder__frame {
  position: relative;
  padding: 14px;
}
.founder__frame::before,
.founder__frame::after,
.founder__frame > .corner-tl,
.founder__frame > .corner-br {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--gold);
  border-style: solid;
}
.founder__frame::before { top: 0; left: 0; border-width: 2px 0 0 2px; }
.founder__frame::after { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
.founder__frame img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.founder__note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neutral);
  margin-top: var(--space-sm);
}
.founder h3 { font-size: var(--step-2); margin-bottom: var(--space-sm); }
.founder .prose p { max-width: 62ch; }

/* ---------- Form ---------- */
.form-section { background: var(--deep-purple); color: var(--white); }
.form-section .section__head h2 { color: var(--white); }
.form-section .section__head p { color: rgba(255,255,255,0.75); }
.form-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: var(--space-lg);
  max-width: 640px;
}
.form-row { display: grid; gap: var(--space-md); grid-template-columns: 1fr; margin-bottom: var(--space-md); }
@media (min-width: 640px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4em;
  color: var(--ink);
}
.field .hint { font-size: 0.78rem; color: var(--neutral); margin-top: 0.3em; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field.has-error input,
.field.has-error select { border-color: #B3261E; }
.field-error {
  display: none;
  color: #B3261E;
  font-size: 0.8rem;
  margin-top: 0.35em;
}
.field.has-error .field-error { display: block; }

.consent {
  display: flex;
  gap: 0.75em;
  align-items: flex-start;
  background: var(--paper-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
}
.consent input { margin-top: 0.25em; width: 18px; height: 18px; flex-shrink: 0; }
.consent label { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; }

.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { font-size: 0.78rem; color: var(--neutral); margin-top: var(--space-sm); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.65);
  padding-block: var(--space-xl) var(--space-lg);
  font-size: 0.85rem;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.footer-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-lg);
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6em; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-md);
  line-height: 1.7;
}
.footer-disclaimer p { max-width: 90ch; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
}

/* ---------- Legal pages ---------- */
.legal-page { padding-block: var(--space-2xl); }
.legal-page .container { max-width: 780px; }
.legal-page h1 { font-size: var(--step-3); margin-bottom: var(--space-sm); }
.legal-page .updated { font-family: var(--font-mono); font-size: 0.75rem; color: var(--neutral); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-lg); }
.legal-page h2 { font-size: var(--step-1); margin-top: var(--space-lg); margin-bottom: var(--space-sm); }
.legal-page p, .legal-page li { color: var(--ink-soft); }
.legal-page ul { padding-left: 1.2em; margin-bottom: 1em; }
.legal-page li { margin-bottom: 0.5em; }

/* ---------- Thank you ---------- */
.confirm-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-2xl);
}
.confirm-page .container { max-width: 620px; text-align: left; }
.confirm-page h1 { font-size: var(--step-3); margin-bottom: var(--space-md); }
.confirm-page p { color: var(--ink-soft); }
