/* ==========================================================================
   E-BOOKS BY B&B — MODERN DESIGN SYSTEM (v1.0.0)
   Compact Floating Dynamic Notch Capsule Navigation
   Light Mode Only — Exact Match with Content Calendar
   ========================================================================== */

:root {
  /* Color Palette */
  --c-primary: #0f766e;        /* Deep Practical Teal */
  --c-primary-hover: #115e59;
  --c-primary-light: #f0fdfa;
  
  --c-accent: #1d4ed8;         /* Precision Blue */
  --c-accent-hover: #1e40af;
  --c-accent-light: #eff6ff;
  
  --c-dark: #0f172a;           /* Slate 900 */
  --c-heading: #1e293b;        /* Slate 800 */
  --c-body: #334155;           /* Slate 700 */
  --c-muted: #64748b;          /* Slate 500 */
  
  --bg-page: #ffffff;
  --bg-subtle: #f8fafc;        /* Slate 50 */
  --bg-card: #ffffff;
  --bg-border: #e2e8f0;        /* Slate 200 */
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  /* Dynamic Notch Capsule Tokens */
  --bg-notch: rgba(255, 255, 255, 0.94);
  --border-notch: rgba(226, 232, 240, 0.9);
  --shadow-notch: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--c-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.bb-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   DYNAMIC NOTCH HEADER (iOS Floating Capsule — Exact CC Style)
   ========================================================================== */
.notch-wrapper {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.dynamic-notch {
  pointer-events: auto;
  width: auto;
  max-width: max-content;
  background: var(--bg-notch);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid var(--border-notch);
  box-shadow: var(--shadow-notch);
  border-radius: 9999px;
  padding: 7px 16px;
  transition: border-radius 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease;
}

.notch-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

/* 1. Merged Brand Pill */
.notch-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-dark);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  transition: opacity 0.15s ease;
}

.notch-logo:hover {
  opacity: 0.9;
}

.cc-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-hover) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
  flex-shrink: 0;
}

.cc-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.cc-logo-top {
  font-size: 0.8125rem;
  font-weight: 850;
  color: var(--c-heading);
}

.cc-logo-bottom {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 2. Navigation Pill Track */
.notch-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 4px 6px;
  border-radius: 9999px;
  border: 1px solid var(--bg-border);
}

.notch-nav-link {
  text-decoration: none;
  color: var(--c-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.notch-nav-link:hover {
  color: var(--c-primary);
  background-color: var(--bg-card);
}

.notch-nav-link.active {
  background-color: var(--c-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}

/* Mobile Hamburger Button */
.mobile-hamburger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--bg-border);
  cursor: pointer;
  padding: 9px;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.hamburger-bar {
  width: 18px;
  height: 2px;
  background-color: var(--c-dark);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-hamburger-btn.active .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-hamburger-btn.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-hamburger-btn.active .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 3. Expandable Mobile Drawer Inside Notch */
.notch-mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid var(--bg-border);
  max-height: 80vh;
  max-height: 80dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dynamic-notch.is-open .notch-mobile-drawer {
  display: flex;
  animation: notchExpand 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes notchExpand {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notch-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notch-drawer-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c-muted);
  margin-bottom: 6px;
}

.notch-drawer-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notch-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--c-dark);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.15s;
}

.notch-drawer-link:hover {
  background-color: #ffffff;
}

/* Main Content Page Clearance */
.bb-main-content {
  padding-top: 96px;
  min-height: calc(100vh - 280px);
}

/* ==========================================================================
   HERO & SCAFFOLD CONTENT STYLES
   ========================================================================== */
.bb-hero {
  padding: 48px 0 64px;
  text-align: center;
}

.bb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.bb-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--c-heading);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.bb-hero-title .highlight {
  color: var(--c-primary);
}

.bb-hero-desc {
  font-size: 1.125rem;
  color: var(--c-muted);
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.bb-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  min-height: 46px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.bb-btn-primary {
  background: var(--c-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.bb-btn-primary:hover {
  background: var(--c-primary-hover);
  transform: translateY(-1px);
}

.bb-btn-secondary {
  background: var(--bg-subtle);
  color: var(--c-heading);
  border: 1px solid var(--bg-border);
}

.bb-btn-secondary:hover {
  background: #ffffff;
  border-color: var(--c-primary);
}

/* Feature Preview Grid */
.bb-scaffold-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0 80px;
}

.bb-book-card {
  background: var(--bg-card);
  border: 1.5px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bb-book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary);
}

.bb-book-card-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--c-primary-light);
  color: var(--c-primary);
  margin-bottom: 16px;
}

.bb-book-card h3 {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--c-heading);
  margin-bottom: 10px;
  line-height: 1.3;
}

.bb-book-card p {
  font-size: 0.9375rem;
  color: var(--c-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Footer */
.bb-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--bg-border);
  padding: 56px 0 32px;
  margin-top: 48px;
}

.bb-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.bb-footer-badge {
  font-family: 'Comfortaa', var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--c-primary);
}

.bb-footer-sub {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--c-muted);
  margin-left: 6px;
}

.bb-footer-brand p {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 360px;
}

.bb-footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c-heading);
  margin-bottom: 16px;
}

.bb-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bb-footer-links a {
  font-size: 0.875rem;
  color: var(--c-body);
}

.bb-footer-links a:hover {
  color: var(--c-primary);
}

.bb-footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--bg-border);
  padding-top: 24px;
  font-size: 0.8125rem;
  color: var(--c-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive Breakpoints (Matching Content Calendar) */
@media (min-width: 992px) {
  .notch-drawer,
  .notch-mobile-drawer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }
  .mobile-menu-toggle,
  .mobile-hamburger-btn {
    display: none !important;
  }
  .dynamic-notch,
  .dynamic-notch.is-open {
    border-radius: 9999px !important;
    max-height: 52px !important;
    width: auto !important;
    max-width: max-content !important;
  }
  .notch-nav {
    display: inline-flex !important;
  }
}

@media (max-width: 991px) {
  .dynamic-notch {
    display: flex !important;
    width: auto !important;
    max-width: max-content !important;
    padding: 6px 14px !important;
  }
  .notch-inner {
    width: 100% !important;
    justify-content: center !important;
  }
  .notch-nav {
    display: none !important;
  }
  .mobile-menu-toggle,
  .mobile-hamburger-btn {
    display: flex !important;
  }
  .notch-drawer,
  .notch-mobile-drawer {
    display: none;
  }
  .dynamic-notch.is-open {
    border-radius: 24px !important;
  }
  .dynamic-notch.is-open .notch-drawer,
  .dynamic-notch.is-open .notch-mobile-drawer {
    display: flex !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    animation: notchExpand 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
  .bb-hero-title {
    font-size: 2rem;
  }
  .bb-scaffold-grid {
    grid-template-columns: 1fr;
  }
  .bb-footer-grid {
    grid-template-columns: 1fr;
  }
}
