/* ============================================================
   BorrowBase — Security-First Peer-to-Peer Rentals
   ============================================================ */

:root {
  --accent: #28a396;
  --accent-deep: #1f8478;
  --bg: #fafaf8;
  --text: #13171f;
  --muted: #697181;
  --card: #ffffff;
  --tint: #e6f4f2;
  --success: #28a36a;
  --border: #e9e8e3;
  --border-strong: #dcdbd4;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(19, 23, 31, 0.05), 0 1px 3px rgba(19, 23, 31, 0.04);
  --shadow-md: 0 6px 18px rgba(19, 23, 31, 0.07), 0 2px 6px rgba(19, 23, 31, 0.05);
  --shadow-lg: 0 18px 50px rgba(19, 23, 31, 0.12);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 14px 24px; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  transition: background var(--transition-interactive), color var(--transition-interactive),
    box-shadow var(--transition-interactive), transform var(--transition-interactive),
    border-color var(--transition-interactive);
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(40, 163, 150, 0.25); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(40, 163, 150, 0.32); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(40, 163, 150, 0.25); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }

.btn-on-dark { background: #fff; color: var(--accent-deep); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.btn-on-dark:hover { background: #fff; color: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0,0,0,0.24); }

.btn:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(40, 163, 150, 0.45); outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 248, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive), background var(--transition-interactive);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); }
.brand-mark { flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; color: var(--text); }
.header-nav { display: flex; gap: 30px; margin-left: auto; }
.header-nav a { font-size: 15px; font-weight: 500; color: var(--muted); transition: color var(--transition-interactive); }
.header-nav a:hover { color: var(--text); }
.header-cta { margin-left: 8px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 84px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { max-width: 560px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tint); color: var(--accent-deep);
  font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(40,163,150,0.5); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(40,163,150,0.45);} 70%{ box-shadow:0 0 0 8px rgba(40,163,150,0);} 100%{box-shadow:0 0 0 0 rgba(40,163,150,0);} }

