/*
 Theme Name:   MSEndpoint Deduction Theme
 Theme URI:    https://msendpoint.com
 Description:  A child theme for Neve featuring a secret Deduction Mode, Antigravity Academy CTA, and RGPD Cookie banner.
 Author:       Souhaiel
 Author URI:   https://msendpoint.com
 Template:     neve
 Version:      2.2.0
 Text Domain:  msendpoint-child
*/

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- 1. Global Enterprise Theme Aesthetic Overrides (Neve Variables) --- */
:root,
[data-neve-theme="light"],
[data-neve-theme="dark"],
html.neve-light-theme,
html.neve-dark-theme~* {
  --nv-primary-accent: #6366f1 !important;
  /* Indigo-500 */
  --nv-secondary-accent: #4f46e5 !important;
  --nv-site-bg: #050505 !important;
  /* Borealis Black */
  --nv-light-bg: #0a0a0a !important;
  /* Obsidian */
  --nv-dark-bg: #000000 !important;
  --nv-text-color: #e2e8f0 !important;
  --nv-text-dark-bg: #f8fafc !important;
}

body {
  background-color: var(--nv-site-bg) !important;
  color: var(--nv-text-color) !important;
  font-family: 'Inter', sans-serif !important;
}

/* Base Neve container overrides */
.has-nv-site-bg-background-color,
.has-background,
.wp-block-themeisle-blocks-advanced-columns,
.wp-block-themeisle-blocks-advanced-column,
.neve-main>.container,
.site-footer,
.header:not(.header-transparent) .header-main {
  background-color: transparent !important;
}

.header-main,
.site-footer {
  background-color: var(--nv-dark-bg) !important;
}

/* JetBrains Mono for Code Blocks and Tech UI elements */
pre,
code,
kbd,
samp,
.deduction-badge,
.deduction-clue,
.mse-btn {
  font-family: 'JetBrains Mono', monospace !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.02em;
}

/* --- 2. Deduction Mode Specific Overlay Effects --- */

.deduction-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9998;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
  background-size: 50px 50px;
}

.deduction-scanline {
  position: fixed;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.5));
  box-shadow: 0px 5px 15px rgba(99, 102, 241, 0.3);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  animation: scanVertical 6s linear infinite;
  transition: opacity 0.4s;
}

@keyframes scanVertical {
  0% {
    transform: translateY(-100vh);
  }

  100% {
    transform: translateY(200vh);
  }
}

body.deduction-active .deduction-overlay,
body.deduction-active .deduction-scanline {
  opacity: 1;
}

.deduction-overlay {
  mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 0%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 0%, rgba(0, 0, 0, 1) 100%);
}

.deduction-badge {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid #6366f1;
  color: #6366f1;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 4px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.deduction-active .deduction-badge {
  opacity: 1;
  transform: translateY(0);
}

.deduction-clue {
  display: inline-block;
  opacity: 0;
  color: #6366f1 !important;
  font-size: 0.85em;
  margin-left: 10px;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(5px);
  pointer-events: none;
}

body.deduction-active .deduction-clue {
  opacity: 1;
  transform: translateY(0);
}

/* --- 3. RGPD / GDPR Cookie Banner Aesthetic --- */
.mse-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: 90%;
  max-width: 900px;
  background: #0a0a0a;
  color: #e2e8f0;
  padding: 24px 32px;
  z-index: 100000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(99, 102, 241, 0.5);
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mse-cookie-banner.show {
  transform: translateX(-50%) translateY(0);
}

.mse-cookie-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
  margin-left: 20px;
}

.mse-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.mse-btn:hover {
  background: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.mse-btn.mse-btn-outline {
  background: transparent;
  border: 1px solid #64748b;
  color: #cbd5e1;
}

.mse-btn.mse-btn-outline:hover {
  border-color: #6366f1;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
  .mse-cookie-banner {
    flex-direction: column;
    gap: 20px;
    bottom: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
    border-left: none;
    border-top: 4px solid #6366f1;
    transform: translateY(100%);
    left: 0;
  }

  .mse-cookie-banner.show {
    transform: translateY(0);
  }

  .mse-cookie-buttons {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  .mse-cookie-buttons button {
    flex-grow: 1;
  }
}

/* --- 4. Studio X: CTA & Antigravity Styles --- */

.studio-x-cta-section {
  position: relative;
  background-color: #050505;
  /* Borealis Black */
  color: #ffffff;
  padding: 100px 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'Inter', sans-serif;
}

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  /* Required to catch mouse hover for physics */
  z-index: 1;
}

.studio-x-cta-content.glass-lab {
  position: relative;
  z-index: 2;
  background: rgba(10, 10, 10, 0.4);
  /* Obsidian base */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 40px;
  padding: 60px 40px;
  max-width: 900px;
  width: 100%;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.studio-x-cta-content.glass-lab:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.2);
}

.studio-x-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 2.75rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #ffffff;
}

.text-gradient-purple {
  background: linear-gradient(to right, #818cf8, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  color: transparent;
}

.studio-x-desc {
  font-weight: 400;
  font-size: 1.25rem;
  color: #94a3b8;
  /* Slate-400 */
  margin-bottom: 50px;
  line-height: 1.6;
}

.studio-x-btn {
  display: inline-block;
  background-color: #6366f1;
  /* Indigo-500 */
  color: #ffffff !important;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.studio-x-btn:hover {
  background-color: #4f46e5;
  transform: scale(1.05);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

/* GSAP Floating Bouncers */
.bouncers-container {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 50px;
}

.bouncer {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  font-size: 32px;
  color: #34d399;
  /* Emerald 400 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .bouncers-container {
    gap: 16px;
  }

  .bouncer {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }

  .studio-x-title {
    font-size: 2rem;
  }

  .studio-x-desc {
    font-size: 1.1rem;
  }

  .studio-x-cta-content.glass-lab {
    padding: 40px 20px;
  }
}

/* --- 5. Studio X: Modernization of Neve Pages (Blog, About, Contact) --- */
.nv-content-wrap,
.neve-main>.container,
article.type-post,
article.type-page {
  background: rgba(10, 10, 10, 0.4) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 30px !important;
  padding: 30px !important;
  margin-top: 40px !important;
  margin-bottom: 40px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.home .neve-main>.container,
body.home .nv-content-wrap,
body.home article.type-page {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

.nv-index-posts .nv-post-wrap {
  background: rgba(10, 10, 10, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
  padding: 25px !important;
  margin-bottom: 30px !important;
  transition: all 0.3s ease !important;
}

.nv-index-posts .nv-post-wrap:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

h1.entry-title,
.page-title,
.nv-page-title {
  background: linear-gradient(to right, #818cf8, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
  padding-bottom: 5px;
}

/* Ensure buttons in standard pages align with Studio X */
button,
.button,
input[type="submit"],
input[type="button"],
.nv-read-more {
  background-color: #6366f1 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.nv-read-more:hover {
  background-color: #4f46e5 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 15px -10px rgba(99, 102, 241, 0.5) !important;
}