/* ============================================================
   InstaFunding LLC — Design System
   Institutional dark fintech. Mobile-first.
   ============================================================ */

:root {
  --ink: #070706;            /* page background — rich black */
  --surface: #0d0c0a;        /* section alt background */
  --card: #141210;           /* card background — warm black */
  --card-2: #1b1814;         /* elevated card */
  --line: rgba(244, 228, 188, 0.08);
  --line-strong: rgba(244, 228, 188, 0.16);
  --text: #f6f2e8;
  --text-dim: #b6ad99;
  --text-faint: #857c68;
  --accent: #e9b94f;         /* primary accent — brand gold */
  --accent-strong: #c8912a;
  --accent-ink: #1e1503;
  --gold: #f3d689;           /* light gold — highlights */
  --danger: #e2606c;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font-display: "Marcellus", "Georgia", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.008em;
}

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

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section { padding: 88px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 17.5px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 7, 6, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 11px;
  font-family: "Cinzel", "Marcellus", serif; font-weight: 700; font-size: 17px;
  letter-spacing: 0.09em; text-transform: uppercase;
  background: linear-gradient(180deg, #f6d989 0%, #e9b94f 45%, #c8912a 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.logo .mark { height: 44px; width: auto; flex: none; }
.logo span em { font-style: normal; }

.nav-links { display: none; align-items: center; gap: 30px; list-style: none; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 15px; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav .nav-cta { display: none !important; }
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 22px 26px; border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 6, 0.97);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text-dim); padding: 11px 0; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 12px; justify-content: center; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav .nav-cta { display: inline-flex !important; }
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 15.5px;
  padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #f3cf6f, #c8912a);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px rgba(233, 185, 79, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(233, 185, 79, 0.32); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 36px; font-size: 17px; }
.btn-sm { padding: 11px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 92px 0 76px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(233, 185, 79, 0.13), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(233, 185, 79, 0.05), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; gap: 48px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 60px); margin: 18px 0 20px; }
.hero h1 .hl { color: var(--accent); }
.hero .lede { font-size: clamp(17px, 2vw, 20px); color: var(--text-dim); max-width: 560px; margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-note { font-size: 13.5px; color: var(--text-faint); }

.hero-panel {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow);
}
.hero-panel h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 20px; font-weight: 600; }
.hero-panel ul { list-style: none; display: grid; gap: 16px; }
.hero-panel li { display: flex; gap: 13px; align-items: flex-start; color: var(--text-dim); font-size: 15.5px; }
.hero-panel li strong { color: var(--text); display: block; font-size: 16px; }
.check {
  flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px;
  background: rgba(233, 185, 79, 0.14); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}

@media (min-width: 960px) {
  .hero .container { grid-template-columns: 1.15fr 0.85fr; align-items: center; }
}

/* ---------- Stat bar ---------- */
.statbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.statbar .container {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; padding-top: 34px; padding-bottom: 34px;
}
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3vw, 34px); color: var(--text); }
.stat .num em { color: var(--accent); font-style: normal; }
.stat .label { font-size: 13.5px; color: var(--text-faint); margin-top: 4px; }
@media (min-width: 760px) { .statbar .container { grid-template-columns: repeat(4, 1fr); } }

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.18s, border-color 0.18s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(233, 185, 79, 0.35); }
.card h3 { font-size: 19px; margin: 16px 0 10px; }
.card p { color: var(--text-dim); font-size: 15.5px; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(233, 185, 79, 0.1); border: 1px solid rgba(233, 185, 79, 0.25);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}

.step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(233, 185, 79, 0.12); border: 1px solid rgba(233, 185, 79, 0.3);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}

/* ---------- Comparison ---------- */
.compare { display: grid; gap: 22px; }
@media (min-width: 860px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-col { border-radius: var(--radius-lg); padding: 34px 30px; border: 1px solid var(--line); background: var(--card); }
.compare-col.win { border-color: rgba(233, 185, 79, 0.4); background: linear-gradient(180deg, rgba(233, 185, 79, 0.06), var(--card)); }
.compare-col h3 { font-size: 21px; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.compare-col ul { list-style: none; display: grid; gap: 15px; }
.compare-col li { display: flex; gap: 12px; color: var(--text-dim); font-size: 15.5px; align-items: flex-start; }
.x-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px; background: rgba(226, 96, 108, 0.12); color: var(--danger); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }

/* ---------- Callout / not-a-loan ---------- */
.callout {
  border: 1px solid rgba(216, 180, 90, 0.35);
  background: linear-gradient(180deg, rgba(233, 185, 79, 0.05), var(--card));
  border-radius: var(--radius-lg);
  padding: 38px 32px;
}
.callout .eyebrow { color: var(--gold); }
.callout h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 14px; }
.callout p { color: var(--text-dim); max-width: 820px; }
.callout p + p { margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 50% -40%, rgba(233, 185, 79, 0.16), transparent 65%),
    var(--surface);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: center; padding: 78px 0;
}
.cta-band h2 { font-size: clamp(28px, 4.4vw, 42px); margin-bottom: 14px; }
.cta-band p { color: var(--text-dim); max-width: 560px; margin: 0 auto 30px; }
.cta-band .hero-note { display: block; margin-top: 18px; }

