:root {
  --black:   #000000;
  --blue:    #0000AA;
  --green:   #00AA00;
  --cyan:    #00AAAA;
  --red:     #AA0000;
  --magenta: #AA00AA;
  --brown:   #AA5500;
  --lgray:   #AAAAAA;
  --dgray:   #555555;
  --lblue:   #5555FF;
  --lgreen:  #55FF55;
  --lcyan:   #55FFFF;
  --lred:    #FF5555;
  --lmag:    #FF55FF;
  --yellow:  #FFFF55;
  --white:   #FFFFFF;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--lgray);
  font-family: 'Share Tech Mono', monospace;
  cursor: crosshair;
  overflow-x: hidden;
}
body::before {
  content:'';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.12) 3px, rgba(0,0,0,0.12) 4px
  );
  pointer-events: none;
  z-index: 9999;
}
::-webkit-scrollbar { width: 8px; background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--blue); }
::-webkit-scrollbar-thumb:hover { background: var(--lblue); }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--blue);
  border-bottom: 2px solid var(--lcyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
}
.nav-brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--white);
  letter-spacing: 2px;
  text-decoration: none;
}
.nav-brand span { color: var(--yellow); }
.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links li a {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 17px;
  color: var(--lcyan);
  text-decoration: none;
  padding: 0 14px;
  height: 56px;
  line-height: 56px;
  letter-spacing: 1px;
  border-left: 1px solid rgba(85,255,255,0.15);
  transition: background 0.1s, color 0.1s;
}
.nav-links li a:hover { background: var(--lcyan); color: var(--black); }
.nav-clock {
  font-family: 'Share Tech Mono', monospace;
  font-size: 17px;
  color: var(--lgreen);
  letter-spacing: 2px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-location {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: var(--lgray);
  letter-spacing: 1px;
  opacity: 0.85;
}
.theme-toggle {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  background: transparent;
  border: 1px solid var(--lcyan);
  color: var(--lcyan);
  padding: 5px 10px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.15s, color 0.15s;
}
.theme-toggle:hover {
  background: var(--lcyan);
  color: var(--black);
}

/* ── LIGHT MODE ── */
body.light-mode {
  background: #f0f0f0;
  color: #111111;
}
body.light-mode nav {
  background: #0055CC;
  border-bottom-color: #0000AA;
}
body.light-mode .nav-brand { color: #ffffff; }
body.light-mode .nav-links li a { color: #ffffff; }
body.light-mode .nav-links li a:hover { background: #ffffff; color: #0000AA; }
body.light-mode .nav-location { color: #cce0ff; }
body.light-mode .nav-clock { color: #aaffaa; }
body.light-mode .theme-toggle { border-color: #ffffff; color: #ffffff; }
body.light-mode .theme-toggle:hover { background: #ffffff; color: #0055CC; }

body.light-mode #hero { background: #e8f4ff; }
body.light-mode #hero::before {
  background-image:
    linear-gradient(rgba(0,0,170,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,170,0.08) 1px, transparent 1px);
}
body.light-mode #hero::after {
  background: radial-gradient(ellipse, rgba(0,85,204,0.15) 0%, transparent 70%);
}
body.light-mode .boot-text { color: #888888; }
body.light-mode .boot-text .ok { color: #007700; }
body.light-mode .hero-title {
  color: #0000AA;
  text-shadow: 3px 3px 0 #aaaacc, 0 0 20px rgba(0,0,170,0.2);
}
body.light-mode .hero-prompt-fixed,
body.light-mode .hero-prompt-blink {
  color: #007700;
  text-shadow: 0 0 8px rgba(0,119,0,0.3);
}
body.light-mode .hero-sub { color: #AA5500; text-shadow: 2px 2px 0 #ddaa88; }
body.light-mode .hero-tagline { color: #444444; }
body.light-mode .scroll-hint { color: #aaaaaa; }
body.light-mode .cta-btn { background: #007700; color: #ffffff; box-shadow: 4px 4px 0 #005500; }
body.light-mode .cta-btn:hover { background: #AA5500; }

body.light-mode #servicios {
  background: linear-gradient(180deg, #e8f4ff 0%, #d0e8ff 100%);
  border-top-color: #0000AA;
  border-bottom-color: #0000AA;
}
body.light-mode .section-label { color: #888888; }
body.light-mode .section-title { color: #0000AA; text-shadow: 2px 2px 0 #aaaacc; }
body.light-mode .service-card { border-color: #0000AA; background: #ffffff; }
body.light-mode .service-card:hover { border-color: #0055CC; box-shadow: 0 0 16px rgba(0,0,170,0.15); }
body.light-mode .service-card::before { color: #aaaaaa; }
body.light-mode .service-name { color: #AA5500; }
body.light-mode .service-desc { color: #333333; }

body.light-mode #nosotros { background: transparent; }
body.light-mode .about-terminal { border-color: #0000AA; box-shadow: 0 0 20px rgba(0,0,170,0.1); }
body.light-mode .terminal-bar { background: #0000AA; }
body.light-mode .terminal-bar span { color: #ffffff; }
body.light-mode .terminal-body { background: #ffffff; }
body.light-mode .t-prompt { color: #007700; }
body.light-mode .t-cmd { color: #0000AA; }
body.light-mode .t-out { color: #444444; }
body.light-mode .t-yellow { color: #AA5500; }
body.light-mode .t-cyan { color: #0055CC; }
body.light-mode .t-cursor { color: #007700; }
body.light-mode .about-text p { color: #333333; }
body.light-mode .about-text p strong { color: #0000AA; }
body.light-mode .stat-box { border-color: #0000AA; background: rgba(0,0,170,0.05); }
body.light-mode .stat-num { color: #007700; text-shadow: none; }
body.light-mode .stat-label { color: #888888; }

body.light-mode #contacto { background: #d0e8ff !important; border-top-color: #0000AA !important; border-bottom-color: #0000AA !important; }
body.light-mode .contact-box { border-color: #0000AA; background: #ffffff; box-shadow: 0 0 20px rgba(0,0,170,0.1); }
body.light-mode .contact-box::before,
body.light-mode .contact-box::after { color: #0000AA; }
body.light-mode .contact-field { background: #f8f8f8; border-color: #0000AA; color: #007700; }
body.light-mode .contact-field::placeholder { color: #aaaaaa; }
body.light-mode .contact-field:focus { border-color: #0055CC; }
body.light-mode .field-label { color: #0055CC; }
body.light-mode .contact-item { color: #333333; }
body.light-mode .contact-item span { color: #AA5500; }
body.light-mode #msg-estado { border-radius: 0; }

body.light-mode footer { background: #0000AA; border-top-color: #0055CC; }
body.light-mode .footer-brand { color: #ffffff; }
body.light-mode .footer-ascii { color: #aaccff; }
body.light-mode .footer-copy { color: rgba(255,255,255,0.6); }

/* PALETTE BAR */
.palette-bar { display: flex; width: 100%; height: 8px; margin-top: 56px; }
.palette-bar div { flex: 1; }

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px;
  position: relative;
  background: var(--black);
  overflow: clip;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,170,170,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,170,170,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,0,170,0.35) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.boot-text {
  font-size: 17px;
  color: var(--dgray);
  letter-spacing: 1px;
  margin-bottom: 90px;
  text-align: center;
  animation: fadeIn 1s ease forwards;
}
.boot-text .ok { color: var(--lgreen); }
.hero-logo {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeUp 0.8s ease 0.3s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.hero-prompt-fixed {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(36px, 7.5vw, 66px);
  color: var(--lgreen);
  text-shadow: 0 0 10px var(--lgreen), 0 0 20px rgba(85,255,85,0.4);
  display: inline;
  margin-left: 8px;
}
.hero-prompt-blink {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(36px, 7.5vw, 66px);
  color: var(--lgreen);
  text-shadow: 0 0 10px var(--lgreen), 0 0 20px rgba(85,255,85,0.4);
  display: inline;
  animation: blink 1.4s step-end infinite;
}
.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(36px, 7.5vw, 66px);
  color: var(--lcyan);
  text-shadow: 4px 4px 0 var(--blue), 0 0 20px rgba(85,255,255,0.5), 0 0 40px rgba(85,255,255,0.2);
  letter-spacing: 6px;
  line-height: 1.3;
  display: block;
}
.hero-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(15px, 3vw, 23px);
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--brown), 0 0 12px rgba(255,255,85,0.4);
  letter-spacing: 8px;
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
}
.pixel-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 72px auto;
  justify-content: center;
}
.pixel-divider span { height: 4px; display: inline-block; background: var(--cyan); }
.pixel-divider span:nth-child(1) { width:6px; background:var(--blue); }
.pixel-divider span:nth-child(2) { width:14px; background:var(--cyan); }
.pixel-divider span:nth-child(3) { width:60px; background:var(--lcyan); }
.pixel-divider span:nth-child(4) { width:120px; background:var(--lgreen); }
.pixel-divider span:nth-child(5) { width:120px; background:var(--lgreen); }
.pixel-divider span:nth-child(6) { width:60px; background:var(--lcyan); }
.pixel-divider span:nth-child(7) { width:14px; background:var(--cyan); }
.pixel-divider span:nth-child(8) { width:6px; background:var(--blue); }
.hero-tagline {
  font-size: 20px;
  color: var(--lgray);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 80px;
}
.cta-btn {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 15px;
  color: var(--black);
  background: var(--lgreen);
  padding: 14px 28px;
  text-decoration: none;
  letter-spacing: 2px;
  box-shadow: 4px 4px 0 var(--green), 0 0 16px rgba(85,255,85,0.3);
  transition: transform 0.1s, box-shadow 0.1s;
  cursor: pointer;
  border: none;
}
.cta-btn:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--green), 0 0 24px rgba(85,255,85,0.5);
  background: var(--yellow);
}
.cta-btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--green); }
.scroll-hint {
  position: absolute;
  bottom: 24px;
  font-size: 15px;
  color: var(--dgray);
  letter-spacing: 2px;
  animation: bounce 2s ease infinite;
}

/* SECTIONS */
section { padding: 80px 32px; max-width: 1100px; margin: 0 auto; }
.section-header { margin-bottom: 48px; text-align: center; }
.section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  color: var(--dgray);
  letter-spacing: 4px;
  display: block;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(20px, 3.75vw, 27px);
  color: var(--lcyan);
  text-shadow: 2px 2px 0 var(--blue);
  letter-spacing: 3px;
  display: block;
}

/* SERVICIOS */
#servicios {
  background: linear-gradient(180deg, var(--black) 0%, #000011 100%);
  max-width: 100%;
  padding: 80px 32px;
  border-top: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
}
#servicios > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service-card {
  border: 2px solid var(--blue);
  background: var(--black);
  padding: 28px 24px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}
.service-card::before {
  content: attr(data-num);
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--dgray);
  position: absolute;
  top: 8px; right: 10px;
}
.service-card:hover {
  border-color: var(--lcyan);
  box-shadow: 0 0 16px rgba(85,255,255,0.2), inset 0 0 20px rgba(0,0,170,0.1);
}
.service-icon { font-size: 33px; display: block; margin-bottom: 14px; color: var(--lmag); }
.service-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--yellow);
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}
.service-desc { font-size: 18px; color: var(--lgray); line-height: 1.8; letter-spacing: 0.5px; }

/* NOSOTROS */
#nosotros { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; max-width: 1100px; }
.about-terminal { border: 2px solid var(--cyan); background: var(--black); box-shadow: 0 0 20px rgba(0,170,170,0.15); }
.terminal-bar { background: var(--cyan); padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
.terminal-bar span { font-family: 'Share Tech Mono', monospace; font-size: 15px; color: var(--black); letter-spacing: 1px; font-weight: bold; }
.t-dot { width: 8px; height: 8px; background: var(--black); display: inline-block; margin-left: auto; opacity: 0.4; }
.terminal-body { padding: 20px; font-size: 18px; line-height: 2; }
.t-line { display: block; }
.t-prompt { color: var(--lgreen); }
.t-cmd { color: var(--white); }
.t-out { color: var(--lgray); padding-left: 16px; display: block; }
.t-yellow { color: var(--yellow); }
.t-cyan { color: var(--lcyan); }
.t-cursor { color: var(--lgreen); animation: blink 0.8s step-end infinite; }
.about-text .section-header { text-align: left; }
.about-text p { font-size: 20px; line-height: 2; color: var(--lgray); margin-bottom: 16px; }
.about-text p strong { color: var(--lcyan); }
.stat-row { display: flex; gap: 24px; margin-top: 24px; flex-wrap: wrap; }
.stat-box { border: 1px solid var(--blue); padding: 12px 16px; text-align: center; background: rgba(0,0,170,0.08); }
.stat-num { font-family: 'Press Start 2P', monospace; font-size: 27px; color: var(--lgreen); display: block; text-shadow: 0 0 8px var(--lgreen); }
.stat-label { font-size: 14px; color: var(--dgray); letter-spacing: 1px; margin-top: 4px; display: block; }

/* CONTACTO */
.contact-box {
  border: 2px solid var(--cyan);
  background: var(--black);
  padding: 40px;
  box-shadow: 0 0 30px rgba(85,255,255,0.1), inset 0 0 40px rgba(0,0,170,0.05);
  position: relative;
}
.contact-box::before, .contact-box::after {
  content: '█';
  font-family: monospace;
  color: var(--cyan);
  font-size: 8px;
  position: absolute;
  top: -5px;
}
.contact-box::before { left: 8px; }
.contact-box::after  { right: 8px; }
.contact-field {
  display: block;
  width: 100%;
  background: var(--black);
  border: 1px solid var(--blue);
  color: var(--lgreen);
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px;
  padding: 12px 16px;
  margin-bottom: 14px;
  outline: none;
  letter-spacing: 1px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-field:focus { border-color: var(--lcyan); box-shadow: 0 0 10px rgba(85,255,255,0.2); }
.contact-field::placeholder { color: var(--dgray); }
textarea.contact-field { resize: vertical; min-height: 100px; }
.field-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 6px;
  text-align: left;
}
.contact-info { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.contact-item { font-size: 18px; color: var(--lgray); letter-spacing: 1px; }
.contact-item span { color: var(--yellow); }

/* FOOTER */
footer {
  background: var(--blue);
  border-top: 2px solid var(--lcyan);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand { font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--white); letter-spacing: 2px; }
.footer-brand span { color: var(--yellow); }
.footer-copy { font-size: 15px; color: rgba(255,255,255,0.5); letter-spacing: 1px; }
.footer-ascii { font-size: 15px; color: var(--lcyan); letter-spacing: 1px; }

/* ANIMATIONS */
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes bounce  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }
.fade-in-up { opacity:1; transform:translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 0 16px; }
  .nav-clock { display: none; }
  .nav-links li a { padding: 0 8px; font-size: 9px; }
  #nosotros { grid-template-columns: 1fr; gap: 32px; }
  section { padding: 60px 16px; }
  footer { flex-direction: column; text-align: center; }
}

/* WHATSAPP FLOTANTE */
.whatsapp-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9998;
  background: #25D366;
  border: 3px solid #1ebe5d;
  border-radius: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 #128C7E, 0 0 20px rgba(37,211,102,0.4);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  animation: wa-pulse 2.5s ease infinite;
}
.whatsapp-float:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 #128C7E, 0 0 30px rgba(37,211,102,0.6);
}
.whatsapp-float:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #128C7E;
}
@keyframes wa-pulse {
  0%, 100% { box-shadow: 4px 4px 0 #128C7E, 0 0 20px rgba(37,211,102,0.4); }
  50%       { box-shadow: 4px 4px 0 #128C7E, 0 0 35px rgba(37,211,102,0.7); }
}
