:root {
  /* Modern v2 theme (from Figma) */
  --bg: #FCFBF9;
  --ink: #1B1714;
  --ink-2: #6B655E;
  --accent: #DD5C36;
  --accent-dark: #C44D2A;
  --subtle: #F2F0EB;
  --card: #FFFFFF;
  --line: #ECE9E3;
  /* Book spine / cover tones */
  --navy: #2C3A4A;
  --forest: #3E5C49;
  --plum: #6D4F5C;
  /* Status (meaning only) */
  --sage: #4F8A5E;
  --amber: #C98A2E;
  --info: #4A6B80;
  /* Radius & elevation */
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 20px;
  --shadow-card: 0 12px 24px rgba(26, 18, 13, .07);
  --shadow-raised: 0 18px 40px rgba(26, 18, 13, .12);
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { scroll-margin-top: 80px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--r);
  font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1;
  padding: 15px 22px; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn i { font-size: 19px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(221, 92, 54, .24); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.99); }
.btn-ghost { background: var(--subtle); color: var(--ink); }
.btn-ghost:hover { background: #e9e6df; }
.btn-lg { padding: 17px 26px; font-size: 16px; }
.btn-sm { padding: 10px 15px; font-size: 13.5px; border-radius: var(--r-sm); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 251, 249, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-weight: 600; font-size: 15px; color: var(--ink-2); transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 26px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--subtle); color: var(--accent);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; margin-bottom: 24px;
  letter-spacing: .2px;
}
.eyebrow i { font-size: 15px; }
.hero h1 { font-size: clamp(40px, 6vw, 62px); font-weight: 800; line-height: 1.04; letter-spacing: -1.5px; }
.hero h1 .accent { color: var(--accent); }
.hero .sub { font-size: 19px; font-weight: 400; color: var(--ink-2); margin-top: 22px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-fine { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.hero-fine i { color: var(--sage); font-size: 17px; }

/* Hero visual — book cluster + lending card */
.showcase { position: relative; min-width: 0; }
.shelf {
  background: var(--card); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-raised); overflow: hidden;
}
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.shelf-head h3 { font-size: 16px; font-weight: 700; }
.shelf-head .count { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.marquee {
  margin: 6px -26px 2px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee.is-ready .marquee-track { animation: shelf-scroll 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .cover { width: 92px; flex: 0 0 auto; margin-right: 18px; }
@keyframes shelf-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cover {
  position: relative; border-radius: var(--r-sm); aspect-ratio: 2 / 3; overflow: hidden;
  background: var(--subtle); border: 1px solid rgba(26, 18, 13, .08);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .dot { position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); z-index: 1; }
.d-home { background: var(--sage); } .d-out { background: var(--amber); } .d-bor { background: var(--info); }
.lend-card {
  display: flex; align-items: center; gap: 13px; margin-top: 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 13px;
}
.lend-card .mini { width: 40px; height: 56px; border-radius: 7px; flex: 0 0 auto; object-fit: cover; }
.lend-card .info { flex: 1; min-width: 0; }
.lend-card .info b { font-size: 14px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lend-card .info span { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  white-space: nowrap; background: #F6E8D4; color: #8a5e12;
}
.float-pill {
  position: absolute; top: -16px; right: -10px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border-radius: 999px;
  padding: 10px 15px; font-size: 13px; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow-card);
}
.float-pill i { color: var(--accent); font-size: 17px; }

/* ---------- Pillars strip ---------- */
.pillars { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--subtle); }
.pillars-row { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: center; padding: 22px 0; }
.pillar { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.pillar i { font-size: 19px; color: var(--accent); }

/* ---------- Section heading ---------- */
.sec { padding: 96px 0; }
.sec-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.sec-head .kicker { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.sec-head h2 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; line-height: 1.1; margin-top: 12px; letter-spacing: -.8px; }
.sec-head p { font-size: 17px; font-weight: 400; color: var(--ink-2); margin-top: 14px; }

/* ---------- Features grid ---------- */
.features { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; transition: transform .15s, box-shadow .15s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.feature .ic {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  background: var(--subtle); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 25px; margin-bottom: 18px;
}
.feature h3 { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.feature p { font-size: 15px; font-weight: 400; color: var(--ink-2); margin-top: 8px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step .num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
  margin-bottom: 18px; box-shadow: 0 8px 16px rgba(221, 92, 54, .22);
}
.step h3 { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.step p { font-size: 15px; font-weight: 400; color: var(--ink-2); margin-top: 8px; }

/* ---------- Trust ---------- */
.trust { background: var(--subtle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.trust h2 { font-size: clamp(28px, 3.6vw, 36px); font-weight: 800; line-height: 1.12; letter-spacing: -.6px; }
.trust .lead { font-size: 17px; font-weight: 400; color: var(--ink-2); margin-top: 16px; }
.trust-list { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.trust-item { display: flex; gap: 13px; align-items: flex-start; }
.trust-item i { color: var(--accent); font-size: 22px; flex: 0 0 auto; margin-top: 1px; }
.trust-item b { font-weight: 700; font-size: 15.5px; }
.trust-item span { display: block; font-size: 14.5px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.privacy-card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 32px; box-shadow: var(--shadow-card);
}
.privacy-card .lock {
  width: 56px; height: 56px; border-radius: var(--r); background: var(--subtle); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 20px;
}
.privacy-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.privacy-card p { font-size: 15px; font-weight: 400; color: var(--ink-2); margin-top: 10px; }
.privacy-map {
  margin-top: 22px; height: 134px; border-radius: var(--r);
  background:
    radial-gradient(circle at 50% 50%, rgba(221, 92, 54, .14), rgba(221, 92, 54, 0) 60%),
    repeating-linear-gradient(0deg, var(--subtle), var(--subtle) 22px, #fff 22px, #fff 23px),
    repeating-linear-gradient(90deg, var(--subtle), var(--subtle) 22px, #fff 22px, #fff 23px);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.privacy-map .ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 2px dashed var(--accent); opacity: .8; }
.privacy-map .ring.r1 { width: 72px; height: 72px; }
.privacy-map .ring.r2 { width: 120px; height: 120px; opacity: .45; }
.privacy-map .me { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-card); }

/* ---------- Waitlist CTA ---------- */
.cta { padding: 104px 0; }
.cta-box {
  background: var(--ink); color: #fff; border-radius: var(--r-lg);
  padding: 60px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta-box::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% -20%, rgba(221, 92, 54, .42), transparent 46%),
              radial-gradient(circle at -5% 120%, rgba(221, 92, 54, .28), transparent 46%);
}
.cta-box > * { position: relative; }
.cta-box h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; line-height: 1.08; letter-spacing: -.8px; }
.cta-box p { font-size: 17px; font-weight: 400; color: #d8d2cb; margin-top: 14px; }
.waitlist { display: flex; gap: 10px; justify-content: center; margin: 32px auto 0; max-width: 480px; flex-wrap: wrap; }
.waitlist input {
  flex: 1; min-width: 220px; font-family: inherit; font-size: 15px; font-weight: 400;
  padding: 16px 18px; border-radius: var(--r); border: none; color: var(--ink); background: #fff;
}
.waitlist input:focus { outline: 3px solid rgba(221, 92, 54, .5); }
.waitlist .msg { width: 100%; font-size: 14.5px; font-weight: 600; min-height: 20px; }
.waitlist .msg.ok { color: #ffcaa8; }
.waitlist .msg.err { color: #ffb0a0; }
.cta-fine { font-size: 13px; font-weight: 500; color: #b8b1a8; margin-top: 16px; }

/* ---------- Footer ---------- */
.footer { padding: 48px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .brand { font-size: 16px; }
.footer .brand img { width: 30px; height: 30px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.footer-links a:hover { color: var(--accent); }
.footer .copy { font-size: 13px; font-weight: 400; color: var(--ink-2); width: 100%; text-align: center; margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 4px; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 24px 20px;
  }
  .nav.open .nav-links a { padding: 10px 0; font-size: 16px; }
  .hero-grid, .trust-grid { grid-template-columns: 1fr; gap: 40px; }
  .showcase { max-width: 440px; margin: 0 auto; width: 100%; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .sec { padding: 68px 0; }
  .hero { padding: 52px 0; }
  .cta { padding: 72px 0; }
}
@media (max-width: 520px) {
  .float-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .marquee.is-ready .marquee-track { animation: none !important; }
}