/* ---------- Industry strip ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 11px; }
.chip {
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-strong); color: var(--text-dim); background: var(--card);
}

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 22px 24px; color: var(--text); font-family: var(--font-body);
  font-size: 16.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-q .chev { flex: none; transition: transform 0.2s; color: var(--accent); font-size: 18px; }
.faq-item.open .faq-q .chev { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.faq-a-inner { padding: 0 24px 24px; color: var(--text-dim); font-size: 15.5px; }
.faq-a-inner p + p { margin-top: 10px; }

/* ---------- Product detail ---------- */
.product {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--card); padding: 40px 34px; margin-bottom: 30px;
}
.product.flagship { border-color: rgba(233, 185, 79, 0.4); background: linear-gradient(180deg, rgba(233, 185, 79, 0.05), var(--card)); }
.product .tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
  background: rgba(233, 185, 79, 0.12); color: var(--accent); border: 1px solid rgba(233, 185, 79, 0.3);
}
.product .tag.gold { background: rgba(216, 180, 90, 0.1); color: var(--gold); border-color: rgba(216, 180, 90, 0.3); }
.product h2 { font-size: clamp(23px, 3vw, 30px); margin-bottom: 12px; }
.product > p { color: var(--text-dim); max-width: 800px; }
.product-cols { display: grid; gap: 26px; margin-top: 28px; }
@media (min-width: 820px) { .product-cols { grid-template-columns: repeat(3, 1fr); } }
.product-cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 12px; }
.product-cols ul { list-style: none; display: grid; gap: 9px; }
.product-cols li { color: var(--text-dim); font-size: 15px; padding-left: 20px; position: relative; }
.product-cols li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.product .fine { font-size: 13px; color: var(--text-faint); margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.product .cta-row { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Application form ---------- */
.apply-wrap { max-width: 680px; margin: 0 auto; }
.progress { display: flex; gap: 8px; margin-bottom: 34px; }
.progress span { height: 5px; flex: 1; border-radius: 99px; background: var(--line-strong); transition: background 0.25s; }
.progress span.done { background: var(--accent); }

.form-card {
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 40px 34px; box-shadow: var(--shadow);
}
@media (max-width: 560px) { .form-card { padding: 30px 22px; } }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.form-step h2 { font-size: 23px; margin-bottom: 8px; }
.form-step .sub { color: var(--text-dim); font-size: 15px; margin-bottom: 26px; }

.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  background: var(--ink); border: 1px solid var(--line-strong); color: var(--text);
  font-family: var(--font-body); font-size: 16px; transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a7b1c4' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.field.error input, .field.error select { border-color: var(--danger); }
.field .err-msg { display: none; font-size: 12.5px; color: var(--danger); margin-top: 6px; }
.field.error .err-msg { display: block; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.radio-cards { display: grid; gap: 10px; }
.radio-cards label {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 15px 17px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--ink); font-weight: 500; font-size: 15px; margin-bottom: 0; transition: border-color 0.15s, background 0.15s;
}
.radio-cards label:has(input:checked) { border-color: var(--accent); background: rgba(233, 185, 79, 0.06); }
.radio-cards input { width: auto; accent-color: var(--accent); }

.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--text-faint); margin-bottom: 16px; }
.consent input { margin-top: 3px; accent-color: var(--accent); width: auto; }

.form-nav { display: flex; gap: 12px; margin-top: 30px; }
.form-nav .btn-back { flex: 0 0 auto; }
.form-nav .btn-next { flex: 1; }

.apply-side-note { text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-faint); }

/* ---------- Legal pages ---------- */
.legal-body { max-width: 820px; }
.legal-body h2 { font-size: 22px; margin: 42px 0 14px; }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--text-dim); font-size: 15.5px; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { margin: 12px 0 12px 22px; }
.legal-body .updated { font-size: 13px; color: var(--text-faint); margin-bottom: 34px; }
.legal-toc { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 42px; }
.legal-toc h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 12px; }
.legal-toc ol { margin-left: 20px; color: var(--text-dim); font-size: 15px; display: grid; gap: 6px; }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding: 76px 0 56px; position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 340px at 85% -20%, rgba(233, 185, 79, 0.1), transparent 60%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(32px, 4.6vw, 48px); margin: 16px 0 16px; position: relative; }
.page-hero p { color: var(--text-dim); max-width: 680px; font-size: 17.5px; position: relative; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 64px 0 40px; }
.footer-grid { display: grid; gap: 38px; margin-bottom: 46px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; } }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 14.5px; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--text-faint); font-size: 14px; margin-top: 14px; max-width: 340px; }
.footer-contact li { color: var(--text-dim); font-size: 14.5px; }
.footer-disclaimer {
  border-top: 1px solid var(--line); padding-top: 28px;
  font-size: 12px; color: var(--text-faint); line-height: 1.7;
}
.footer-disclaimer p + p { margin-top: 10px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-top: 26px; font-size: 12.5px; color: var(--text-faint); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; } .mt-4 { margin-top: 48px; }
.success-panel { max-width: 640px; margin: 0 auto; text-align: center; }
.success-panel .big-check {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 26px;
  background: rgba(233, 185, 79, 0.12); border: 1px solid rgba(233, 185, 79, 0.4);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 30px; font-weight: 800;
}
