/* ============================================================
   ILUSTRARTE — CLARO.CSS — CYBERPUNK GREEN DAY EDITION
   Paleta: Verde + Blanco + Negro
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

/* ── Variables globales ── */
:root {
  --verde:       #00cc55;
  --verde-neon:  #00ff88;
  --verde-glow:  #00ff8850;
  --verde-dark:  #005522;
  --verde-mid:   #00aa44;
  --negro:       #000000;
  --negro-soft:  #0a0f0a;
  --blanco:      #ffffff;
  --gris-claro:  #f0f5f0;
  --gris-mid:    #d0e8d8;
  --font-title:  'Orbitron', monospace;
  --font-body:   'Rajdhani', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gris-claro);
  background-image:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(0,200,100,0.12) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(0,180,80,0.025) 3px,
      rgba(0,180,80,0.025) 4px
    );
  color: var(--negro);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gris-claro); }
::-webkit-scrollbar-thumb {
  background: var(--verde);
  border-radius: 3px;
  box-shadow: 0 0 6px var(--verde-glow);
}

/* ── Selección ── */
::selection {
  background: var(--negro);
  color: var(--verde-neon);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  left: -3000px;
  top: 0;
  width: 300px;
  height: 100%;
  background: linear-gradient(180deg, #f8fff8 0%, #e8f8ec 100%);
  border-right: 2px solid var(--negro);
  box-shadow: 4px 0 40px rgba(0,0,0,0.2), 6px 0 60px rgba(0,200,80,0.08);
  transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 10000;
  padding: 30px 20px;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--verde-dark), var(--verde-neon), var(--verde-dark));
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--negro);
}

.sidebar.active { left: 0; }

.sidebar h3 {
  font-family: var(--font-title);
  color: var(--negro);
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 30px;
  text-align: center;
  font-weight: 900;
  position: relative;
  padding-bottom: 16px;
}

.sidebar h3::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--negro), transparent);
}

.sidebar-menu { list-style: none; }
.sidebar-menu li { margin: 10px 0; }

.sidebar-menu a {
  font-family: var(--font-body);
  color: var(--negro);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0,180,80,0.06);
  border: 2px solid transparent;
  border-left: 3px solid var(--verde);
  border-radius: 4px;
  transition: all 0.25s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.sidebar-menu a:hover {
  background: var(--negro);
  color: var(--verde-neon);
  border-left-color: var(--verde-neon);
  transform: translateX(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15), inset 0 0 20px rgba(0,255,136,0.05);
  text-shadow: 0 0 8px var(--verde-glow);
}

/* ── Botón toggle ── */
.sidebar-toggle {
  position: fixed;
  left: 20px;
  top: 20px;
  width: 48px;
  height: 48px;
  background: var(--negro);
  border: 2px solid var(--verde);
  border-radius: 4px;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 20px rgba(0,200,80,0.2);
  transition: all 0.3s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.sidebar-toggle:hover {
  background: var(--verde);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3), 0 0 30px rgba(0,200,80,0.4);
  transform: scale(1.08);
}

.sidebar-toggle:hover span { background: var(--negro); }

.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--verde);
  border-radius: 1px;
  transition: 0.3s;
}

/* ============================================================
   LOGO
   ============================================================ */
.logo {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 9000;
}

.logo img {
  width: 72px;
  height: auto;
  border: 3px solid var(--negro);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2), 0 0 0 1px var(--verde);
  background: white;
  transition: all 0.3s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.logo img:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 2px var(--verde), 0 0 20px rgba(0,200,80,0.2);
}

/* ============================================================
   HEADER / TÍTULO
   ============================================================ */
h1 {
  font-family: var(--font-title);
  text-align: center;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 900;
  color: var(--negro);
  margin-top: 90px;
  padding: 0 20px;
  letter-spacing: 6px;
  text-transform: uppercase;
  position: relative;
  animation: glitchTitleClaro 10s infinite;
}

@keyframes glitchTitleClaro {
  0%, 88%, 90%, 100% {
    transform: translate(0);
    text-shadow: 4px 4px 0 var(--verde), -1px -1px 0 rgba(0,200,80,0.3);
  }
  89% {
    transform: translate(-3px, 0);
    text-shadow: 3px 3px 0 var(--verde-neon), -3px 0 #00ccff;
  }
}

