/* ==========================================================
   BYB — Build Your Business
   Design tokens
   Navy = trust/institution, Orange = growth/action, taken
   directly from the BYB mark. Sora for display type (confident,
   geometric — reads like a fintech wordmark), Inter for body,
   IBM Plex Mono for figures/money so numbers feel like data.
   ========================================================== */
:root{
  --navy: #12235C;
  --navy-deep: #0B1740;
  --navy-tint: #EEF1FA;
  --orange: #F26B21;
  --orange-deep: #D9560F;
  --orange-tint: #FDEEE3;
  --ink: #0B0B0E;
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --border: #E4E7F0;
  --text: #1C2130;
  --text-muted: #5B6472;
  --success: #1E8E5A;
  --success-tint: #E7F5EE;
  --danger: #D64545;
  --danger-tint: #FBEAEA;
  --warn: #B8790C;
  --warn-tint: #FBF0DE;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11,23,64,.06), 0 1px 1px rgba(11,23,64,.04);
  --shadow-md: 0 8px 24px rgba(11,23,64,.08);
  --shadow-lg: 0 20px 48px rgba(11,23,64,.14);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--navy-deep); margin: 0 0 .5em; line-height: 1.15; }
h1{ font-weight: 800; }
h2{ font-weight: 700; }
h3{ font-weight: 700; }
p{ margin: 0 0 1em; }
a{ color: inherit; text-decoration: none; }
.container{ max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.mono{ font-family: var(--font-mono); }
img{ max-width: 100%; display: block; }
:focus-visible{ outline: 3px solid var(--orange); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------- Buttons ---------------- */
.btn{
  display: inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font-body); white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover{ background: var(--orange-deep); }
.btn-navy{ background: var(--navy); color:#fff; }
.btn-navy:hover{ background: var(--navy-deep); }
.btn-ghost{ background: transparent; color: var(--navy-deep); border-color: var(--border); }
.btn-ghost:hover{ border-color: var(--navy); background: var(--navy-tint); }
.btn-danger{ background: var(--danger); color:#fff; }
.btn-sm{ padding: 7px 14px; font-size: 13px; }
.btn-block{ width: 100%; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* ---------------- Header ---------------- */
.site-header{ position: sticky; top:0; z-index: 40; background: rgba(246,247,251,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner{ display:flex; align-items:center; justify-content: space-between; gap: 20px; height: 76px; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand-word{ font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--navy-deep); display:flex; flex-direction:column; line-height:1; }
.brand-sub{ font-family: var(--font-body); font-weight: 500; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-deep); margin-top:3px; }
.main-nav{ display:flex; gap: 28px; font-weight: 600; font-size: 14.5px; color: var(--text); }
.main-nav a:hover{ color: var(--orange-deep); }
.header-actions{ display:flex; align-items:center; gap:12px; }
.user-chip{ font-size: 13.5px; font-weight:600; color: var(--navy-deep); background: var(--navy-tint); padding: 8px 14px; border-radius: 999px; }
.user-chip em{ font-style: normal; color: var(--text-muted); font-weight:500; margin-left:4px; }
.nav-toggle{ display:none; flex-direction:column; gap:4px; background:none; border:none; cursor:pointer; padding:8px; }
.nav-toggle span{ width:22px; height:2px; background: var(--navy-deep); border-radius:2px; }

@media (max-width: 900px){
  .main-nav{ position:absolute; top:76px; left:0; right:0; background: var(--surface); border-bottom:1px solid var(--border);
    flex-direction:column; padding: 16px 24px; gap:16px; display:none; box-shadow: var(--shadow-md); }
  .main-nav.open{ display:flex; }
  .nav-toggle{ display:flex; }
  .user-chip{ display:none; }
}

.flash-wrap{ padding-top: 18px; }
.flash{ padding: 12px 18px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight:500; margin-bottom: 8px; }
.flash-error{ background: var(--danger-tint); color: var(--danger); }
.flash-success{ background: var(--success-tint); color: var(--success); }

/* ---------------- Hero ---------------- */
.hero{ padding: 72px 0 60px; overflow:hidden; }
.hero-inner{ display:grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items:center; }
.eyebrow{ display:inline-flex; align-items:center; gap:8px; font-size: 13px; font-weight:700; letter-spacing:.04em;
  text-transform: uppercase; color: var(--orange-deep); background: var(--orange-tint); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero h1{ font-size: 46px; max-width: 620px; }
.hero h1 .accent{ color: var(--orange); }
.hero-sub{ font-size: 18px; color: var(--text-muted); max-width: 520px; }
.hero-cta{ display:flex; gap:14px; margin-top: 28px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap: 32px; margin-top: 44px; }
.hero-stats div strong{ display:block; font-family: var(--font-mono); font-size: 26px; color: var(--navy-deep); }
.hero-stats div span{ font-size: 13px; color: var(--text-muted); }

/* Signature element: fanned deal-card stack */
.card-stack{ position:relative; height: 420px; }
.stack-card{ position:absolute; width: 300px; background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; left: 50%; }
.stack-card:nth-child(1){ top: 60px; transform: translateX(-70%) rotate(-9deg); opacity:.55; z-index:1; }
.stack-card:nth-child(2){ top: 30px; transform: translateX(-50%) rotate(-2deg); opacity:.85; z-index:2; }
.stack-card:nth-child(3){ top: 0; transform: translateX(-30%) rotate(6deg); z-index:3; animation: floatCard 5s ease-in-out infinite; }
@keyframes floatCard{ 0%,100%{ transform: translateX(-30%) rotate(6deg) translateY(0); } 50%{ transform: translateX(-30%) rotate(6deg) translateY(-10px); } }
.stack-card .tag{ display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color: var(--navy); background: var(--navy-tint); padding:3px 10px; border-radius:999px; margin-bottom:10px; }
.stack-card h4{ font-size:16px; margin-bottom:6px; }
.stack-card .amt{ font-family: var(--font-mono); color: var(--orange-deep); font-weight:600; font-size:15px; }
.stack-card .bar{ height:6px; border-radius:4px; background: var(--border); margin-top:12px; overflow:hidden; }
.stack-card .bar i{ display:block; height:100%; background: var(--orange); }

@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero h1{ font-size: 34px; }
  .card-stack{ height: 300px; margin-top: 20px; }
  .stack-card{ width: 240px; padding: 16px; }
}

/* ---------------- How it works (two parallel tracks, not a numbered sequence) ---------------- */
.section{ padding: 64px 0; }
.section-head{ max-width: 640px; margin: 0 auto 40px; text-align:center; }
.section-head p{ color: var(--text-muted); font-size:16.5px; }
.tracks{ display:grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.track{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.track.seeker{ border-top: 4px solid var(--navy); }
.track.investor{ border-top: 4px solid var(--orange); }
.track h3{ display:flex; align-items:center; gap:10px; }
.track-steps{ list-style:none; margin: 20px 0 0; padding:0; display:flex; flex-direction:column; gap:16px; }
.track-steps li{ display:flex; gap:14px; }
.track-steps .dot{ width:26px; height:26px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:12px; font-weight:700; color:#fff; }
.track.seeker .dot{ background: var(--navy); }
.track.investor .dot{ background: var(--orange); }
.track-steps strong{ display:block; font-size:15px; color: var(--text); }
.track-steps span{ font-size:14px; color: var(--text-muted); }

@media (max-width: 800px){ .tracks{ grid-template-columns:1fr; } }

/* ---------------- Investment cards ---------------- */
.filters-bar{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 28px; }
.filters-bar input[type=text], .filters-bar select{
  border:1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-family: var(--font-body); font-size:14.5px; background: var(--bg);
}
.filters-bar input[type=text]{ flex: 1 1 220px; }
.filters-bar select{ flex: 0 1 180px; }

.card-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 22px; }
.invest-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); overflow:hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease; display:flex; flex-direction:column; position: relative; }
.invest-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-link-overlay{ position:absolute; inset:0; z-index:1; }
.card-link-overlay:focus-visible{ outline: 3px solid var(--orange); outline-offset: -3px; }
.card-action{ position: relative; z-index: 2; }
.invest-card .cover{ height: 148px; background: linear-gradient(135deg, var(--navy), var(--navy-deep)); position:relative; }
.invest-card .cover img{ width:100%; height:100%; object-fit:cover; }
.invest-card .badge-featured{ position:absolute; top:12px; left:12px; background: var(--orange); color:#fff; font-size:11px; font-weight:700;
  padding: 4px 10px; border-radius: 999px; text-transform:uppercase; letter-spacing:.03em; }
.invest-card .body{ padding: 18px 20px 20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.invest-card .industry{ font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color: var(--navy); }
.invest-card h4{ font-size: 17px; margin:0; }
.invest-card .tagline{ font-size: 13.5px; color: var(--text-muted); margin:0; flex:1; }
.invest-card .stats-row{ display:flex; justify-content:space-between; font-size: 13px; color: var(--text-muted); }
.invest-card .stats-row strong{ color: var(--navy-deep); font-family: var(--font-mono); }
.progress{ height:8px; border-radius: 5px; background: var(--border); overflow:hidden; }
.progress i{ display:block; height:100%; background: var(--orange); }
.invest-card .footer-row{ display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.stage-pill{ font-size: 11.5px; font-weight:600; padding: 4px 10px; border-radius:999px; background: var(--navy-tint); color: var(--navy); }
.save-btn{ background:none; border:1px solid var(--border); border-radius:999px; width:34px; height:34px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.save-btn.saved{ background: var(--orange-tint); border-color: var(--orange); color: var(--orange-deep); }

.empty-state{ text-align:center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3{ color: var(--navy-deep); }

/* ---------------- Forms / auth ---------------- */
.auth-wrap{ max-width: 480px; margin: 60px auto; background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-md); }
.form-wide{ max-width: 760px; margin: 40px auto; background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-md); }
.field{ margin-bottom: 20px; }
.field label{ display:block; font-weight:600; font-size:14px; margin-bottom:6px; color: var(--navy-deep); }
.field .hint{ font-size:12.5px; color: var(--text-muted); margin-top:5px; }
.field input, .field select, .field textarea{
  width:100%; padding: 12px 14px; border:1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size:14.5px; background: var(--bg); color:var(--text);
}
.field textarea{ resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color: var(--orange); background:#fff; }
.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.role-toggle{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom: 24px; }
.role-toggle label{ border:1px solid var(--border); border-radius: var(--radius-md); padding: 16px; cursor:pointer; text-align:center; font-weight:600; }
.role-toggle input{ display:none; }
.role-toggle input:checked + span{ color: var(--orange-deep); }
.role-toggle label:has(input:checked){ border-color: var(--orange); background: var(--orange-tint); }
.auth-switch{ text-align:center; margin-top: 20px; font-size: 14.5px; color: var(--text-muted); }
.auth-switch a{ color: var(--orange-deep); font-weight:600; }

@media (max-width: 640px){ .grid-2{ grid-template-columns:1fr; } .auth-wrap, .form-wide{ padding: 26px; margin: 30px auto;} }

/* ---------------- Dashboards ---------------- */
.dash-head{ padding: 40px 0 8px; }
.dash-head h1{ font-size: 28px; }
.stat-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 18px; margin: 24px 0 40px; }
.stat-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; }
.stat-card span{ font-size:13px; color: var(--text-muted); font-weight:600; text-transform:uppercase; letter-spacing:.03em; }
.stat-card strong{ display:block; font-family: var(--font-mono); font-size: 26px; color: var(--navy-deep); margin-top:6px; }
.stat-card.accent strong{ color: var(--orange-deep); }

.panel{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); overflow:hidden; margin-bottom: 30px; }
.panel-head{ padding: 18px 24px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.panel-head h3{ margin:0; font-size:17px; }

table.data-table{ width:100%; border-collapse: collapse; font-size: 14.5px; }
.data-table th{ text-align:left; padding: 12px 24px; background: var(--navy-tint); color: var(--navy-deep); font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; }
.data-table td{ padding: 14px 24px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td{ background: #FAFBFE; }

.badge{ display:inline-block; font-size: 11.5px; font-weight:700; padding: 4px 10px; border-radius:999px; text-transform:capitalize; }
.badge-pending{ background: var(--warn-tint); color: var(--warn); }
.badge-approved, .badge-active, .badge-confirmed{ background: var(--success-tint); color: var(--success); }
.badge-rejected, .badge-declined, .badge-suspended{ background: var(--danger-tint); color: var(--danger); }
.badge-draft, .badge-withdrawn{ background: var(--border); color: var(--text-muted); }
.badge-funded, .badge-closed, .badge-pledged, .badge-interested{ background: var(--navy-tint); color: var(--navy); }

.tabs{ display:flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs a{ padding: 10px 18px; font-weight:600; font-size:14.5px; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tabs a.active{ color: var(--navy-deep); border-color: var(--orange); }

.action-row{ display:flex; gap:8px; flex-wrap:wrap; }

/* ---------------- Project detail page ---------------- */
.detail-hero{ background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color:#fff; padding: 48px 0; }
.detail-hero .industry{ color: #B9C2E8; font-weight:700; text-transform:uppercase; font-size:12.5px; letter-spacing:.03em; }
.detail-hero h1{ color:#fff; font-size: 32px; max-width: 720px; }
.detail-hero p{ color: #C8CFEC; max-width: 600px; }
.detail-grid{ display:grid; grid-template-columns: 1.6fr 1fr; gap: 32px; margin-top: -40px; }
.detail-main .panel{ padding: 28px; }
.detail-main h3{ font-size: 18px; }
.side-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-md); position: sticky; top: 96px; }
.side-card .goal-amt{ font-family: var(--font-mono); font-size: 26px; color: var(--navy-deep); font-weight:700; }
.side-card .of-goal{ font-size:13px; color: var(--text-muted); margin-bottom:14px; }
.side-meta{ display:flex; flex-direction:column; gap:10px; margin: 20px 0; font-size: 14px; }
.side-meta div{ display:flex; justify-content:space-between; border-bottom:1px dashed var(--border); padding-bottom:8px; }
.side-meta strong{ color: var(--navy-deep); }

@media (max-width: 900px){ .detail-grid{ grid-template-columns:1fr; margin-top:20px; } .side-card{ position:static; } }

/* ---------------- Landing extras ---------------- */
.trust-strip{ background: var(--navy-tint); }
.trust-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; }
.trust-item{ display:flex; gap:14px; align-items:flex-start; }
.trust-item .ic{ width:42px; height:42px; border-radius:12px; background:#fff; display:flex; align-items:center; justify-content:center; flex:none; box-shadow: var(--shadow-sm); }
.trust-item h4{ font-size:15.5px; margin-bottom:4px; }
.trust-item p{ font-size:13.5px; color: var(--text-muted); margin:0; }

.cta-band{ background: var(--navy-deep); color:#fff; border-radius: var(--radius-lg); padding: 48px; text-align:center; margin: 0 24px 80px; max-width: 1132px; margin-inline:auto; }
.cta-band h2{ color:#fff; }
.cta-band p{ color:#C8CFEC; max-width:520px; margin: 0 auto 24px; }
.cta-band .hero-cta{ justify-content:center; }

/* ---------------- Footer ---------------- */
.site-footer{ background: var(--navy-deep); color: #C8CFEC; padding: 56px 0 0; margin-top: 60px; }
.footer-inner{ display:flex; justify-content:space-between; gap: 40px; flex-wrap:wrap; padding-bottom: 40px; }
.footer-brand strong{ font-family: var(--font-display); color:#fff; font-size:20px; }
.footer-brand span{ display:block; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color: var(--orange); margin: 4px 0 10px; }
.footer-brand p{ max-width: 280px; font-size: 13.5px; }
.footer-links{ display:flex; gap: 56px; }
.footer-links h4{ color:#fff; font-size:13px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:14px; }
.footer-links a{ display:block; font-size: 14px; margin-bottom:10px; color:#C8CFEC; }
.footer-links a:hover{ color:#fff; }
.footer-bottom{ border-top: 1px solid rgba(255,255,255,.12); padding: 18px 24px; font-size: 13px; text-align:center; color:#93A0D0; }

/* ---------------- Misc ---------------- */
.chip-group{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{ font-size:13px; padding:6px 12px; border-radius:999px; background: var(--navy-tint); color: var(--navy); font-weight:600; }
.modal-backdrop{ position:fixed; inset:0; background: rgba(11,23,64,.5); display:none; align-items:center; justify-content:center; z-index: 100; padding: 20px; }
.modal-backdrop.open{ display:flex; }
.modal{ background:#fff; border-radius: var(--radius-lg); padding: 30px; max-width: 460px; width:100%; box-shadow: var(--shadow-lg); }
.modal-close{ float:right; background:none; border:none; font-size:20px; cursor:pointer; color: var(--text-muted); }
.gallery-thumbs{ display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }
.gallery-thumbs img{ width:84px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--border); }
.message-thread{ display:flex; flex-direction:column; gap:12px; max-height:340px; overflow-y:auto; padding-right:6px; }
.message-bubble{ background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; max-width: 80%; font-size:14px; }
.message-bubble.mine{ background: var(--orange-tint); align-self:flex-end; }
.message-bubble small{ display:block; color: var(--text-muted); font-size: 11px; margin-top:4px; }
