/* ════════════════════════════════════════
   EMIN MEDIA — Design Tokens
════════════════════════════════════════ */
:root {
  --bg:       #050A10;
  --bg2:      #080E16;
  --surface:  #0C131D;
  --surface2: #111A26;
  --surface3: #151F2C;

  --c1: #E8453C;  /* warm red */
  --c2: #FF7A3D;  /* orange */
  --c3: #00C8E0;  /* cyan */
  --c4: #8B6CFF;  /* violet */
  --c5: #00E59A;  /* mint */

  --grad:   linear-gradient(135deg, #E8453C 0%, #FF7A3D 30%, #FFBA08 60%, #00C8E0 80%, #8B6CFF 100%);
  --grad-w: linear-gradient(135deg, #E8453C, #FF7A3D);
  --grad-c: linear-gradient(135deg, #00C8E0, #8B6CFF);

  --text:   #F0F3FA;
  --text2:  #B0BCCE;
  --muted:  #5A6A7E;
  --muted2: #7A8CA0;

  --border:  rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.10);

  --glass: rgba(12,19,29,0.85);

  --r:      12px;
  --r-lg:   20px;
  --r-full: 9999px;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Inter', sans-serif;
}

/* ════════════════════════════════════════
   BASE
════════════════════════════════════════ */
html { background: var(--bg); scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ════════════════════════════════════════
   BACKGROUND — Mesh + Grid
════════════════════════════════════════ */
.scene {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: var(--bg);
}
.scene::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.orb { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; animation: orbdrift 22s ease-in-out infinite alternate; }
.o1 { width: 700px; height: 500px; top: -180px; right: -120px; background: radial-gradient(ellipse, rgba(139,108,255,0.15) 0%, transparent 65%); }
.o2 { width: 500px; height: 400px; bottom: -80px; left: -80px; background: radial-gradient(ellipse, rgba(0,200,224,0.08) 0%, transparent 65%); animation-delay: -8s; animation-duration: 28s; }
.o3 { width: 400px; height: 350px; top: 45%; left: 30%; background: radial-gradient(ellipse, rgba(232,69,60,0.06) 0%, transparent 65%); animation-delay: -14s; }
@keyframes orbdrift { from{transform:translate(0,0) scale(1)} to{transform:translate(35px,25px) scale(1.1)} }

.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ════════════════════════════════════════
   LAYOUT
════════════════════════════════════════ */
.wrap     { position: relative; z-index: 2; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section   { padding: 6rem 2rem; }

/* ════════════════════════════════════════
   NAVBAR
════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 0;
  background: rgba(5,10,16,0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s, background 0.3s;
}
.navbar.scrolled { padding: 0.6rem 0; background: rgba(5,10,16,0.92); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.nav-brand { display: flex; align-items: center; gap: 0.6rem; }
.nav-brand-text { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-brand-text span { background: var(--grad-c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 10px 22px;
  border-radius: var(--r-full);
  background: var(--grad-c);
  color: #fff; font-size: 0.8125rem; font-weight: 600;
  font-family: var(--font-mono);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer; border: none;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,200,224,0.25); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ════════════════════════════════════════
   HERO (Home)
════════════════════════════════════════ */
.hero {
  padding: 10rem 2rem 6rem;
  text-align: center;
  position: relative;
}
.hero-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--r-full);
  background: rgba(0,200,224,0.08);
  border: 1px solid rgba(0,200,224,0.2);
  color: var(--c3);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p {
  font-size: 1.2rem;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 14px 30px;
  border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad-c);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(0,200,224,0.3); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-ghost:hover { border-color: var(--c3); color: var(--text); box-shadow: 0 8px 32px rgba(0,200,224,0.1); }

/* ════════════════════════════════════════
   SERVICES GRID (Home)
════════════════════════════════════════ */
.services { padding: 5rem 2rem 6rem; }
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--r-full);
  background: rgba(139,108,255,0.08);
  border: 1px solid rgba(139,108,255,0.2);
  color: #A78BFA;
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  border-color: rgba(0,200,224,0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.service-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(0,200,224,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.service-card p {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.6;
}

/* ════════════════════════════════════════
   STATS BAR
════════════════════════════════════════ */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  background: var(--grad-c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--muted2);
  margin-top: 0.25rem;
}

/* ════════════════════════════════════════
   CTA BANNER
════════════════════════════════════════ */
.cta-section { padding: 4rem 2rem 6rem; }
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,200,224,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card::after {
  content: '';
  position: absolute; bottom: -80px; left: -80px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(139,108,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
}
.cta-card p {
  color: var(--text2);
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
}

/* ════════════════════════════════════════
   BLOG PAGE
════════════════════════════════════════ */
.blog-hero { padding-top: 140px; padding-bottom: 2rem; text-align: center; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}
.post-card:hover {
  border-color: rgba(0,200,224,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.post-card a { display: block; color: inherit; text-decoration: none; }
.post-card-img { overflow: hidden; height: 200px; }
.post-card-img img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; opacity: 0.3;
}
.post-card-body { padding: 1.5rem; }
.post-card-cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: rgba(139,108,255,0.1);
  border: 1px solid rgba(139,108,255,0.2);
  color: #A78BFA;
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem; font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.625rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--muted2);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 1rem;
}
.post-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.75rem; border-top: 1px solid var(--border);
}
.post-card-author {
  display: flex; align-items: center; gap: 0.5rem;
}
.post-card-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--grad-c);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 700; color: #fff;
  font-family: var(--font-heading);
}
.post-card-author span { font-size: 0.75rem; color: var(--muted); }
.post-card-date { font-size: 0.6875rem; color: var(--muted); }

