/**
 * FabZone Blog - Editorial Magazine Theme
 * Purple & Magenta palette with Playfair Display serif headings
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --primary-50: #fdf4ff;
  --primary-100: #fae8ff;
  --primary-200: #f5d0fe;
  --primary-300: #f0abfc;
  --primary-400: #e879f9;
  --primary-500: #d946ef;
  --primary-600: #c026d3;
  --primary-700: #a21caf;
  --primary-800: #86198f;
  --primary-900: #701a75;

  --accent-400: #a78bfa;
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --accent-700: #6d28d9;
  --accent-800: #5b21b6;
  --accent-900: #4c1d95;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #0a0a0f;
  color: #f8fafc;
  min-height: 100vh;
  line-height: 1.6;
}

::selection {
  background: #c026d3;
  color: white;
}

/* ========================================
   EDITORIAL LAYOUT COMPONENTS
   ======================================== */

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

.ed-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

.ed-sans {
  font-family: 'Inter', system-ui, sans-serif;
}

.ed-top-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ed-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ed-nav-link {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.ed-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #c026d3;
  transition: width 0.3s ease;
}

.ed-nav-link:hover,
.ed-nav-link.active {
  color: #ffffff;
}

.ed-nav-link:hover::after,
.ed-nav-link.active::after {
  width: 100%;
}

.ed-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #c026d3, #7c3aed);
}

.ed-badge {
  display: inline-block;
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
}

.ed-sidebar-box {
  border-left: 2px solid #c026d3;
  padding-left: 1.5rem;
}

.ed-category-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.ed-category-pill:hover {
  border-color: #c026d3;
  color: #c026d3;
}

.ed-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.875rem 1.25rem;
  color: #ffffff;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.ed-input:focus {
  outline: none;
  border-color: #c026d3;
}

.ed-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* ========================================
   MAGAZINE CARDS
   ======================================== */

.magazine-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.magazine-card img {
  transition: transform 0.6s ease;
}

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

.magazine-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
  transition: all 0.4s ease;
}

.magazine-card:hover .magazine-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}

.article-list-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
}

.article-list-card:hover .article-list-title {
  color: #c026d3;
}

.article-list-image {
  overflow: hidden;
}

.article-list-image img {
  transition: transform 0.5s ease;
}

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

/* ========================================
   CATEGORY CARDS
   ======================================== */

.category-card {
  position: relative;
  height: 280px;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.category-card:hover {
  border-color: rgba(192, 38, 211, 0.4);
}

.category-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s ease;
}

