/* =========================================================
   ESTI · Estilos
   Paleta tomada del logotipo: carbón, plata y un acento azul
   (Google IT Support) con verde (AI Essentials).
   Autor: Vicente R. Hernández Cobos
   ========================================================= */
:root {
  --fondo: #121519;
  --fondo-2: #181c21;
  --tarjeta: #1d2228;
  --borde: #2c333b;
  --texto: #e7eaee;
  --texto-suave: #a3abb5;
  --plata: #c9ced5;
  --acento: #5aa2ff;
  --acento-fuerte: #2f7fe8;
  --verde: #3fbf7f;
  --radio: 14px;
  --ancho: 1120px;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Bitter", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acento); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 6px; }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem;
  background: rgba(18, 21, 25, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
}
.marca { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--plata); }
.marca img { border-radius: 8px; }
.marca span { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: .12em; }

.boton-menu {
  display: grid; gap: 5px; padding: 10px; background: none; border: 0; cursor: pointer;
}
.boton-menu span { width: 24px; height: 2px; background: var(--plata); border-radius: 2px; transition: .2s; }
.boton-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.boton-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.boton-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  position: absolute; top: 100%; left: 0; right: 0;
  display: none; flex-direction: column;
  background: var(--fondo-2); border-bottom: 1px solid var(--borde);
  padding: .5rem 1rem 1rem;
}
.menu.abierto { display: flex; }
.menu a {
  color: var(--texto); text-decoration: none; font-weight: 600;
  padding: .8rem .25rem; border-bottom: 1px solid var(--borde);
}
.menu a:last-child { border-bottom: 0; }
.menu .menu-cta { color: var(--acento); }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
  font-family: inherit;
}
.boton:hover { transform: translateY(-1px); }
.boton svg { width: 20px; height: 20px; fill: currentColor; }
.boton-principal { background: var(--acento-fuerte); color: #fff; }
.boton-principal:hover { background: #2a71d0; }
.boton-secundario { border-color: var(--borde); color: var(--texto); background: transparent; }
.boton-secundario:hover { border-color: var(--plata); }

/* ---------- Portada ---------- */
.portada {
  text-align: center;
  padding: 2.2rem 1rem 3rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, #1f252c 0%, transparent 70%),
    var(--fondo);
}
.portada-nombre {
  font-family: var(--serif); font-weight: 500; color: var(--texto-suave);
  font-size: clamp(1rem, 3.5vw, 1.35rem); margin: 0 0 .4rem; letter-spacing: .02em;
}
.portada-logo { width: min(86vw, 440px); margin: 0 auto 1.2rem; }
.portada-titulo {
  font-size: clamp(1.75rem, 6vw, 2.9rem); font-weight: 800;
  letter-spacing: -.02em; margin-bottom: .6rem;
}
.portada-texto { color: var(--texto-suave); max-width: 38rem; margin: 0 auto 1.6rem; font-size: 1.05rem; }
.portada-texto strong { color: var(--texto); }
.portada-botones { display: flex; flex-direction: column; gap: .75rem; max-width: 22rem; margin: 0 auto; }
.portada-datos {
  list-style: none; padding: 0; margin: 2rem auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
}
.portada-datos li {
  font-size: .85rem; font-weight: 600; color: var(--plata);
  border: 1px solid var(--borde); border-radius: 999px; padding: .35rem .85rem;
}

/* ---------- Secciones ---------- */
.seccion { padding: 3.5rem 1rem; }
.seccion > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }
.seccion-alterna { background: var(--fondo-2); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.encabezado { text-align: center; max-width: 40rem; margin-bottom: 2.2rem; }
.encabezado p { color: var(--texto-suave); margin: 0; }
.etiqueta {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--acento) !important; margin-bottom: .5rem !important;
}

/* ---------- Servicios ---------- */
.rejilla-servicios { display: grid; gap: 1rem; }
.servicio {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1.4rem 1.3rem;
}
.servicio-icono {
  width: 40px; height: 40px; padding: 8px; margin-bottom: .9rem;
  fill: none; stroke: var(--acento); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(90, 162, 255, .1); border-radius: 10px;
}
.servicio ul { margin: 0; padding-left: 1.1rem; color: var(--texto-suave); font-size: .95rem; }
.servicio li + li { margin-top: .45rem; }
.servicio li::marker { color: var(--acento); }
.servicio-cta {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  background: linear-gradient(150deg, #1d2a3a, var(--tarjeta));
  border-color: #2e4560;
}
.servicio-cta p { color: var(--texto-suave); margin: 0 0 1.1rem; }

/* ---------- Pasos ---------- */
.pasos { list-style: none; padding: 0; display: grid; gap: 1rem; }
.pasos li {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1.3rem;
}
.pasos p { margin: 0; color: var(--texto-suave); font-size: .95rem; }
.paso-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: .7rem;
  border-radius: 50%; font-weight: 800; color: var(--fondo);
  background: linear-gradient(135deg, var(--acento), var(--verde));
}

/* ---------- Sobre mí ---------- */
.sobre-mi { display: grid; gap: 2rem; align-items: center; }
.sobre-mi-texto p { color: var(--texto-suave); }
.insignias { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.insignias figure { margin: 0; text-align: center; }
.insignias img {
  margin: 0 auto;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 70%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 70%, transparent 100%);
}
.insignias figcaption { font-size: .85rem; font-weight: 600; color: var(--plata); margin-top: .3rem; }

/* ---------- Contacto ---------- */
.contacto { display: grid; gap: 1.5rem; }
.formulario, .tarjeta-contacto {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1.4rem 1.3rem;
}
.formulario { display: flex; flex-direction: column; }
.formulario label { font-weight: 600; font-size: .92rem; margin: .9rem 0 .35rem; }
.formulario > label:first-child { margin-top: 0; }
.formulario input[type="text"], .formulario select, .formulario textarea {
  width: 100%; font: inherit; color: var(--texto);
  background: var(--fondo); border: 1px solid var(--borde); border-radius: 10px;
  padding: .75rem .85rem; min-height: 48px;
}
.formulario textarea { resize: vertical; }
.formulario input:focus, .formulario select:focus, .formulario textarea:focus {
  outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px rgba(90, 162, 255, .2);
}
.modalidad { border: 0; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.modalidad legend { font-weight: 600; font-size: .92rem; margin-bottom: .45rem; padding: 0; }
.modalidad label {
  margin: 0 !important; display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--borde); border-radius: 999px; padding: .45rem .9rem; cursor: pointer;
  font-weight: 500 !important;
}
.modalidad input { accent-color: var(--acento); }
.modalidad label:has(input:checked) { border-color: var(--acento); background: rgba(90, 162, 255, .1); }
.formulario .boton { margin-top: 1.3rem; width: 100%; }

.tarjeta-contacto ul { list-style: none; padding: 0; margin: 0 0 1.3rem; }
.tarjeta-contacto li { padding: .8rem 0; border-bottom: 1px solid var(--borde); display: flex; flex-direction: column; }
.tarjeta-contacto li:first-child { padding-top: 0; }
.dato-titulo { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--texto-suave); font-weight: 600; }
.tarjeta-contacto a:not(.boton) { color: var(--texto); font-weight: 700; font-size: 1.05rem; text-decoration: none; word-break: break-word; }
.tarjeta-contacto a:not(.boton):hover { color: var(--acento); }
.tarjeta-contacto small { color: var(--texto-suave); }
.tarjeta-contacto .boton { width: 100%; }

