/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* ===== TEMA OSCURO VERDE (default) ===== */
:root {
  --c-prim:       #6c63ff;
  --c-prim-hover: #574fd6;
  --c-acento:     #a29bfe;
  --c-fondo:      #0a0a12;
  --c-fondo-alt:  #12121e;
  --c-card:       #1a1a2e;
  --c-texto:      #e8e8f0;
  --c-suave:      #8888aa;
  --c-borde:      #2a2a3e;
  --c-navbar:     rgba(10,10,18,0.97);
  --fuente:       'Segoe UI', system-ui, sans-serif;
  --radio:        12px;
  --trans:        0.3s ease;
}

body {
  font-family: var(--fuente);
  background: var(--c-fondo);
  color: var(--c-texto);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--trans), color var(--trans);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ===== BOTONES ===== */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: var(--radio);
  font-weight: 700;
  font-size: .93rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--trans);
}
.btn-primary  { background: var(--c-prim); color: #000; }
.btn-primary:hover  { background: var(--c-prim-hover); transform: translateY(-2px); }
.btn-outline  { background: transparent; border-color: var(--c-prim); color: var(--c-prim); }
.btn-outline:hover  { background: var(--c-prim); color: #000; transform: translateY(-2px); }
.btn-full { width: 100%; text-align: center; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 2rem;
  background: var(--c-navbar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-borde);
  z-index: 1000;
  gap: 1rem;
  min-width: 0;
  transition: box-shadow var(--trans), background var(--trans);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.4); }

.nav-logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .dot { color: var(--c-prim); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  flex-shrink: 1;
  min-width: 0;
}
.nav-links a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-suave);
  text-transform: uppercase;
  letter-spacing: .7px;
  white-space: nowrap;
  position: relative;
  transition: color var(--trans);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--c-prim);
  transition: width var(--trans);
}
.nav-links a:hover { color: var(--c-prim); }
.nav-links a:hover::after { width: 100%; }

.nav-acciones {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.temas-wrap {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--c-card);
  border: 1px solid var(--c-borde);
  border-radius: 30px;
  padding: .3rem .55rem;
}
.tema-btn {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--trans), border-color var(--trans);
  flex-shrink: 0;
}
.tema-btn:hover { transform: scale(1.3); border-color: var(--c-texto); }
.tema-verde { background: #00e676; }
.tema-azul  { background: #1565c0; }
.tema-rojo  { background: #e63946; }

.color-picker-label {
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.color-picker-label input[type="color"] {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
}

.dark-toggle {
  background: var(--c-card);
  border: 1px solid var(--c-borde);
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: .9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans);
  flex-shrink: 0;
}
.dark-toggle:hover { transform: rotate(20deg) scale(1.1); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-texto);
  border-radius: 2px;
  transition: all var(--trans);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem clamp(1.5rem, 8vw, 6rem) 5rem;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,230,118,.05) 0%, transparent 60%),
    var(--c-fondo);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300e676' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { max-width: 680px; position: relative; }

.hero-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-prim);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: .4rem;
}
.hero-rol {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 400;
  color: var(--c-suave);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.hero-desc {
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  color: var(--c-suave);
  max-width: 540px;
  margin-bottom: 2.25rem;
}
.hero-botones { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-borde);
}
.stat-item { min-width: 0; }
.stat-num {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--c-prim);
  line-height: 1;
}
.stat-lbl {
  font-size: .75rem;
  color: var(--c-suave);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-sep { width: 1px; height: 36px; background: var(--c-borde); }

/* ===== SECCIONES ===== */
.seccion { padding: 5rem clamp(1.5rem, 8vw, 6rem); }
.seccion-alt { background: var(--c-fondo-alt); }
.container { max-width: 1100px; margin: 0 auto; width: 100%; }

.seccion-etiqueta {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-prim);
  margin-bottom: .6rem;
}
.seccion-titulo {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 3.5rem;
  line-height: 1.1;
}
.seccion-titulo::after {
  content: '';
  display: block;
  width: 48px; height: 3px;
  background: var(--c-prim);
  border-radius: 2px;
  margin-top: .7rem;
}

/* ===== SERVICIOS ===== */
.servicio-fila {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--c-borde);
}
.servicio-fila:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.servicio-inv .servicio-img-wrap { order: 2; }
.servicio-inv .servicio-texto   { order: 1; }

/* Contenedor de imagen — siempre contenido */
.servicio-img-wrap { min-width: 0; width: 100%; }