.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 700; margin-bottom: 20px; }
.hero-sub { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.hero-img-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.hero-img-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 10.5; object-fit: cover; }
.hero-float-card {
  position: absolute; left: -14px; bottom: 28px;
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.hero-float-card strong { display: block; font-size: 14px; font-weight: 700; font-family: var(--font-display); }
.hero-float-card span { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------- Section helpers ---------- */
section { scroll-margin-top: 80px; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 48px); }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.eyebrow--light { color: rgba(255,255,255,0.85); }

/* ---------- Fear / Answer ---------- */
.fear { padding: clamp(48px, 6vw, 80px) 0; }
.fear .section-title { max-width: 760px; margin-bottom: clamp(28px, 4vw, 40px); }
.fear-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: stretch; }
.fear-card { border-radius: var(--radius); padding: 28px 28px; border: 1px solid var(--border); }
.fear-card p { font-size: clamp(17px, 1.8vw, 20px); line-height: 1.5; font-weight: 500; }
.fear-label { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.fear-card--worry { background: #fff; }
.fear-card--worry .fear-label { color: var(--muted); }
.fear-card--worry p { color: var(--text); }
.fear-card--answer { background: var(--tint); border-color: #cfe9e4; }
.fear-card--answer .fear-label { color: var(--accent-deep); }
.fear-card--answer p { color: var(--accent-deep); }
.fear-arrow { display: flex; align-items: center; color: var(--accent); }

/* ---------- Security pillars ---------- */
.security { padding: clamp(48px, 6vw, 80px) 0; }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.pillar { padding: 30px 28px; transition: box-shadow var(--transition-interactive), transform var(--transition-interactive); }
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pillar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; background: var(--tint); color: var(--accent-deep);
  margin-bottom: 18px;
}
.pillar h3 { font-size: 21px; margin-bottom: 10px; }
.pillar p { font-size: 16px; color: var(--muted); line-height: 1.6; }

/* ---------- How it works ---------- */
.how { padding: clamp(48px, 6vw, 80px) 0; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.how-col { padding: 30px 30px 34px; }
.how-col--lender { background: linear-gradient(180deg, var(--tint), #fff); border-color: #cfe9e4; }
.how-col-title { margin-bottom: 22px; }
.how-tag { display: inline-block; font-family: var(--font-body); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: #f1f0eb; padding: 6px 14px; border-radius: var(--radius-pill); }
.how-tag--lender { color: var(--accent-deep); background: #fff; }
.steps { display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.steps strong { font-weight: 600; font-size: 16.5px; }

/* ---------- Categories ---------- */
.categories { padding: clamp(40px, 5vw, 64px) 0; }
.categories .section-title { margin-bottom: 26px; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pills li {
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  padding: 10px 20px; font-size: 15.5px; font-weight: 500; color: var(--text);
  transition: border-color var(--transition-interactive), background var(--transition-interactive), color var(--transition-interactive);
}
.pills li:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--tint); }
.pill-more { background: transparent !important; border-style: dashed !important; color: var(--muted) !important; }

/* ---------- Founding ---------- */
.founding { padding: clamp(40px, 5vw, 72px) 0; }
.founding-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 5vw, 60px);
  text-align: center; max-width: 880px; margin: 0 auto;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.founding-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(255,255,255,0.18), transparent 45%);
  pointer-events: none;
}
.founding-card .section-title { color: #fff; margin-bottom: 16px; }
.founding-card p { color: rgba(255,255,255,0.92); font-size: 18px; max-width: 620px; margin: 0 auto 28px; position: relative; }
.founding-card .btn { position: relative; }

/* ---------- Invite ---------- */
.invite { padding: clamp(48px, 6vw, 84px) 0; }
.invite-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 56px); align-items: center; }
.invite-copy { max-width: 460px; }
.invite-copy .section-title { margin-bottom: 14px; }
.invite-copy p { color: var(--muted); font-size: 17px; }

.invite-form { padding: 32px 32px 30px; position: relative; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input[type="email"] {
  width: 100%; font-family: inherit; font-size: 16px; padding: 14px 16px;
  border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--bg); color: var(--text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.field input[type="email"]::placeholder { color: #a3a8b2; }
.field input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(40,163,150,0.18); }
.field input.invalid { border-color: #d9534f; }
.field-error { display: block; min-height: 18px; font-size: 13px; color: #c0392b; margin-top: 6px; }

.checkbox { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 15.5px; margin-bottom: 22px; user-select: none; }
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-box {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--border-strong);
  background: var(--bg); margin-top: 1px; position: relative;
  transition: background var(--transition-interactive), border-color var(--transition-interactive);
}
.checkbox-box::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg) scale(0);
  transition: transform var(--transition-interactive);
}
.checkbox input:checked + .checkbox-box { background: var(--accent); border-color: var(--accent); }
.checkbox input:checked + .checkbox-box::after { transform: rotate(45deg) scale(1); }
.checkbox input:focus-visible + .checkbox-box { outline: 3px solid rgba(40,163,150,0.45); outline-offset: 2px; }

.form-fineprint { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }

.form-success { text-align: center; padding: 18px 8px 6px; }
.success-icon { display: inline-flex; margin-bottom: 14px; }
.form-success h3 { font-size: 24px; margin-bottom: 8px; }
.form-success p { color: var(--muted); font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--text); color: #cfd2d9; padding: 56px 0 28px; margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand { color: var(--accent); }
.footer-tag { color: #8a91a0; font-size: 15px; margin-top: 12px; }
.footer-trust p { font-size: 15px; line-height: 1.65; color: #b6bcc7; max-width: 520px; }
.footer-contact { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.footer-contact a { color: var(--accent); font-weight: 500; font-size: 15px; transition: color var(--transition-interactive); }
.footer-contact a:hover { color: #4cc4b6; text-decoration: underline; }
.footer-bottom { padding-top: 24px; font-size: 13.5px; color: #7c8390; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .reveal.in { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 100%; }
  .hero-visual { order: -1; }
  .invite-inner { grid-template-columns: 1fr; }
  .invite-copy { max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .header-nav { display: none; }
  .pillar-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .fear-grid { grid-template-columns: 1fr; }
  .fear-arrow { transform: rotate(90deg); justify-content: center; padding: 4px 0; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .header-cta { display: none; }
  .hero-float-card { left: 8px; bottom: 12px; padding: 10px 13px; }
  .founding-card { padding: 32px 22px; }
  .invite-form { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge-dot { animation: none; }
}