/* ---------- Pie ---------- */
.pie { text-align: center; padding: 2rem 1rem 5rem; color: var(--texto-suave); font-size: .85rem; }
.pie img { margin: 0 auto .6rem; border-radius: 6px; opacity: .8; }
.pie p { margin: .2rem 0; }

/* ---------- Botón ▲ Inicio ---------- */
.boton-inicio {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  background: var(--acento-fuerte); color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem;
  padding: .6rem 1rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s;
}
.boton-inicio.visible { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Pantallas medianas ---------- */
@media (min-width: 640px) {
  .portada-botones { flex-direction: row; max-width: none; justify-content: center; }
  .rejilla-servicios, .pasos { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Computadora ---------- */
@media (min-width: 960px) {
  .boton-menu { display: none; }
  .menu {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 1.6rem;
    background: none; border: 0; padding: 0;
  }
  .menu a { border: 0; padding: .3rem 0; font-size: .95rem; color: var(--texto-suave); }
  .menu a:hover { color: var(--texto); }
  .menu .menu-cta {
    color: #fff; background: var(--acento-fuerte); padding: .5rem 1.1rem; border-radius: 999px;
  }
  .barra { padding: .8rem max(1.5rem, calc((100% - var(--ancho)) / 2)); }
  .portada { padding: 3rem 1rem 4rem; }
  .seccion { padding: 5rem 1.5rem; }
  .rejilla-servicios { grid-template-columns: repeat(3, 1fr); }
  .pasos { grid-template-columns: repeat(4, 1fr); }
  .sobre-mi { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
  .contacto { grid-template-columns: 1.5fr 1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
