/* ==========================================================================
   JDMTECH IT Solutions — hoja de estilos
   Para cambiar colores, edita las variables de :root (justo debajo).
   ========================================================================== */

/* ---- Fuentes (alojadas en el propio servidor, sin depender de Google) ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/outfit-latin-wght-normal.woff2) format('woff2');
}

/* ---- Colores ---- */
:root {
  --bg: #050B14;          /* fondo general */
  --surface: #0F1A2A;     /* tarjetas */
  --surface-alt: #070E1A; /* sección "Sobre nosotros" */
  --footer: #030811;      /* pie de página */
  --accent: #1b74be;      /* azul principal */
  --accent-dark: #155A96;
  --wa: #25D366;          /* verde WhatsApp */
  --wa-dark: #1DA851;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --light: #E2E8F0;
  --dim: #64748B;
  --placeholder: #475569;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  color: var(--text);
  line-height: inherit;
}
h1, h2, h3, h4, p, ul { margin: 0; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: inherit; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
button, input, textarea {
  font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit;
  color: inherit; margin: 0; padding: 0;
}
button { background: transparent; cursor: pointer; border: 0; }
button:disabled { cursor: default; }
textarea { resize: none; }

::selection { background-color: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1A2B44; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.page { min-height: 100vh; overflow-x: hidden; background-color: var(--bg); color: var(--text); }
.container { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 1024px) { .container { padding-left: 2.5rem; padding-right: 2.5rem; } }

.font-heading { font-family: 'Outfit', sans-serif; }

/* ---- Textos de sección ---- */
.eyebrow { font-size: .75rem; line-height: 1rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.h2 {
  font-family: 'Outfit', sans-serif; font-weight: 700; color: #fff;
  font-size: 1.875rem; letter-spacing: -.025em; line-height: 1.25;
}
@media (min-width: 640px) { .h2 { font-size: 2.25rem; line-height: 2.5rem; } }
@media (min-width: 1024px) { .h2 { font-size: 3rem; line-height: 1; } }
.lead { color: var(--muted); font-size: 1rem; line-height: 1.625; }
@media (min-width: 640px) { .lead { font-size: 1.125rem; line-height: 1.75rem; } }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 500; color: #fff;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn-wa { background: var(--wa); border-top: 1px solid rgba(255,255,255,.2); }
.btn-wa:hover { background: var(--wa-dark); }
.btn-lg { padding: .875rem 1.75rem; }
.btn-outline { border: 1px solid rgba(255,255,255,.15); }
.btn-outline:hover { border-color: var(--accent); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(.25rem); }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background-color: transparent; border-bottom: 1px solid transparent;
  transition: color .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.scrolled {
  background-color: rgba(5,11,20,.85);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-bottom-color: rgba(255,255,255,.1);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand img { height: 2.75rem; width: 2.75rem; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.125rem; line-height: 1.75rem; color: #fff; }
.site-header .brand-name { letter-spacing: -.025em; }
.brand-sub { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); width: 100%; text-align: center; }

.nav { display: none; align-items: center; gap: 2.25rem; }
@media (min-width: 768px) { .nav { display: flex; } }
.nav a { font-size: .875rem; line-height: 1.25rem; color: var(--muted); transition: color .2s var(--ease); }
.nav a:hover { color: #fff; }
.nav .btn-wa { color: #fff; font-weight: 500; padding: .625rem 1.25rem; }

.menu-toggle { color: #fff; padding: .5rem; display: block; }
@media (min-width: 768px) { .menu-toggle { display: none; } }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  display: none; flex-direction: column; gap: 1.25rem;
  background: rgba(5,11,20,.95);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 1.5rem;
}
.mobile-menu.open { display: flex; }
@media (min-width: 768px) { .mobile-menu, .mobile-menu.open { display: none; } }
.mobile-menu a { font-size: 1rem; line-height: 1.5rem; color: var(--light); transition: color .2s var(--ease); }
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu a.btn-wa-m { background: var(--wa); color: #fff; text-align: center; font-weight: 500; padding: .75rem 1.25rem; }
.mobile-menu a.btn-wa-m:hover { color: #fff; }

/* ==========================================================================
   Inicio (hero)
   ========================================================================== */
.hero { position: relative; padding: 9rem 0 6rem; overflow: hidden; }
@media (min-width: 1024px) { .hero { padding: 11rem 0 8rem; } }
.hero-layer { position: absolute; }
.hero-grid-bg {
  inset: 0; opacity: .6;
  background-image:
    linear-gradient(to right, rgba(30,41,59,.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,41,59,.35) 1px, transparent 1px);
  background-size: 56px 56px;
}
.hero-blob { top: -8rem; right: -8rem; width: 500px; height: 500px; background: rgba(27,116,190,.2); border-radius: 9999px; filter: blur(140px); }
.hero-fade { inset: 0; background-image: linear-gradient(to bottom, transparent, rgba(5,11,20,.4), #050B14); }
.hero .container { position: relative; }
.hero-cols { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-cols { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05);
  border-radius: 9999px; padding: .375rem 1rem; margin-bottom: 1.75rem;
}
.badge svg { color: var(--accent); }
.badge span { font-size: .75rem; line-height: 1rem; letter-spacing: .025em; color: var(--muted); }

.hero h1 {
  font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: -.025em; color: #fff;
  font-size: 2.25rem; line-height: 1.05;
}
@media (min-width: 640px) { .hero h1 { font-size: 3rem; line-height: 1; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.75rem; line-height: 1; } }
.hero h1 .accent { color: var(--accent); }
.hero-text { margin-top: 1.5rem; max-width: 36rem; }
.cta-row { margin-top: 2.25rem; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .cta-row { flex-direction: row; } }
.stats { margin-top: 3rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; max-width: 28rem; }
.stat-k { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.5rem; line-height: 2rem; color: #fff; }
.stat-v { font-size: .75rem; line-height: 1rem; color: var(--muted); margin-top: .25rem; }

.hero-visual { position: relative; display: none; }
@media (min-width: 1024px) { .hero-visual { display: block; } }
.hero-img-box { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.hero-img-box img { width: 100%; height: 480px; object-fit: cover; }
.hero-img-box::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(to top right, #050B14, rgba(5,11,20,.3), transparent);
}
.float-card {
  position: absolute; bottom: -1.5rem; left: -1.5rem; max-width: 220px;
  background: var(--surface); border: 1px solid rgba(255,255,255,.1); padding: 1.25rem;
}
.float-card h3 { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .875rem; line-height: 1.25rem; color: #fff; }
.float-card p { font-size: .75rem; line-height: 1rem; color: var(--muted); margin-top: .375rem; }

/* ==========================================================================
   Servicios
   ========================================================================== */
.section { position: relative; padding: 6rem 0; }
@media (min-width: 1024px) { .section { padding: 8rem 0; } }
.section-head { max-width: 42rem; margin-bottom: 3.5rem; }
.section-head .lead { margin-top: 1.25rem; }
.services-grid { display: grid; grid-template-columns: repeat(1, minmax(0,1fr)); gap: 1.5rem; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.service-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,.1); padding: 2rem;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.service-card:hover { transform: translateY(-.25rem); border-color: var(--accent); }
.icon-box {
  width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center;
  background: rgba(27,116,190,.1); border: 1px solid rgba(27,116,190,.3); margin-bottom: 1.5rem;
  transition: background-color .3s var(--ease);
}
.icon-box svg { color: var(--accent); transition: color .3s var(--ease); }
.service-card:hover .icon-box { background: var(--accent); }
.service-card:hover .icon-box svg { color: #fff; }
.service-card h3 { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.125rem; line-height: 1.75rem; color: #fff; margin-bottom: .75rem; }
.service-card p { font-size: .875rem; line-height: 1.625; color: var(--muted); }

/* ==========================================================================
   Sobre nosotros
   ========================================================================== */
.about { background: var(--surface-alt); border-top: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.05); }
.two-cols { display: grid; gap: 3.5rem; align-items: center; }
@media (min-width: 1024px) { .two-cols { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.about-img { position: relative; }
.about-img div { overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.about-img img { width: 100%; height: 440px; object-fit: cover; }
.about .lead { margin-top: 1.5rem; }
.checks { margin-top: 2rem; }
.checks li { display: flex; align-items: flex-start; gap: .75rem; }
.checks li + li { margin-top: 1rem; }
.check-dot {
  margin-top: .125rem; width: 1.25rem; height: 1.25rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 9999px;
  background: rgba(27,116,190,.15); border: 1px solid rgba(27,116,190,.4); color: var(--accent);
}
.checks span.t { font-size: .875rem; line-height: 1.25rem; color: var(--light); }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact .two-cols { align-items: stretch; }
.contact .lead { margin-top: 1.25rem; max-width: 28rem; }
.contact-list { margin-top: 2.5rem; }
.contact-list > * + * { margin-top: 1.25rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; }
.contact-ico {
  width: 2.75rem; height: 2.75rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid rgba(255,255,255,.1); color: var(--accent);
  transition: border-color .2s var(--ease);
}
a.contact-item:hover .contact-ico { border-color: var(--accent); }
.contact-label { font-size: .75rem; line-height: 1rem; color: var(--muted); }
.contact-value { font-size: .875rem; line-height: 1.25rem; color: #fff; }

.form-card { background: var(--surface); border: 1px solid rgba(255,255,255,.1); padding: 2rem; }
@media (min-width: 1024px) { .form-card { padding: 2.5rem; } }
.form-stack > * + * { margin-top: 1.5rem; }
.form-card label { display: block; font-size: .875rem; line-height: 1.25rem; color: var(--light); margin-bottom: .5rem; }
.form-card input, .form-card textarea {
  width: 100%; background: var(--bg); border: 1px solid rgba(255,255,255,.1);
  padding: .75rem 1rem; font-size: .875rem; line-height: 1.25rem; color: #fff; outline: none;
  transition: border-color .15s var(--ease);
}
.form-card input::placeholder, .form-card textarea::placeholder { color: var(--placeholder); opacity: 1; }
.form-card input:focus, .form-card textarea:focus { border-color: var(--accent); }
.btn-submit {
  width: 100%; padding: .875rem 1.5rem; background: var(--accent); border-top: 1px solid rgba(255,255,255,.2);
}
.btn-submit:hover { background: var(--accent-dark); }
.btn-submit:disabled { opacity: .6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Pie de página
   ========================================================================== */
.site-footer { background: var(--footer); border-top: 1px solid rgba(255,255,255,.1); padding: 4rem 0 2rem; }
.footer-cols { display: grid; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-cols { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-brand img { height: 2.5rem; width: 2.5rem; object-fit: contain; }
.footer-desc { font-size: .875rem; line-height: 1.625; color: var(--muted); max-width: 20rem; }
.footer-title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .875rem; line-height: 1.25rem; color: #fff; margin-bottom: 1rem; }
.footer-list li + li { margin-top: .75rem; }
.footer-list a { font-size: .875rem; line-height: 1.25rem; color: var(--muted); transition: color .2s var(--ease); }
.footer-list a:hover { color: var(--accent); }
.footer-list a.with-icon { display: flex; align-items: center; gap: .5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom p { font-size: .75rem; line-height: 1rem; color: var(--dim); }
.social-btn {
  width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.1); color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.social-btn:hover { color: #fff; border-color: var(--accent); }

/* ==========================================================================
   Animaciones de entrada
   ========================================================================== */
@keyframes rise { from { opacity: 0; translate: 0 var(--y, 20px); } to { opacity: 1; translate: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop  { from { opacity: 0; scale: .96; } to { opacity: 1; scale: 1; } }
.rise { animation: rise var(--dur, .6s) ease-out var(--delay, 0s) both; }
.fade { animation: fade .8s ease-out .4s both; }
.pop  { animation: pop .8s ease-out .2s both; }

/* Aparición al hacer scroll (solo si hay JavaScript) */
.js .reveal {
  opacity: 0; translate: var(--rx, 0) var(--ry, 0);
  transition: opacity var(--dur, .6s) ease-out var(--delay, 0s), translate var(--dur, .6s) ease-out var(--delay, 0s);
}
.js .reveal.in { opacity: 1; translate: 0 0; }
.js .service-card.reveal {
  transition: opacity var(--dur, .5s) ease-out var(--delay, 0s), translate var(--dur, .5s) ease-out var(--delay, 0s),
              transform .3s var(--ease), border-color .3s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .fade, .pop { animation: none; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
}

/* ==========================================================================
   Avisos (toast)
   ========================================================================== */
.toasts { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 100; display: flex; flex-direction: column; gap: .875rem; pointer-events: none; }
@media (max-width: 600px) { .toasts { left: 1rem; right: 1rem; top: 1rem; } }
.toast {
  display: flex; align-items: center; gap: .375rem; width: 356px; max-width: 100%;
  padding: 1rem; border-radius: 8px; border: 1px solid; font-size: 13px; line-height: 1.5; font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.1); pointer-events: auto;
  animation: toast-in .35s ease-out both;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; margin-right: .25rem; }
.toast.ok  { background: hsl(150,100%,6%); border-color: hsl(147,100%,12%); color: hsl(150,86%,65%); }
.toast.err { background: hsl(358,76%,10%); border-color: hsl(357,89%,16%); color: hsl(358,100%,81%); }
.toast.out { animation: toast-out .3s ease-in both; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(calc(100% + 1.5rem)); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateX(calc(100% + 1.5rem)); } }
