/* ==========================================================================
   FinishBay marketing site — shared styles
   Design tokens mirror the app (receipt-matcher/src/app/globals.css) so the
   marketing site feels continuous with the product. Light theme only.
   ========================================================================== */

:root {
  /* Brand accent (slate-900) */
  --accent:            #0f172a;
  --accent-foreground: #ffffff;
  --accent-hover:      #1e293b;
  --accent-soft:       rgba(15, 23, 42, 0.06);

  /* Surfaces & text (slate scale) */
  --app-bg:      #f8fafc;
  --surface:     #ffffff;
  --surface-2:   #f1f5f9;
  --surface-3:   #e2e8f0;
  --border:      #e2e8f0;
  --border-soft: #f1f5f9;
  --text:        #0f172a;
  --text-muted:  #475569;
  --text-subtle: #94a3b8;

  /* Accents for highlights */
  --positive:    #059669;
  --positive-bg: #ecfdf5;
  --warn:        #b45309;
  --warn-bg:     #fffbeb;
  --warn-border: #fde68a;

  /* Shape & depth */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -16px rgba(15, 23, 42, 0.18);

  --container: 1120px;
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--app-bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; color: var(--text); }
p { margin: 0; }

/* Anchor offset so #beta lands below the sticky nav */
:target { scroll-margin-top: 110px; }