.img-placeholder {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: 145px;
  margin: 0 auto;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--c-card);
  border: 1px solid var(--c-borde);
}
.img-placeholder::before {
  content: attr(data-num);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 900;
  color: var(--c-prim);
  opacity: .06;
  pointer-events: none;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--c-prim);
  border-radius: var(--radio);
  opacity: .15;
  pointer-events: none;
  z-index: 2;
}
.img-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity .5s ease;
  z-index: 1;
}
.img-placeholder img.visible { opacity: 1; }

/* Texto del servicio */
.servicio-texto { min-width: 0; }
.serv-num {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--c-prim);
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.servicio-texto h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.servicio-texto p {
  color: var(--c-suave);
  font-size: clamp(.88rem, 1.2vw, .97rem);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}
.serv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.serv-tags span {
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .75rem;
  border-radius: 20px;
  background: var(--c-card);
  color: var(--c-prim);
  border: 1px solid var(--c-borde);
  white-space: nowrap;
}

/* ===== METODOLOGÍA ===== */
.metodo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.metodo-card {
  background: var(--c-card);
  border: 1px solid var(--c-borde);
  border-radius: var(--radio);
  padding: 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
}
.metodo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--c-prim);
  opacity: 0;
  transition: opacity var(--trans);
}
.metodo-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.metodo-card:hover::before { opacity: 1; }
.metodo-icono { font-size: 1.8rem; margin-bottom: .85rem; display: block; }
.metodo-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.metodo-card p  { font-size: .85rem; color: var(--c-suave); line-height: 1.6; }

/* ===== SOBRE MÍ ===== */
.sobre-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3.5rem;
  align-items: start;
}
.foto-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-prim), var(--c-acento));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 900;
  color: #000;
  box-shadow: 0 0 40px rgba(0,230,118,.2);
  flex-shrink: 0;
}
.sobre-texto p { color: var(--c-suave); margin-bottom: 1rem; font-size: .95rem; }
.sobre-texto strong { color: var(--c-texto); }
.sobre-texto .btn { margin-top: .75rem; }

/* ===== CONTACTO ===== */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
  align-items: start;
}
.contacto-info p { color: var(--c-suave); margin-bottom: 1.25rem; font-size: .95rem; }
.contacto-lista {
  list-style: none;
  display: flex; flex-direction: column;
  gap: .75rem;
  color: var(--c-suave);
  font-size: .92rem;
}
.contacto-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-weight: 600; font-size: .83rem; }
.form-group input,
.form-group textarea {
  padding: .75rem 1rem;
  background: var(--c-card);
  border: 1px solid var(--c-borde);
  border-radius: var(--radio);
  color: var(--c-texto);
  font-family: var(--fuente);
  font-size: .93rem;
  outline: none;
  resize: vertical;
  width: 100%;
  transition: border-color var(--trans);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--c-prim); }
.form-group input.error,
.form-group textarea.error { border-color: #e63946; }
.form-error { font-size: .78rem; color: #e63946; min-height: 1rem; }
.form-success { color: var(--c-prim); font-weight: 600; text-align: center; margin-top: .5rem; }

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 1.75rem 1.5rem;
  background: var(--c-fondo-alt);
  border-top: 1px solid var(--c-borde);
  color: var(--c-suave);
  font-size: .83rem;
}

/* ===== RESPONSIVE — 1100px ===== */
@media (max-width: 1100px) {
  .servicio-fila { gap: 2.5rem; }
  .temas-wrap { display: none; }
}

/* ===== RESPONSIVE — 900px ===== */
@media (max-width: 900px) {
  .servicio-fila {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .servicio-inv .servicio-img-wrap { order: unset; }
  .servicio-inv .servicio-texto   { order: unset; }

  .img-placeholder { height: 120px; max-width: 220px; }

  .sobre-grid { grid-template-columns: 1fr; gap: 2rem; }
  .foto-circle { margin: 0 auto; }
  .sobre-texto { text-align: center; }
  .sobre-texto .btn { margin: .75rem auto 0; display: table; }

  .contacto-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ===== RESPONSIVE — 768px ===== */
@media (max-width: 768px) {
  .navbar { padding: .8rem 1.25rem; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1.1rem;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--c-navbar);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--c-borde);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  .hero { padding: 5.5rem 1.25rem 3.5rem; }
  .hero-stats { gap: .75rem; }
  .stat-sep { display: none; }

  .seccion { padding: 3.5rem 1.25rem; }

  .img-placeholder { height: 100px; max-width: 180px; }

  .metodo-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== RESPONSIVE — 480px ===== */
@media (max-width: 480px) {
  .hero h1 { letter-spacing: -1px; }
  .hero-botones { flex-direction: column; }
  .hero-botones .btn { text-align: center; }
  .metodo-grid { grid-template-columns: 1fr; }
  .serv-tags span { font-size: .72rem; }
  .nav-acciones { gap: .35rem; }
}
