/* ============================================================
   GRAPHIC DESIGN THEME OVERRIDES (.graphic-mode)
   ============================================================ */

/* ── TOKENS & VARIABLES ── */
body.graphic-mode {
  /* Paleta Noir-Luxury */
  --canvas: #060510;
  --surface-1: #0d0b1a;
  --surface-2: #131025;
  --surface-3: #1a1630;
  
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  
  /* Acentos vibrantes */
  --accent-primary: #7c3aed; /* Violeta */
  --accent-secondary: #ec4899; /* Magenta */
  --accent-tertiary: #06b6d4; /* Cyan */
  --accent-glow: rgba(124, 58, 237, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  background-color: var(--canvas) !important;
  color: var(--text-main);
  
  /* Gradientes reutilizables */
  --grad-brand: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --grad-hover: linear-gradient(135deg, #8b5cf6, #f472b6);
}

/* ── VISIBILITY UTILS ── */
.graphic-only { display: none !important; }
body.graphic-mode .graphic-only { display: block !important; }
body.graphic-mode span.graphic-only { display: inline-flex !important; }
body.graphic-mode .web-only { display: none !important; }

/* ── CURSOR BLOB (GLOW) ── */
#cursor-blob {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(124,58,237,0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  mix-blend-mode: screen;
  filter: blur(40px);
}
body.graphic-mode #cursor-blob {
  opacity: 0.6;
}

/* ── TOGGLE BUTTON OVERRIDES ── */
body.graphic-mode .btn-design-toggle {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
body.graphic-mode .btn-design-toggle:hover {
  background: var(--surface-3);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
body.graphic-mode .btn-design-toggle .palette-icon {
  stroke: var(--accent-secondary);
}

/* ── GENERAL TYPOGRAPHY ── */
body.graphic-mode h1, 
body.graphic-mode h2, 
body.graphic-mode h3 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
}

/* ── SIDEBAR MULTINACIONAL ── */
body.graphic-mode .design-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--surface-1);
  border-right: 1px solid var(--border-default);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem;
  box-shadow: 20px 0 50px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  position: relative;
}

.brand-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  position: relative;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Status indicator (Pill verde) */
.brand-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--surface-1);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--accent-tertiary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Menu */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.sidebar-link svg {
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.sidebar-link:hover {
  color: var(--text-main);
  background: var(--surface-2);
  transform: translateX(4px);
}

.sidebar-link:hover svg {
  transform: scale(1.1);
  stroke: var(--accent-primary);
}

.sidebar-link.active {
  color: #fff;
  background: rgba(124, 58, 237, 0.15);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--accent-glow);
}

.sidebar-link.active svg {
  stroke: var(--accent-primary);
}

/* Sidebar CTA / Stats */
.sidebar-cta-card {
  margin-top: auto;
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.sidebar-cta-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.cta-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(236,72,153,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.sidebar-cta-card:hover .cta-glow {
  opacity: 1;
}

.sidebar-cta-card h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.sidebar-cta-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.btn-sidebar-hire {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--border-subtle);
}

.btn-sidebar-hire:hover {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ── LAYOUT SHIFT PARA EL MAIN ── */
body.graphic-mode .main-wrapper,
body.graphic-mode footer {
  margin-left: 280px;
  position: relative;
  z-index: 10;
  background: transparent;
}

/* ── HERO SECTION (DESIGN MODE) ── */
body.graphic-mode #navbar {
  display: none !important;
}

body.graphic-mode #hero {
  min-height: 100vh;
  padding: 0;
  display: block;
  position: relative;
  overflow: hidden;
}

body.graphic-mode .hero-grid {
  display: flex;
  width: 100%;
  height: 100vh;
  align-items: center;
}

body.graphic-mode .hero-left {
  flex: 0 0 50%;
  padding: 4rem 5%;
  position: relative;
  z-index: 2;
}

body.graphic-mode .hero-right {
  flex: 0 0 50%;
  height: 100vh;
}