/* ════════════════════════════════════════
   SINGLE POST
════════════════════════════════════════ */
.single-article { padding: 10rem 2rem 4rem; }
.single-article .container { max-width: 780px; }
.single-article h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.single-meta {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  color: var(--muted2); font-size: 0.8125rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.single-featured { margin: 0 -2rem 2.5rem; border-radius: var(--r-lg); overflow: hidden; }
.single-featured img { width: 100%; height: auto; }

.single-content { font-size: 1.0625rem; color: var(--text2) !important; line-height: 1.8; }
.single-content * { color: inherit !important; background-color: transparent !important; background: transparent !important; }
.single-content h2 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text) !important; margin: 2.5rem 0 1rem; }
.single-content h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--text) !important; margin: 2rem 0 0.75rem; }
.single-content h4 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--text) !important; margin: 1.5rem 0 0.5rem; }
.single-content p { margin-bottom: 1.3rem; color: var(--text2) !important; }
.single-content div { margin-bottom: 1rem; }
.single-content ul, .single-content ol { margin: 0 0 1.5rem 1.5rem; color: var(--text2) !important; }
.single-content li { margin-bottom: 0.5rem; color: var(--text2) !important; }
.single-content a { color: var(--c3) !important; text-decoration: underline; text-underline-offset: 3px; }
.single-content a:hover { color: var(--c4) !important; }
.single-content strong, .single-content b { color: var(--text) !important; font-weight: 600; }
.single-content em, .single-content i { font-style: italic; }
.single-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9375rem; }
.single-content th { background: var(--surface2) !important; color: var(--text) !important; padding: 0.75rem 1rem; text-align: left; font-weight: 600; border-bottom: 1px solid var(--border2); }
.single-content td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text2) !important; }
.single-content tr:hover td { background: var(--surface) !important; }
.single-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--c3);
  background: var(--surface) !important;
  border-radius: 0 var(--r) var(--r) 0;
  font-style: italic;
  color: var(--text) !important;
}
.single-content img { border-radius: var(--r); margin: 1.5rem 0; }

/* Pipeline content boxes — force dark */
.single-content .key-takeaways,
.single-content .faq-section,
.single-content .summary-box,
.single-content [class*="takeaway"],
.single-content [class*="faq"],
.single-content [class*="summary"],
.single-content [class*="callout"],
.single-content [class*="highlight"],
.single-content [class*="box"] {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-left: 3px solid var(--c3) !important;
  border-radius: var(--r) !important;
  padding: 1.5rem !important;
  margin: 2rem 0 !important;
  color: var(--text2) !important;
}
.single-content .key-takeaways h3,
.single-content .faq-section h3,
.single-content [class*="takeaway"] h3,
.single-content [class*="faq"] h3 { margin-top: 0; color: var(--text) !important; }

.single-content .faq-item { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
.single-content .faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* Author link */
.single-meta a { color: var(--c3); text-decoration: none; transition: color 0.2s; }
.single-meta a:hover { color: var(--text); }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 0.8125rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { font-size: 0.8125rem; color: var(--muted2); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ════════════════════════════════════════
   PAGINATION
════════════════════════════════════════ */
.pagination { text-align: center; margin-top: 3rem; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text2);
  transition: all 0.2s;
  margin: 0 0.2rem;
}
.pagination .page-numbers.current {
  background: rgba(0,200,224,0.12);
  border-color: rgba(0,200,224,0.3);
  color: var(--c3); font-weight: 600;
}

/* ════════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════ */
.sr {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.sr.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--glass); backdrop-filter: blur(20px);
    padding: 1.5rem 2rem; gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .hero { padding: 8rem 1.25rem 4rem; }
  .hero h1 { font-size: 2.25rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .single-featured { margin: 0 0 2rem; }
}
