/* CSS Variables */
:root {
  --color-dark: #0a0a0a;
  --color-dark-lighter: #141414;
  --color-dark-card: #1a1a1a;
  --color-purple: #9333ea;
  --color-purple-light: #a855f7;
  --color-magenta: #d946ef;
  --color-pink: #ec4899;
  --color-white: #ffffff;
  --color-gray-100: #f3f4f6;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

/* Base */
html {
  scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--color-gray-300);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-purple-light);
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-300);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all 0.3s ease;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-dark);
  z-index: 99;
  padding: 5rem 1.5rem 2rem;
}

.mobile-nav.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 500;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a0a2e 50%, var(--color-dark) 100%);
  z-index: -2;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

.hero-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Featured In Section */
.featured-in {
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-gray-600);
}

.featured-label {
  text-align: center;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gray-400);
  margin-bottom: 1.5rem;
}

.featured-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem 3rem;
  flex-wrap: wrap;
}

.featured-logo {
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.featured-logo:hover {
  opacity: 1;
}

.featured-logo .logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-300);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(147, 51, 234, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(217, 70, 239, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 30% 40%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
  z-index: -1;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-content {
  max-width: 900px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--color-gray-300);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-purple), var(--color-magenta));
  color: var(--color-white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(147, 51, 234, 0.3);
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-dark {
  background: var(--color-dark-lighter);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

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

.section-header p {
  font-size: 1.125rem;
}

/* Cards */
.card {
  background: var(--color-dark-card);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 51, 234, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a0a2e 100%);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  margin-bottom: 1.5rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.stat-card {
  background: var(--color-dark-card);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--color-purple-light), var(--color-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gray-400);
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--color-dark-card);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(147, 51, 234, 0.5);
}

.feature-number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-purple-light);
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-text {
  font-size: 0.875rem;
  color: var(--color-gray-400);
}

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

@media (min-width: 768px) {
  .author-section {
    grid-template-columns: 1fr 1fr;
  }
}

.author-image {
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-purple), var(--color-magenta));
}

.author-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-content h2 {
  margin-bottom: 1rem;
}

.author-title {
  font-size: 1.125rem;
  color: var(--color-purple-light);
  margin-bottom: 1.5rem;
}

.author-bio {
  color: var(--color-gray-300);
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  background: var(--color-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 0 2rem;
}

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

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr;
  }
}

.footer-tagline {
  font-size: 1.5rem;
  font-weight: 300;
  max-width: 400px;
}

.footer-contact p {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--color-purple);
  border-color: var(--color-purple);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* Book Detail Page */
.book-hero {
  padding: 10rem 0 4rem;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a0a2e 50%, var(--color-dark) 100%);
}

.book-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .book-hero-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.book-cover {
  max-width: 500px;
  min-width: 300px;
  flex-shrink: 0;
  margin: 0 auto;
}

.book-cover img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.book-info h1 {
  margin-bottom: 1rem;
}

.book-subtitle {
  font-size: 1.25rem;
  color: var(--color-purple-light);
  margin-bottom: 1.5rem;
}

.book-description {
  color: var(--color-gray-300);
  margin-bottom: 2rem;
}

.book-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.format-badge {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

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

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--color-dark-card);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 51, 234, 0.5);
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-date {
  font-size: 0.75rem;
  color: var(--color-purple-light);
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.blog-excerpt {
  font-size: 0.875rem;
  color: var(--color-gray-400);
}

/* Article */
.article {
  padding: 10rem 0 4rem;
}

.article-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--color-purple-light);
  margin-bottom: 1rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2 {
  margin: 3rem 0 1.5rem;
}

.article-content h3 {
  margin: 2rem 0 1rem;
}

.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--color-gray-300);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 3px solid var(--color-purple);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-gray-300);
}

.article-content code {
  background: var(--color-dark-card);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.article-content pre {
  background: var(--color-dark-card);
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video-card {
  background: var(--color-dark-card);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 51, 234, 0.5);
}

.video-thumbnail {
  aspect-ratio: 16/9;
  position: relative;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a0a2e 100%);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-play {
  opacity: 1;
}

.video-play-btn {
  width: 4rem;
  height: 4rem;
  background: var(--color-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-info {
  padding: 1.5rem;
}

.video-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.video-duration {
  font-size: 0.75rem;
  color: var(--color-gray-400);
}

.video-duration-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-white);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.video-meta {
  font-size: 0.75rem;
  color: var(--color-gray-400);
}

.video-card {
  text-decoration: none;
  color: inherit;
}

.video-card .video-title {
  transition: color 0.2s ease;
}

.video-card:hover .video-title {
  color: var(--color-purple-light);
}

/* Page Header */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a0a2e 50%, var(--color-dark) 100%);
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Utilities */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--color-purple-light), var(--color-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }
.mt-4 { margin-top: 4rem; }

/* Translations Flag Grid */
.translations-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-gray-600);
}

.translations-section h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.75rem;
}

.flag-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  background: var(--color-dark-card);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.flag-item:hover {
  background: var(--color-dark-lighter);
  border-color: var(--color-purple);
  transform: translateY(-2px);
}

.flag {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.flag-label {
  font-size: 0.65rem;
  color: var(--color-gray-300);
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Compact Flag Grid for Book Hero */
.translations-hero {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-gray-600);
}

.translations-label {
  font-size: 0.875rem;
  color: var(--color-gray-300);
  margin-bottom: 0.75rem;
}

.flag-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.flag-item-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--color-dark-card);
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.flag-item-compact:hover {
  background: var(--color-dark-lighter);
  border-color: var(--color-purple);
  transform: scale(1.1);
}

.flag-item-compact .flag {
  font-size: 1.25rem;
  margin-bottom: 0;
}