body.graphic-mode .graphic-main-title {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 2;
}

body.graphic-mode .text-gradient-purple {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

body.graphic-mode .hero-subtitle {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
  margin-bottom: 3rem;
  font-weight: 300;
  position: relative;
  z-index: 2;
}

/* ── BOTONES PREMIUM ── */
body.graphic-mode .btn-graphic-primary {
  background: var(--text-main);
  color: var(--canvas);
  padding: 1rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

body.graphic-mode .btn-graphic-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255,255,255,0.2);
  background: #fff;
}

body.graphic-mode .btn-graphic-ghost {
  background: transparent;
  color: var(--text-main);
  padding: 1rem 2rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-default);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

body.graphic-mode .btn-graphic-ghost:hover {
  border-color: var(--accent-primary);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-4px);
}

/* ── SLIDER HERO DINÁMICO ── */
body.graphic-mode .slider-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100vh;
  z-index: 1;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
  border-left: 1px solid var(--border-default);
}

body.graphic-mode .slide-bg {
  position: absolute;
  inset: 0;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.05);
}

body.graphic-mode .slide-active .slide-bg {
  transform: scale(1);
}

body.graphic-mode .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--canvas) 0%, rgba(6,5,16,0.3) 100%);
}

/* ── CARDS DE SERVICIOS (MODO DISEÑO) ── */
body.graphic-mode .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

body.graphic-mode .service-card {
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.graphic-mode .service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

body.graphic-mode .service-card:hover {
  transform: translateY(-10px);
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

body.graphic-mode .service-card:hover::before {
  opacity: 1;
}

body.graphic-mode .service-icon-glow {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.graphic-mode .service-card:hover .service-icon-glow {
  transform: scale(1.1) rotate(-5deg);
}

body.graphic-mode .service-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

body.graphic-mode .service-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
}

body.graphic-mode .service-link {
  margin-top: auto;
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

body.graphic-mode .service-card:hover .service-link {
  gap: 1rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  body.graphic-mode .design-sidebar {
    transform: translateX(-100%);
  }
  
  body.graphic-mode .design-sidebar.open {
    transform: translateX(0);
  }

  body.graphic-mode .main-wrapper,
  body.graphic-mode footer {
    margin-left: 0;
  }
  
  body.graphic-mode .slider-wrapper {
    position: relative;
    width: 100%;
    height: 50vh;
    clip-path: none;
    border-left: none;
    order: -1;
  }
  
  body.graphic-mode #hero {
    flex-direction: column;
    padding: 0;
    justify-content: flex-start;
  }
  
  body.graphic-mode .hero-content {
    padding: 4rem 5%;
    text-align: center;
  }
}
/* -- SHATTER DISINTEGRATION ANIMATION -- */
.shatter-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display: grid;
  /* El grid-template se inyecta via JS dependiendo de la pantalla */
}

.shatter-block {
  background-color: var(--canvas, #060510);
  opacity: 0;
  transform: scale(1) translateY(0) rotate(0);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.shatter-block.active {
  opacity: 1;
}

/* Modo Dev: bloques color negro oscuro */
body:not(.graphic-mode) .shatter-block {
  background-color: #060510;
}

/* Modo Graphic: bloques color negro oscuro */
body.graphic-mode .shatter-block {
  background-color: #04070c; /* Color del modo web para la ida */
}
/* -- MOBILE BOTTOM NAV (DESIGN MODE) -- */
body.graphic-mode .design-bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  body.graphic-mode .design-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 11, 26, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-default);
    z-index: 100;
    justify-content: space-around;
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  body.graphic-mode .design-bottom-nav a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  body.graphic-mode .design-bottom-nav a svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
  }

  body.graphic-mode .design-bottom-nav a.active {
    color: var(--accent-primary);
  }
  
  body.graphic-mode .btn-design-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    padding: 0.5rem;
  }
  body.graphic-mode .btn-design-text {
    display: none;
  }
}