h1::after {
  content: '';
  display: block;
  width: 260px;
  height: 4px;
  background: var(--negro);
  margin: 16px auto 0;
  position: relative;
}

h1::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--verde);
  z-index: 1;
}

p {
  font-family: var(--font-body);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.45);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin: 10px 0 28px;
}

/* ============================================================
   BOTONES NAVEGACIÓN
   ============================================================ */
.navegacion {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0 40px;
  flex-wrap: wrap;
}

.boton-cyberpunk {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--negro);
  padding: 14px 40px;
  background: var(--blanco);
  border: 2px solid var(--negro);
  box-shadow: 5px 5px 0 var(--verde), 5px 5px 0 var(--verde);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.boton-cyberpunk::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--negro);
  transform: translateY(101%);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.boton-cyberpunk:hover::before {
  transform: translateY(0%);
}

.boton-cyberpunk:hover {
  color: var(--verde-neon);
  box-shadow: 8px 8px 0 var(--verde-dark);
  text-shadow: 0 0 10px var(--verde-glow);
}

/* span interno para texto sobre el overlay */
.boton-cyberpunk span {
  position: relative;
  z-index: 1;
}

.boton-cyberpunk:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--verde);
}

/* ============================================================
   GRID DE SECCIONES
   ============================================================ */
.container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 30px 60px;
}

.seccion {
  background: var(--blanco);
  border: 2px solid var(--negro);
  border-radius: 0;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 6px 6px 0 var(--verde);
  text-decoration: none;
  display: block;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.seccion::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--verde-neon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: 2;
}

.seccion:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0 var(--negro);
  border-color: var(--negro);
}

.seccion:hover::before { transform: scaleX(1); }

.seccion img {
  width: 100%;
  display: block;
  transition: transform 0.45s ease, filter 0.3s ease;
  filter: saturate(0.9);
}

.seccion:hover img {
  transform: scale(1.07);
  filter: saturate(1.15) brightness(1.05);
}

.seccion h2 {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  color: var(--negro);
  background: linear-gradient(135deg, #d4f5e4 0%, #b8f0d4 100%);
  border-top: 2px solid var(--negro);
  padding: 13px 10px;
  margin: 0;
  font-weight: 900;
  transition: all 0.28s ease;
  position: relative;
  z-index: 3;
}

.seccion:hover h2 {
  background: var(--negro);
  color: var(--verde-neon);
  letter-spacing: 3px;
}

/* ============================================================
   BINARIO LATERAL
   ============================================================ */
.binario {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 60px;
  color: rgba(0,180,80,0.25);
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 2rem;
  z-index: 500;
  pointer-events: none;
  font-weight: bold;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  text-align: center;
}

.binario.left  { left: 0; }
.binario.right { right: 0; }

.binario span {
  display: block;
  animation: scrollBinario 5s linear infinite;
}

.binario span:nth-child(2) { animation-delay: -1.2s; animation-duration: 6s; }
.binario span:nth-child(3) { animation-delay: -2.6s; animation-duration: 4.5s; }
.binario span:nth-child(4) { animation-delay: -3.8s; animation-duration: 7s; }

@keyframes scrollBinario {
  0%   { transform: translateY(-120vh); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateY(120vh);  opacity: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--negro);
  border-top: 3px solid var(--verde);
  padding: 20px;
  text-align: center;
  position: relative;
}

footer p {
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 4px;
  color: rgba(0,255,136,0.5) !important;
  text-transform: uppercase;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  h1 { font-size: 1.8rem; letter-spacing: 3px; }

  .logo {
    position: fixed;
    top: 10px;
    right: 10px;
    left: auto;
  }

  .logo img { width: 56px; }

  .binario { z-index: 0; opacity: 0.2; }

  .container, h1, p, .navegacion, footer {
    position: relative;
    z-index: 10;
  }

  .sidebar        { z-index: 9999; }
  .sidebar-toggle { z-index: 10001; }

  .boton-cyberpunk {
    padding: 12px 26px;
    font-size: 0.72rem;
  }
}