.category-card:hover .category-bg {
  transform: scale(1.08);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.category-content {
  position: relative;
  z-index: 1;
  color: white;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

/* ========================================
   BADGES (backwards compat)
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  text-decoration: none;
}

.badge-primary {
  background: rgba(192, 38, 211, 0.15);
  color: #e879f9;
  border: 1px solid rgba(192, 38, 211, 0.25);
}

/* ========================================
   TYPOGRAPHY UTILITIES
   ======================================== */

.text-gradient {
  background: linear-gradient(135deg, #e879f9 0%, #a855f7 50%, #c026d3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #e879f9 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-hero {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.title-section {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
}

.body-large {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

/* ========================================
   PROSE CONTENT
   ======================================== */

.prose {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  line-height: 1.85;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #ffffff;
  font-family: 'Playfair Display', Georgia, serif;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.375rem; }
.prose h4 { font-size: 1.125rem; }

.prose p {
  margin-bottom: 1.5rem;
}

.prose a {
  color: #e879f9;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.prose a:hover {
  border-bottom-color: #e879f9;
}

.prose img,
.prose figure img,
.prose .wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.prose .wp-caption {
  max-width: 100%;
  margin: 2rem 0;
}

.prose blockquote {
  border-left: 3px solid #c026d3;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}

.prose ul, .prose ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   THEME TOGGLE (preserved from original)
   ======================================== */

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

/* ========================================
   READING PROGRESS (preserved)
   ======================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #c026d3, #7c3aed);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* ========================================
   MOBILE MENU (preserved)
   ======================================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0a0a0f;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .category-card {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .ed-nav-link {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.glass-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

/* ========================================
   LINE CLAMP (fallback)
   ======================================== */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   LIGHT MODE OVERRIDES
   ======================================== */

html.light body {
  background: #f8f7f4;
  color: #1a1a1a;
}

html.light ::selection {
  background: #c026d3;
  color: white;
}

html.light .ed-top-bar {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html.light #mainHeader {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html.light #mainHeader.scrolled {
  background: rgba(248, 247, 244, 0.95);
}

html.light .ed-nav-link {
  color: rgba(0, 0, 0, 0.6);
}

html.light .ed-nav-link:hover,
html.light .ed-nav-link.active {
  color: #1a1a1a;
}

html.light .ed-nav-link::after {
  background: #c026d3;
}

html.light .ed-line {
  background: linear-gradient(90deg, #c026d3, #7c3aed);
}

html.light .ed-badge {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
}

html.light .ed-sidebar-box {
  border-left-color: #c026d3;
}

html.light .ed-sidebar-box h4 {
  color: #1a1a1a;
}

html.light .ed-category-pill {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.75);
}

html.light .ed-category-pill:hover {
  border-color: #c026d3;
  color: #c026d3;
}

html.light .ed-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

html.light .ed-input:focus {
  border-color: #c026d3;
}

html.light .ed-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

/* Light mode cards & overlays */
html.light .magazine-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
}

html.light .magazine-card:hover .magazine-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}

html.light .article-list-title {
  color: #1a1a1a;
}

html.light .article-list-card:hover .article-list-title {
  color: #c026d3;
}

html.light .category-card {
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .category-card:hover {
  border-color: rgba(192, 38, 211, 0.4);
}

html.light .category-content h3,
html.light .category-content p {
  color: white;
}

/* Light mode buttons */
html.light .btn-secondary {
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
}

html.light .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
}

/* Light mode typography */
html.light .text-gradient {
  background: linear-gradient(135deg, #c026d3 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.light .title-hero,
html.light .title-section {
  color: #1a1a1a;
}

html.light .body-large {
  color: rgba(0, 0, 0, 0.6);
}

/* Light mode prose */
html.light .prose {
  color: rgba(0, 0, 0, 0.8);
}

html.light .prose h1,
html.light .prose h2,
html.light .prose h3,
html.light .prose h4 {
  color: #1a1a1a;
}

html.light .prose a {
  color: #a21caf;
}

html.light .prose a:hover {
  border-bottom-color: #a21caf;
}

html.light .prose blockquote {
  border-left-color: #c026d3;
  color: rgba(0, 0, 0, 0.55);
}

html.light .prose code {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}

/* Light mode components */
html.light .theme-toggle {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}

html.light .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}

html.light .theme-toggle svg {
  color: rgba(0, 0, 0, 0.6);
}

html.light .mobile-menu {
  background: #f8f7f4;
}

html.light .glass-modal {
  background: rgba(255, 255, 255, 0.85);
}

html.light .glass-modal .bg-\[#0e0e0f\] {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light .reading-progress {
  background: linear-gradient(90deg, #c026d3, #7c3aed);
}

/* Light mode scrollbar */
html.light ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Utility overrides for Tailwind classes used inline */
html.light .border-white\/5,
html.light .border-white\/10 {
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .bg-white\/5 {
  background-color: rgba(0, 0, 0, 0.04);
}

html.light .bg-white\/\[0\.02\] {
  background-color: rgba(0, 0, 0, 0.02);
}

html.light .text-white,
html.light .text-white\/90,
html.light .text-white\/80,
html.light .text-white\/70,
html.light .text-white\/60,
html.light .text-white\/50,
html.light .text-white\/40 {
  color: #1a1a1a;
}

html.light .text-white\/30 {
  color: rgba(0, 0, 0, 0.3);
}

html.light .hover\:text-white:hover,
html.light .hover\:text-primary-400:hover {
  color: #c026d3;
}

html.light .hover\:bg-white\/5:hover,
html.light .hover\:bg-white\/10:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ========================================
   TEAM AVATAR (About page)
   ======================================== */

.team-initial {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  font-family: 'Playfair Display', Georgia, serif;
  color: white;
  background: linear-gradient(135deg, #c026d3, #7c3aed);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.team-member {
  text-align: center;
}

.team-member h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-family: 'Playfair Display', Georgia, serif;
}

.team-member p {
  font-size: 0.9375rem;
  opacity: 0.8;
  margin: 0;
  line-height: 1.5;
}