/* ---- Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 88px; }
.section--tight { padding-block: 56px; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

.section__head { max-width: 680px; margin-bottom: 48px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section__lead { margin-top: 16px; font-size: 18px; color: var(--text-muted); }

.lead { font-size: 19px; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: var(--accent-foreground); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--outline:hover { border-color: var(--text-subtle); background: var(--surface-2); }

.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--accent-soft); }

.btn--light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.24); }
.btn--light:hover { background: rgba(255,255,255,.2); }
.btn--on-dark { background: #fff; color: var(--accent); }
.btn--on-dark:hover { background: #e2e8f0; }

/* ---- Beta banner --------------------------------------------------------- */
.beta-banner {
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}
.beta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 9px;
  text-align: center;
}
.beta-banner__link {
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.5);
  padding-bottom: 1px;
}
.beta-banner__link:hover { border-color: #fff; }

/* ---- Nav ----------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font-size: 20px; letter-spacing: -0.03em; color: var(--text); }
.brand__name-accent { color: var(--text-subtle); font-weight: 700; }

.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 10px; }

/* Mobile toggle (checkbox hack) */
.nav__toggle { display: none; width: 44px; height: 44px; cursor: pointer; }
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span { position: relative; display: block; margin: 21px auto; }
.nav__toggle span::before { top: -7px; left: 0; }
.nav__toggle span::after  { top:  7px; left: 0; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding-block: 84px 64px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(15,23,42,.06), transparent 60%),
    radial-gradient(700px 360px at 0% 0%, rgba(15,23,42,.04), transparent 55%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .grad { background: linear-gradient(120deg, #0f172a, #475569); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin-top: 22px; font-size: 20px; color: var(--text-muted); max-width: 560px; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 18px; font-size: 14px; color: var(--text-subtle); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid var(--warn-border);
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

/* Faux app preview card */
.preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.preview__bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.preview__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.preview__body { padding: 20px; display: grid; gap: 14px; }
.preview__row { display: flex; align-items: center; gap: 12px; }
.preview__chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.chip-blue   { background: #eff6ff; color: #1d4ed8; }
.chip-amber  { background: #fffbeb; color: #b45309; }
.chip-green  { background: var(--positive-bg); color: var(--positive); }
.chip-violet { background: #f5f3ff; color: #6d28d9; }
.preview__line { height: 10px; border-radius: 6px; background: var(--surface-2); flex: 1; }
.preview__line.short { max-width: 90px; }
.preview__stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.preview__stat > div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; }
.preview__stat b { font-size: 20px; display: block; }
.preview__stat span { font-size: 12px; color: var(--text-subtle); }

/* ---- Pipeline strip ------------------------------------------------------ */
.pipeline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.pipeline__step {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.pipeline__num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.pipeline__arrow { color: var(--text-subtle); font-size: 18px; }

/* ---- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card--hover:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--surface-3); }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; font-weight: 700; }
.card p { margin-top: 8px; color: var(--text-muted); font-size: 15px; }

.feature-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.feature-list li { display: flex; gap: 10px; font-size: 15px; color: var(--text-muted); }
.feature-list li::before {
  content: ""; flex: none; margin-top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--positive-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ---- Trade / edition teaser --------------------------------------------- */
.trade-row { display: flex; align-items: flex-start; gap: 16px; }
.trade-row__num {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent); color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---- Pricing ------------------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.plan--featured { border-color: var(--accent); box-shadow: var(--shadow); position: relative; }
.plan__flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.plan__name { font-size: 19px; font-weight: 800; }
.plan__for { margin-top: 6px; font-size: 14px; color: var(--text-subtle); min-height: 40px; }
.plan__price { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.plan__price b { display: block; font-size: 17px; font-weight: 800; }
.plan__price span { font-size: 13px; color: var(--text-subtle); }
.plan__tiers { margin-top: 16px; display: grid; gap: 10px; }
.tier {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.tier b { font-size: 14px; }
.tier p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.plan .feature-list { margin-top: 18px; }
.plan .btn { margin-top: 22px; }
.plan__spacer { flex: 1; }

/* ---- Comparison table ---------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.compare { width: 100%; border-collapse: collapse; min-width: 720px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.compare thead th { font-size: 14px; font-weight: 700; color: var(--text); background: var(--surface-2); }
.compare thead th.col-fb { background: var(--accent); color: #fff; }
.compare tbody th { font-weight: 600; font-size: 15px; color: var(--text); width: 34%; }
.compare td { text-align: center; font-size: 14px; color: var(--text-muted); }
.compare td.col-fb { background: rgba(15,23,42,.03); font-weight: 600; color: var(--text); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: none; }
.yes { color: var(--positive); font-weight: 700; }
.no  { color: var(--text-subtle); }
.partial { color: var(--warn); font-weight: 600; }
.ic { display: inline-block; vertical-align: middle; }

/* ---- Contact / forms ----------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }

.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field .req { color: #dc2626; }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honeypot { position: absolute; left: -9999px; top: -9999px; }

.form-status { margin-top: 16px; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; font-weight: 500; display: none; }
.form-status.is-success { display: block; background: var(--positive-bg); color: #065f46; border: 1px solid #a7f3d0; }
.form-status.is-error   { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.info-card + .info-card { margin-top: 20px; }
.info-card h3 { font-size: 17px; font-weight: 700; }
.info-card p { margin-top: 8px; color: var(--text-muted); font-size: 15px; }
.info-card a.email { font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }

/* ---- CTA band ------------------------------------------------------------ */
.cta {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 80% 0%, rgba(255,255,255,.10), transparent 60%);
}
.cta h2 { position: relative; font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; color: #fff; }
.cta p { position: relative; margin-top: 14px; font-size: 18px; color: rgba(255,255,255,.8); max-width: 600px; margin-inline: auto; }
.cta__actions { position: relative; margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- FAQ ----------------------------------------------------------------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 14px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 20px; box-shadow: var(--shadow-sm);
}
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--text-subtle); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 16px; color: var(--text-muted); }

/* ---- Footer -------------------------------------------------------------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 56px 28px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer__tagline { margin-top: 14px; color: var(--text-muted); font-size: 15px; max-width: 320px; }
.footer__beta { margin-top: 14px; font-size: 14px; color: var(--text-subtle); }
.footer__beta a { color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border); }
.footer__col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); margin-bottom: 14px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__col a { color: var(--text-muted); font-size: 15px; }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text-subtle); font-size: 13px;
}

/* ---- Misc utilities ------------------------------------------------------ */
.center { text-align: center; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 44px; }
.maxw { max-width: 760px; }
.maxw.center { margin-inline: auto; }
.divider { height: 1px; background: var(--border); border: none; margin-block: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__preview { order: -1; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .section { padding-block: 60px; }
  .hero { padding-block: 56px 40px; }

  /* Mobile nav */
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav__toggle-checkbox:checked ~ .nav__menu { display: flex; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__links li { border-bottom: 1px solid var(--border-soft); }
  .nav__links a { display: block; padding: 14px 0; font-size: 16px; }
  .nav__actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 16px; }
  .nav__actions .btn { width: 100%; }

  .field-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .cta { padding: 40px 24px; }
  .preview__stat { grid-template-columns: 1fr; }
}

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