/* =========================================================
   HW Consulting MX — Estilos
   ========================================================= */

:root {
  --bg:        #ffffff;
  --bg-2:      #f1f5fd;
  --surface:   #ffffff;
  --surface-2: #f6f9ff;
  --line:      rgba(20,30,70,.10);
  --text:      #111834;
  --muted:     #5b6588;
  --muted-2:   #99a1bd;

  --c1: #4d7cff;   /* azul */
  --c2: #7c4dff;   /* violeta */
  --c3: #0fb6a6;   /* aqua */
  --grad: linear-gradient(120deg, var(--c1), var(--c2) 55%, var(--c3));
  --grad-soft: linear-gradient(120deg, rgba(77,124,255,.12), rgba(124,77,255,.12));
  --shadow:      0 10px 30px rgba(30,45,100,.08);
  --shadow-lg:   0 22px 50px rgba(30,45,100,.14);

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(.16,.84,.34,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 { font-family: 'Sora', sans-serif; line-height: 1.1; font-weight: 700; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ===== Cursor glow ===== */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px;
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(77,124,255,.10), transparent 65%);
  transform: translate(-50%, -50%); transition: opacity .3s; opacity: 0;
  mix-blend-mode: normal;
}
@media (hover:hover) and (pointer:fine){ .cursor-glow{ opacity: 1; } }

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 200; transition: width .1s linear;
  box-shadow: 0 0 12px rgba(91,140,255,.6);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 18px 0; transition: padding .35s var(--ease), background .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  padding: 11px 0;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(30,45,100,.06);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo-chip {
  width: 42px; height: 42px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; padding: 4px; flex-shrink: 0;
  border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(30,45,100,.10);
  transition: transform .3s var(--ease);
}
.brand:hover .brand-logo-chip { transform: translateY(-1px) scale(1.04); }
.brand-logo-chip img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; align-items: center; gap: 8px; font-family: 'Sora'; font-weight: 800; font-size: 1.15rem; }
.brand-name { letter-spacing: -.5px; }
.brand-name em { font-style: normal; color: var(--c3); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 9px 16px; border-radius: 10px; font-size: .94rem; font-weight: 500;
  color: var(--muted); transition: color .25s, background .25s; position: relative;
}
.nav-link:hover { color: var(--text); background: rgba(20,30,70,.05); }
.nav-link.active { color: var(--text); }
.nav-cta {
  background: var(--grad); color: #fff !important; font-weight: 600;
  box-shadow: 0 6px 20px rgba(91,140,255,.3);
}
.nav-cta:hover { background: var(--grad); filter: brightness(1.08); transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--text); border-radius: 3px; transition: .3s; }
.nav-toggle.open span:nth-child(1){ transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 24px 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .28; }
.orb-1 { width: 480px; height: 480px; background: #6f97ff; top: -120px; left: -80px; animation: float1 16s ease-in-out infinite; }
.orb-2 { width: 420px; height: 420px; background: #a983ff; bottom: -100px; right: -60px; animation: float2 19s ease-in-out infinite; }
.orb-3 { width: 360px; height: 360px; background: #5ad9cc; top: 40%; left: 55%; animation: float1 22s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(40px,-50px); } }
@keyframes float2 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(-50px,40px); } }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(20,30,70,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(20,30,70,.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero-content { position: relative; z-index: 2; max-width: 880px; }

.badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 100px; background: rgba(255,255,255,.7);
  font-size: .85rem; color: var(--muted); margin-bottom: 28px; backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c3); box-shadow: 0 0 0 0 rgba(33,211,196,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{ box-shadow: 0 0 0 0 rgba(33,211,196,.6);} 70%{ box-shadow: 0 0 0 10px rgba(33,211,196,0);} 100%{ box-shadow:0 0 0 0 rgba(33,211,196,0);} }

.hero-title { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 24px; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--muted); max-width: 680px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: 12px; font-family: 'Sora'; font-weight: 600;
  font-size: .98rem; cursor: pointer; border: 0; transition: transform .25s var(--ease), box-shadow .25s, filter .25s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(91,140,255,.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(91,140,255,.45); filter: brightness(1.06); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-block { width: 100%; margin-top: 8px; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-hint span {
  display: block; width: 26px; height: 42px; border: 2px solid var(--muted-2); border-radius: 16px; position: relative;
}
.scroll-hint span::after {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 4px; background: var(--c3); animation: scrolldot 1.8s infinite;
}
@keyframes scrolldot { 0%{ opacity: 0; top: 8px;} 40%{ opacity:1;} 80%{ opacity:0; top: 22px;} 100%{ opacity:0;} }

/* ===== Tech marquee ===== */
.tech-marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2); overflow: hidden; padding: 18px 0;
}
.marquee-track {
  display: flex; gap: 28px; white-space: nowrap; width: max-content;
  animation: marquee 32s linear infinite; font-family: 'Sora'; font-weight: 600;
  color: var(--muted); font-size: 1.05rem;
}
.marquee-track span:nth-child(even){ color: var(--c2); }
@keyframes marquee { from{ transform: translateX(0);} to{ transform: translateX(-50%);} }

/* ===== Sections ===== */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.eyebrow {
  display: inline-block; font-family: 'Sora'; font-weight: 600; font-size: .82rem;
  letter-spacing: 2px; text-transform: uppercase; color: var(--c3); margin-bottom: 14px;
}
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -1px; margin-bottom: 18px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-lead { color: var(--muted); font-size: 1.08rem; }

/* ===== Nosotros ===== */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-points { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.point { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.point svg { color: var(--c3); flex-shrink: 0; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.stat-card::before {
  content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .35s;
}
.stat-card:hover { transform: translateY(-6px); border-color: rgba(77,124,255,.45); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }
.stat-card > * { position: relative; }
.stat-num { font-family: 'Sora'; font-weight: 800; font-size: 2.6rem; }
.stat-plus { font-family: 'Sora'; font-weight: 800; font-size: 1.6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { display: block; color: var(--muted); font-size: .92rem; margin-top: 6px; }

/* ===== Servicios ===== */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.service-card:hover { transform: translateY(-8px); border-color: rgba(124,77,255,.4); box-shadow: var(--shadow-lg); }
.service-card:hover::after { transform: scaleX(1); }
.svc-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--c1); margin-bottom: 20px;
  transition: transform .35s var(--ease);
}
.service-card:hover .svc-icon { transform: scale(1.08) rotate(-4deg); color: var(--c3); }
.service-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: .94rem; }

/* ===== Proceso / timeline ===== */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 26px; position: relative; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.step:hover { transform: translateY(-6px); border-color: rgba(15,182,166,.45); box-shadow: var(--shadow-lg); }
.step-num {
  font-family: 'Sora'; font-weight: 800; font-size: 2.6rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 14px; opacity: .85;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .93rem; }

/* ===== Clientes ===== */
.clients-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px;
}
.client-logo {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; min-height: 130px; box-shadow: var(--shadow);
  display: grid; place-items: center; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.client-logo:hover { transform: translateY(-6px) scale(1.02); border-color: rgba(77,124,255,.35); box-shadow: var(--shadow-lg); }
.client-logo img { max-height: 78px; width: auto; object-fit: contain; }

/* ===== Contacto ===== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.contact-info p { color: var(--muted); margin-bottom: 30px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list a:hover { color: var(--c3); }
.ci-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--c1); flex-shrink: 0;
}

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-lg);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-size: .88rem; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 15px; color: var(--text); font-family: inherit; font-size: .96rem;
  transition: border-color .25s, box-shadow .25s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--c1); box-shadow: 0 0 0 3px rgba(91,140,255,.18);
}
.field textarea { resize: vertical; min-height: 90px; }
.field select { cursor: pointer; }
.field select option { background: var(--bg-2); }

.btn-spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; display: none; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading .btn-label { opacity: .6; }
.btn.loading .btn-spinner { display: inline-block; }

.form-status { font-size: .92rem; text-align: center; min-height: 20px; }
.form-status.ok { color: var(--c3); }
.form-status.err { color: #e23d54; }

/* ===== Footer ===== */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 64px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; padding-bottom: 44px; }
.footer-brand p { color: var(--muted); margin-top: 16px; max-width: 380px; font-size: .94rem; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer-cols h4 { font-size: .95rem; margin-bottom: 14px; }
.footer-cols a { display: block; color: var(--muted); font-size: .92rem; padding: 4px 0; transition: color .2s; }
.footer-cols a:hover { color: var(--c3); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 22px 24px; max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted-2); font-size: .85rem;
}

/* ===== WhatsApp float ===== */
.wa-float {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: transform .3s var(--ease); animation: waPop .5s var(--ease) .8s both;
}
.wa-float:hover { transform: scale(1.1); }
@keyframes waPop { from{ transform: scale(0); } to{ transform: scale(1); } }

/* ===== Reveal animations ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.services-grid .reveal.visible,
.timeline .reveal.visible { transition-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { gap: 48px; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(80%, 320px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 8px; padding: 100px 24px 40px; background: #fff;
    border-left: 1px solid var(--line); transform: translateX(100%);
    transition: transform .4s var(--ease); box-shadow: -20px 0 60px rgba(30,45,100,.18);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { padding: 14px 18px; font-size: 1.05rem; }
  .nav-toggle { display: flex; z-index: 101; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 80px 0; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .services-grid, .timeline { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 26px 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
