/* ============ DESIGN TOKENS ============ */
:root {
  --color-bg: #070b17;
  --color-surface: rgba(255, 255, 255, 0.03);
  --color-surface-elevated: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.07);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-primary: #3b82f6;
  --color-primary-dim: rgba(59, 130, 246, 0.1);
  --color-secondary: #8b5cf6;
  --gradient-accent: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-bg: linear-gradient(180deg, #070b17 0%, #0d1321 50%, #070b17 100%);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --shadow-card: 0 0 0 1px rgba(255,255,255,0.03), 0 4px 24px rgba(0,0,0,0.2);
  --shadow-card-hover: 0 0 0 1px rgba(255,255,255,0.08), 0 12px 48px rgba(0,0,0,0.3);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
}
/* ======================================== */

/* ============ BASE ============ */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

::selection { background: rgba(59, 130, 246, 0.3); color: #fff; }
::-moz-selection { background: rgba(59, 130, 246, 0.3); color: #fff; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

/* ============ HEADER ============ */
.header-glass {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(7, 11, 23, 0.75);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}
.header-glass.scrolled { background: rgba(7, 11, 23, 0.92); }

.header-glass h1 { color: var(--text-primary); font-size: 1.25rem; }
.header-glass nav a {
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  transition: color 0.2s ease; position: relative; padding: 0.25rem 0;
}
.header-glass nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--gradient-accent); border-radius: 2px;
  transform: scaleX(0); transition: transform 0.3s ease;
}
.header-glass nav a:hover { color: var(--text-primary); }
.header-glass nav a:hover::after { transform: scaleX(1); }
.header-glass nav a.active { color: var(--text-primary); }
.header-glass nav a.active::after { transform: scaleX(1); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.open span { background: #1e293b; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 767px) {
  .hamburger { display: flex; position: fixed; top: 1.25rem; right: 1.25rem; z-index: 10000; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; height: 100dvh;
    background: #f1f5f9; padding: 4rem 2rem;
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.25rem !important; color: #1e293b !important; }
  .nav-links a.active { color: #3b82f6 !important; }
  .nav-links a::after { background: #3b82f6; }
}

/* ============ SECTIONS ============ */
section { scroll-margin-top: 80px; }
.section-heading { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }

/* ============ CARDS ============ */
.card-glass {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-glass:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card-glass-elevated {
  background: var(--color-surface-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-glass-elevated:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ============ GRADIENT TEXT ============ */
.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gradient-accent); color: #fff; font-weight: 600;
  padding: 0.75rem 1.75rem; border-radius: 9999px; font-size: 0.875rem;
  transition: all 0.3s ease; border: none; cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--color-surface-elevated); color: var(--text-primary); font-weight: 500;
  padding: 0.75rem 1.75rem; border-radius: 9999px; font-size: 0.875rem;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: var(--color-surface-hover); border-color: var(--color-border-hover); transform: translateY(-2px);
}

.btn-accent {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #f59e0b; color: #000; font-weight: 600;
  padding: 0.75rem 1.75rem; border-radius: 9999px; font-size: 0.875rem;
  transition: all 0.3s ease;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3); }

/* ============ LINKS ============ */
.link-accent { color: var(--color-primary); transition: color 0.2s ease; }
.link-accent:hover { color: #60a5fa; }

.link-underline {
  color: var(--text-secondary); position: relative;
  transition: color 0.2s ease;
}
.link-underline::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--color-border); transition: background 0.2s ease;
}
.link-underline:hover { color: var(--text-primary); }
.link-underline:hover::after { background: var(--color-primary); }

/* ============ GLOW RING ============ */
.glow-ring {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 40px rgba(59, 130, 246, 0.1);
  transition: box-shadow 0.4s ease;
}
.glow-ring:hover { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.2); }

/* ============ TIMELINE ============ */
.timeline-line {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
}
.timeline-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.2);
  transition: box-shadow 0.4s ease;
}
.timeline-dot:hover { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.25), 0 0 30px rgba(59, 130, 246, 0.3); }

/* ============ ANIMATIONS ============ */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-left {
  opacity: 0; transform: translateX(-24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }

.fade-in-right {
  opacity: 0; transform: translateX(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

.fade-in-scale {
  opacity: 0; transform: scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-scale.visible { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-left, .fade-in-right, .fade-in-scale { opacity: 1; transform: none; }
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient-accent); color: #fff; display: flex;
  align-items: center; justify-content: center; border: none; cursor: pointer;
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: all 0.3s ease; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4); }

/* ============ FOOTER ============ */
.footer-glass {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* ============ PRODUCT CARDS SPECIFIC ============ */
.product-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.product-card:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ============ THOUGHT CARDS ============ */
.thought-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.thought-card:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* ============ BOOK CARDS ============ */
.book-card {
  width: 220px; flex-shrink: 0; text-align: center;
}
.book-card img {
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.book-card:hover img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ============ MAP ============ */
.map-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* ============ RESPONSIVE UTILITY ============ */
.container-premium {
  width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1.5rem;
}
@media (min-width: 768px) { .container-premium { padding: 0 2rem; } }
@media (min-width: 1280px) { .container-premium { padding: 0 2.5rem; } }

/* ============ POLICY PAGES ============ */
.policy-content h1 { margin-bottom: 1.5rem; }
.policy-content h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; font-size: 1.25rem; }
.policy-content p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.8; }
.policy-content ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.policy-content li { color: var(--text-secondary); margin-bottom: 0.5rem; }
.policy-content a { color: var(--color-primary); }
.policy-content a:hover { color: #60a5fa; }

/* ============ BULK REACH PAGE ============ */
.bulk-hero {
  position: relative;
}

/* ============ SCROLLBAR OVERRIDE FOR BOOK ROWS ============ */
.book-scroll::-webkit-scrollbar { height: 4px; }
.book-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ============ DIVIDER ============ */
.divider-gradient {
  height: 1px; background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  border: none; margin: 0;
}
