/* Bridge Lending Capital */
/* Design: Exaggerated Minimalism + Trust & Authority */
/* Palette: Navy #0a1f44 + Gold #c9a04e + Cream #f8f6f2 */
/* Typography: Instrument Serif + DM Sans + DM Mono */

/* ===== RESET & TOKENS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --navy: #0a1f44;
  --navy-light: #1a3564;
  --gold: #c9a04e;
  --gold-light: #d4b97a;
  --gold-dim: rgba(201, 160, 78, 0.15);
  --cream: #f8f6f2;
  --cream-dark: #f0ede7;
  --white: #fffefa;
  --charcoal: #111827;
  --charcoal-light: #1f2937;
  --text: #334155;
  --text-muted: #64748b;
  --text-light: rgba(255, 255, 255, 0.75);
  --border: #e5e2dc;
  --border-light: rgba(255, 255, 255, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 31, 68, 0.08);
  --shadow-lg: 0 8px 32px rgba(10, 31, 68, 0.12);

  /* Radius */
  --radius: 8px;
  --radius-lg: 12px;

  /* Fonts */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(248, 246, 242, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(248, 246, 242, 0.95);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-img {
  height: 36px;
  width: auto;
}

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

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gold);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
  opacity: 0;
}
.mobile-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cream);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-nav-links a {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--navy);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(201, 160, 78, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--navy);
  color: var(--cream);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 14px;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== HERO ===== */
.hero {
  padding: calc(var(--header-h) + 80px) 0 100px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: var(--cream);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  justify-content: center;
}

.hero-content {
  text-align: center;
  max-width: 720px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 28px;
}

.hero-headline em {
  color: var(--gold);
  font-style: italic;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Hero visual placeholder */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-placeholder {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 7 / 8;
  background: linear-gradient(135deg, rgba(10, 31, 68, 0.03) 0%, rgba(201, 160, 78, 0.06) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Bridge arch decorative element */
.hero-arch {
  width: 200px;
  height: 120px;
  border: 3px solid var(--gold);
  border-bottom: none;
  border-radius: 200px 200px 0 0;
  opacity: 0.3;
  position: relative;
}

.hero-arch::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -40px;
  right: -40px;
  height: 3px;
  background: var(--gold);
  opacity: 0.3;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--navy);
  padding: 48px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value-static {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--gold);
  line-height: 1.2;
  white-space: nowrap;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border-light);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Light variants (for dark bg sections) */
.section-eyebrow--light { color: var(--gold); }
.section-title--light { color: var(--white); }

/* ===== PROGRAMS ===== */
.programs {
  padding: 120px 0;
  background: var(--cream);
}

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

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  will-change: transform;
}

.program-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.program-number {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--navy);
  opacity: 0.08;
  line-height: 1;
  margin-bottom: 16px;
}

.program-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 4px;
}

.program-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.program-desc {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.6;
}

.program-specs {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-bottom: 20px;
}

.program-specs li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(229, 226, 220, 0.5);
}

.program-specs li:last-child { border-bottom: none; }

.spec-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.spec-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}

.program-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold);
  transition: color 0.2s;
}

.program-cta:hover,
.program-cta:focus-visible {
  color: var(--navy);
}

/* Asset classes strip */
.asset-strip {
  text-align: center;
  padding: 40px 0 0;
  border-top: 1px solid var(--border);
}

.asset-strip-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.asset-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.asset-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--navy);
  background: rgba(10, 31, 68, 0.05);
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(10, 31, 68, 0.08);
}

/* ===== PROCESS (HOW IT WORKS) ===== */
.process {
  padding: 120px 0;
  background: var(--charcoal);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.process-card {
  padding: 32px 28px;
}

.process-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
  border: 1px solid rgba(201, 160, 78, 0.3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 160, 78, 0.4), rgba(201, 160, 78, 0));
}

.step-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== WHY US (ADVANTAGE CARDS) ===== */
.why-broker {
  padding: 120px 0;
  background: var(--cream);
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.advantage-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  will-change: transform;
}

.advantage-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.advantage-icon {
  margin-bottom: 20px;
}

.advantage-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 10px;
}

.advantage-desc {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

/* ===== SUBMIT A DEAL ===== */
.submit {
  padding: 120px 0;
  background: var(--navy);
}

.submit-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.submit-desc {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.submit-desc strong {
  color: var(--gold);
}

.submit-promise {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.submit-promise svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Form */
.deal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 160, 78, 0.2);
  margin-top: 8px;
}

.deal-form label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.req {
  color: var(--gold);
}

.deal-form input,
.deal-form select,
.deal-form textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: #ffffff;
  transition: border-color 0.2s, background 0.2s;
  min-height: 48px;
}

.deal-form input::placeholder,
.deal-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.deal-form 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='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.deal-form select option {
  background: var(--charcoal);
  color: #ffffff;
}

.deal-form input:focus,
.deal-form select:focus,
.deal-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
}

.deal-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Submit button */
.btn-submit {
  width: 100%;
  position: relative;
  margin-top: 8px;
}

.btn-loading {
  display: none;
}

.btn-submit.loading .btn-text,
.btn-submit.loading .btn-arrow {
  visibility: hidden;
}

.btn-submit.loading .btn-loading {
  display: flex;
  position: absolute;
}

/* Form feedback */
.form-feedback {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(22, 101, 52, 0.2);
  color: #86efac;
  border: 1px solid rgba(22, 101, 52, 0.3);
}

.form-feedback.error {
  display: block;
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--charcoal);
  padding: 64px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-light);
}

.footer-logo {
  height: 32px;
  width: auto;
  margin-bottom: 12px;
  /* Invert to white for dark bg */
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.footer-nav {
  display: flex;
  gap: 64px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--gold); }

/* ===== ANIMATIONS (reveal state) ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback for no-JS */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .hero-headline, .hero-sub, .hero-eyebrow, .hero-ctas {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-content { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .programs-grid { grid-template-columns: 1fr 1fr; }
  .submit-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .submit-content { text-align: center; }
  .submit-promise { justify-content: center; }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --header-h: 64px;
  }

  .main-nav { display: none; }
  .mobile-toggle { display: flex; }

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

  .process-steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .step-line { display: none; }
  .advantage-grid { grid-template-columns: 1fr; }

  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .stat-divider { display: none; }

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

  .footer-inner {
    flex-direction: column;
    gap: 40px;
  }
  .footer-nav { gap: 40px; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding-bottom: 60px;
  }

  .comparison-wrap { margin: 0 -20px; padding: 0 20px; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 36px; }
  .section-title { font-size: 28px; }
  .stat-number { font-size: 28px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn-lg { padding: 14px 28px; }
}
