:root{
  /* Finance Advisors design tokens */
  --base: #000d27;
  --base-black: #000000;
  --white: #ffffff;
  --white-light: rgba(255,255,255,0.10);
  --red-600: #e42634;
  --red-500: #f63d4b;
  --grey-50: #f5f6f6;
  --grey-100: #e5e7e8;
  --grey-200: #cdd1d4;
  --grey-300: #abb1b5;
  --grey-400: #808990;
  --grey-500: #656d75;
  --grey-700: #4a4f54;
  --grey-900: #3a3c3f;
  --grey-950: #282a2d;

  --font-body: "Source Serif 4", serif;
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-secondary: Inter, sans-serif;

  --radius-24: 24px;
}

*{ box-sizing: border-box; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

html, body{ margin: 0; }

body{
  font-family: var(--font-body);
  color: var(--grey-900);
  font-size: 18px;
  line-height: 150%;
  background-color: var(--base);
}

a{ color: inherit; }

.container-block{
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------- header / navbar (Finance Advisors) ---------- */

.navbar{
  z-index: 99999;
  position: sticky;
  top: 0;
  padding: 1.3rem 0;
  background-color: transparent;
  transition: background 0.5s ease;
}

@media (min-width: 768px){
  .navbar:not(.sticky){
    background: linear-gradient(180deg, #000D27 -21.67%, rgba(0, 13, 39, 0) 100%);
    backdrop-filter: blur(29px);
  }
}

.navbar.sticky{
  background-color: var(--base);
}

.navba-wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.logo-brand{
  z-index: 2;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-brand img{ height: 34px; display: block; }

.logo-text{
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: -0.01em;
}

.nav-menu{
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links{
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.navlink{
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color .2s ease;
}

.navlink:hover{ color: var(--red-500); }

.nav-actions{
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.primary-button{
  border: 1px solid var(--red-600);
  border-radius: var(--radius-24);
  background-color: var(--white);
  color: var(--red-600);
  font-family: var(--font-secondary);
  font-weight: 500;
  line-height: 110%;
  padding: 13px 24px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.primary-button:hover{
  background-color: var(--red-600);
  color: var(--white);
}

.primary-button.secondry{
  background-color: var(--red-600);
  color: var(--white);
}

.primary-button.secondry:hover{
  background-color: var(--red-500);
  border-color: var(--red-500);
}

/* ---------- hero (Finance Advisors) ---------- */

.page-hero-section{
  background-color: var(--base);
  background-image:
    linear-gradient(180deg, rgba(0,13,39,0.35) 0%, rgba(0,13,39,0.85) 85%, var(--base) 100%),
    url("https://cdn.prod.website-files.com/6717d6a97b41816950fde2cd/68c33a9716237791d8f190ca_left-coft.jpg");
  background-position: 100% 10%;
  background-repeat: no-repeat;
  background-size: cover;
  margin-top: -96px;
  padding-top: 96px;
}

.hero-content-wrap{
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  align-items: center;
  text-align: center;
  padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero-title{
  font-family: var(--font-heading);
  color: var(--white);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
}

.hero-sub{
  color: var(--white);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  max-width: 40ch;
  margin: 0;
}

.hero-count{
  color: var(--grey-300);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ---------- library grid ---------- */

.library-section{
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background-color: var(--base);
}

.library-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.library-head h2{
  font-family: var(--font-heading);
  color: var(--white);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.library-head p{
  color: var(--grey-300);
  margin: 0.4rem 0 0;
  font-size: 1rem;
}

.carousel-viewport{
  overflow: visible;
}

.carousel-track{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.3rem;
  align-items: stretch;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* ---------- book card ---------- */

.book-card{
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  background-color: var(--white);
  border-radius: var(--radius-24);
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 40px -26px rgba(0,0,0,0.65);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.book-card::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(228, 38, 52, 0.08);
  opacity: 1;
  pointer-events: none;
  transition: box-shadow .2s ease, opacity .2s ease;
}

.book-card:hover,
.book-card:focus-visible{
  transform: translateY(-4px);
  box-shadow: 0 28px 46px -24px rgba(0,0,0,0.72);
}

.book-card:hover::after,
.book-card:focus-visible::after{
  box-shadow: inset 0 0 0 2px rgba(228, 38, 52, 0.78), 0 0 0 1px rgba(228, 38, 52, 0.18);
}

.book-card:focus-visible{
  outline: none;
}

.cover{
  --book-gradient: linear-gradient(140deg, #10224a, #000d27 70%);
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--book-gradient);
  display: grid;
  align-content: end;
  padding: 1rem;
  overflow: hidden;
}

.cover::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,7,21,0.65) 100%);
  z-index: 0;
}

.cover.has-thumbnail::before{
  background: transparent;
}

.cover.has-thumbnail{
  background: transparent;
}

.cover img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.cover-fallback{
  position: relative;
  z-index: 2;
  color: #eef3ff;
}

.cover-fallback[hidden]{
  display: none;
}

.cover-fallback .title{
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cover-fallback .author{
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #b6c4de;
}

.book-body{
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.book-tag{
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red-600);
}

.book-title{
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--grey-950);
  margin: 0;
}

.book-desc{
  font-size: 0.92rem;
  color: var(--grey-700);
  margin: 0;
  flex: 1;
}

.book-actions{
  margin-top: 0.4rem;
  position: relative;
  z-index: 4;
}

.split-button{
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius-24);
  overflow: visible;
  width: 100%;
}

.main-action,
.toggle-action{
  border: 1px solid var(--red-600);
  background-color: var(--red-600);
  color: var(--white);
  font-family: var(--font-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.main-action{
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border-radius: var(--radius-24) 0 0 var(--radius-24);
  padding: 11px 16px;
}

.toggle-action{
  border-left: 1px solid rgba(255,255,255,0.22);
  border-radius: 0 var(--radius-24) var(--radius-24) 0;
  padding: 0 0.95rem;
  cursor: pointer;
}

.main-action:hover,
.toggle-action:hover,
.split-button.open .main-action,
.split-button.open .toggle-action{
  background-color: var(--white);
  color: var(--red-600);
  border-color: var(--red-600);
}

.menu{
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 0;
  right: 0;
  min-width: 220px;
  padding: 0.45rem;
  border-radius: 18px;
  background: var(--red-600);
  box-shadow: 0 25px 50px -30px rgba(0,0,0,0.7);
  display: none;
  z-index: 8;
}

.split-button.open .menu{
  display: block;
}

.menu a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-secondary);
  font-size: 0.94rem;
  font-weight: 500;
}

.menu a span{
  color: rgba(255,255,255,0.78);
  font-size: 0.82rem;
}

.menu a:hover{
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.menu a:hover span{
  color: var(--white);
}

.library-status{
  color: var(--grey-300);
  font-family: var(--font-secondary);
}

/* ---------- footer ---------- */

.site-footer{
  background-color: var(--base);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 2rem 0 2.5rem;
}

.site-footer .container-block{
  color: var(--grey-400);
  font-family: var(--font-secondary);
  font-size: 0.9rem;
}

/* ---------- responsive ---------- */

.nav-links{ display: flex; }

@media (max-width: 900px){
  .nav-links{ display: none; }
  .nav-actions .primary-button.sign-up{ display: none; }
}

@media (max-width: 620px){
  .carousel-track{ grid-template-columns: 1fr; }
  .logo-text{ font-size: 1.15rem; }
}
