/* =========================================
   AE Tax Advisors Book Library
   partnershiptaxbook.com
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1B2A4A;
  --navy-light: #243656;
  --navy-dark: #111D33;
  --gold: #C5A572;
  --gold-light: #D4BA8E;
  --gold-dark: #A88B5A;
  --white: #FFFFFF;
  --off-white: #F8F7F4;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--gray {
  background: var(--gray-50);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--white);
}

.section__title {
  text-align: center;
  margin-bottom: 3rem;
}

.section__title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.section__title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
}

.section__subtitle {
  color: var(--gray-500);
  font-size: 1.125rem;
  margin-top: 1rem;
}

/* --- Header --- */
.header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.header__logo:hover {
  color: var(--gold);
}

.header__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--navy);
  letter-spacing: 0;
}

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

.nav__link {
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav__link:hover,
.nav__link--active {
  color: var(--gold);
}

.nav__link--cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
}

.nav__link--cta:hover {
  background: var(--gold-light);
  color: var(--navy) !important;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(197,165,114,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.8);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero__badge {
  display: inline-block;
  background: rgba(197,165,114,0.2);
  color: var(--gold);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(197,165,114,0.3);
}

/* --- Book Hero (Individual Book Page) --- */
.book-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.book-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(197,165,114,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.book-hero__inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.book-hero__details h1 {
  color: var(--white);
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.book-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.75);
}

.book-hero__meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.book-hero__meta strong {
  color: var(--gold);
}

.book-hero__description {
  color: rgba(255,255,255,0.85);
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.book-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Book Cover Placeholder --- */
.book-cover {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 2/3;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 40%, var(--navy-light) 100%);
  border: 2px solid var(--gold);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(197,165,114,0.2);
  overflow: hidden;
}

.book-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold);
}

.book-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold);
}

.book-cover__publisher {
  font-size: 0.6875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.book-cover__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.book-cover__subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.book-cover__divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 1rem;
}

.book-cover__author {
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 500;
}

/* Small cover variant for cards */
.book-cover--small {
  max-width: 220px;
  padding: 1.5rem 1rem;
}

.book-cover--small .book-cover__title {
  font-size: 1rem;
}

.book-cover--small .book-cover__subtitle {
  font-size: 0.6875rem;
}

/* Coming soon cover variant */
.book-cover--coming-soon {
  background: linear-gradient(160deg, var(--gray-600) 0%, var(--gray-500) 40%, var(--gray-400) 100%);
  border-color: var(--gray-300);
  opacity: 0.7;
}

.book-cover--coming-soon::before,
.book-cover--coming-soon::after {
  background: var(--gray-300);
}

.book-cover--coming-soon .book-cover__publisher,
.book-cover--coming-soon .book-cover__author {
  color: var(--gray-300);
}

.book-cover--coming-soon .book-cover__divider {
  background: var(--gray-300);
}

.book-cover--coming-soon .book-cover__title {
  color: rgba(255,255,255,0.7);
}

.book-cover--coming-soon .book-cover__subtitle {
  color: rgba(255,255,255,0.4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

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

.btn--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197,165,114,0.3);
}

.btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

.btn--secondary:hover {
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-1px);
}

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

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}

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

.btn--gold-outline:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn--large {
  padding: 1rem 2.25rem;
  font-size: 1.0625rem;
}

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* --- Featured Book Card --- */
.featured-book {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--white);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-200);
}

.featured-book__info h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.featured-book__subtitle {
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.featured-book__description {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.featured-book__meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.featured-book__meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.featured-book__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Coming Soon Cards --- */
.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.coming-soon-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--gray-200);
  position: relative;
  opacity: 0.75;
  transition: opacity var(--transition);
}

.coming-soon-card:hover {
  opacity: 0.9;
}

.coming-soon-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.coming-soon-card__cover {
  margin: 0 auto 1.5rem;
}

.coming-soon-card h4 {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.coming-soon-card p {
  font-size: 0.875rem;
  color: var(--gray-400);
}

/* --- Table of Contents --- */
.toc {
  counter-reset: chapter;
}

.toc__item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: start;
}

.toc__item:last-child {
  border-bottom: none;
}

.toc__number {
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.toc__number--intro {
  background: var(--gold);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
}

.toc__content h4 {
  margin-bottom: 0.35rem;
}

.toc__content p {
  color: var(--gray-500);
  font-size: 0.9375rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* --- Who This Book Is For --- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.audience-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: start;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--gray-200);
}

.audience-card__icon {
  width: 44px;
  height: 44px;
  background: rgba(197,165,114,0.12);
  color: var(--gold-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.audience-card h4 {
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.audience-card p {
  font-size: 0.9375rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* --- What You'll Learn --- */
.learn-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
}

.learn-list__item {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.learn-list__check {
  width: 24px;
  height: 24px;
  background: rgba(197,165,114,0.15);
  color: var(--gold-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.learn-list__item span {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.5;
}

/* --- Author / Publisher Section --- */
.author-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.author-section__logo {
  background: var(--navy);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
}

.author-section__logo-text {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.author-section__logo-sub {
  color: var(--gold);
  font-size: 0.875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.author-section__info h3 {
  margin-bottom: 1rem;
}

.author-section__info p {
  color: var(--gray-600);
  line-height: 1.8;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-section .btn {
  margin: 0 0.5rem;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--gray-600);
}

.about-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.about-value {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--gray-200);
}

.about-value__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: rgba(197,165,114,0.12);
  color: var(--gold-dark);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.about-value h4 {
  margin-bottom: 0.5rem;
}

.about-value p {
  font-size: 0.9375rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* --- Footer --- */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer__brand p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.footer__brand a {
  color: var(--gold);
}

.footer__brand a:hover {
  color: var(--gold-light);
}

.footer h4 {
  color: var(--white);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.5px;
}

.footer__links li {
  margin-bottom: 0.6rem;
}

.footer__links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

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

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.footer__bottom a {
  color: var(--gold);
}

.footer__bottom a:hover {
  color: var(--gold-light);
}

/* --- 404 Page --- */
.error-page {
  text-align: center;
  padding: 8rem 0;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.error-page__code {
  font-size: 8rem;
  font-weight: 800;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h2 {
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--gray-500);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .coming-soon-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  }

  .nav.active {
    display: flex;
  }

  .nav__link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    width: 100%;
  }

  .nav__link--cta {
    text-align: center;
    margin-top: 0.5rem;
    border-bottom: none;
  }

  .hero {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .featured-book {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem;
  }

  .featured-book .book-cover {
    margin: 0 auto;
    max-width: 220px;
  }

  .featured-book__actions {
    justify-content: center;
  }

  .coming-soon-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .book-hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-hero__inner .book-cover {
    margin: 0 auto;
    max-width: 220px;
  }

  .book-hero__actions {
    justify-content: center;
  }

  .book-hero__meta {
    justify-content: center;
  }

  .toc__item {
    grid-template-columns: 48px 1fr;
    gap: 1rem;
  }

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

  .learn-list {
    grid-template-columns: 1fr;
  }

  .author-section {
    grid-template-columns: 1fr;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section {
    padding: 3.5rem 0;
  }

  .cta-section .btn {
    display: block;
    margin: 0.5rem auto;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .featured-book__meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .featured-book__actions {
    flex-direction: column;
  }

  .book-hero__actions {
    flex-direction: column;
    align-items: center;
  }
}
