/* =================================================================
   ALLTIME TECH — Design System compartido
   Paleta + tipografía + componentes base para todas las páginas
   ================================================================= */

:root {
  --navy: #0F497F;
  --navy-deep: #0A325A;
  --navy-sky: #3B7AB8;
  --cyan: #14B8D4;
  --ink: #0F1424;
  --amber: #F2C82A;
  --magenta: #EC1F8F;
  --orange: #F47B20;
  --purple: #7C3AED;
  --graphite: #1F2937;
  --mid: #6B7280;
  --soft: #F3F4F6;
}

html { scroll-behavior: auto; }
body {
  font-family: 'Open Sans', system-ui, sans-serif;
  background: var(--ink);
  color: #f3f6fb;
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: 'Montserrat', system-ui, sans-serif; }

::selection { background: var(--cyan); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* Noise overlay */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 3;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
}

/* Custom cursor */
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 9999; mix-blend-mode: difference; }
.cursor-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); transform: translate(-50%,-50%); }
.cursor-ring { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--cyan); transform: translate(-50%,-50%); transition: width .25s, height .25s, opacity .25s, border-color .25s; }
.cursor-ring.is-hover { width: 60px; height: 60px; border-color: var(--amber); opacity: .7; }
@media (hover:none), (max-width: 1024px) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}
body.has-cursor * { cursor: none; }

/* Logo — no filter; shows original brand colors on white nav */
.logo-light { filter: none; }

/* Loader */
#loader { position: fixed; inset: 0; z-index: 99999; background: var(--ink); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; }
#loader .lg { height: 56px; opacity: 0; transform: translateY(8px); }
#loader .tx { font-family: 'Montserrat', sans-serif; font-weight: 700; letter-spacing: .25em; font-size: 14px; color: var(--cyan); text-transform: uppercase; }

/* Mesh blobs (hero / banner backgrounds) */
.mesh-blob { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; opacity: .35; will-change: transform; }

/* Grid pattern */
.grid-pattern {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
}

/* Nav — White Premium Glassmorphism */
.nav-shell {
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(15, 73, 127, 0.12) !important;
  transition: background .3s, border-color .3s;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}
.nav-shell.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid rgba(15, 73, 127, 0.20) !important;
  box-shadow: 0 10px 30px rgba(15, 73, 127, 0.08);
}
.nav-shell .nav-link {
  color: rgba(15, 20, 36, 0.80) !important;
}
.nav-shell .nav-link:hover {
  color: var(--navy) !important;
}
.nav-shell .nav-link.active {
  color: var(--navy) !important;
  font-weight: 700 !important;
}
.nav-shell .nav-link.active::after {
  transform: scaleX(1) !important;
  background: var(--navy) !important;
}
.nav-link { position: relative; }
.nav-link::after {
  content:""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1px;
  background: var(--navy) !important;
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-dropdown {
  opacity: 0; pointer-events: none; transform: translateY(-4px) translateX(-50%); transition: opacity .2s, transform .2s;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 73, 127, 0.12) !important;
  box-shadow: 0 20px 40px rgba(15, 73, 127, 0.12) !important;
  border-radius: 16px;
  padding: 8px;
}
.nav-dropdown::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; background: transparent; }
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0) translateX(-50%); }
.nav-dropdown a {
  color: rgba(15, 20, 36, 0.85) !important;
}
.nav-dropdown a:hover {
  background: rgba(15, 73, 127, 0.05) !important;
  color: var(--navy) !important;
}
.nav-dropdown a.active {
  background: rgba(15, 73, 127, 0.06) !important;
  color: var(--navy) !important;
}
.nav-dropdown a span {
  color: rgba(15, 20, 36, 0.55) !important;
}
.nav-dropdown a.active span:first-child {
  color: var(--navy) !important;
  font-weight: 700 !important;
}
.nav-dropdown a.active span:last-child {
  color: rgba(15, 73, 127, 0.65) !important;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #0F1424 !important; margin: 4px auto; transition: transform .25s, opacity .25s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-shell .nav-toggle { border-color: rgba(15, 20, 36, 0.15) !important; }
.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(15, 73, 127, 0.10) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  color: rgba(15, 20, 36, 0.85) !important;
  border-bottom: 1px solid rgba(15, 73, 127, 0.08) !important;
}
.mobile-menu a:hover {
  color: var(--navy) !important;
  background: rgba(15, 73, 127, 0.03) !important;
}
.mobile-menu a.active {
  color: var(--navy) !important;
  background: rgba(15, 73, 127, 0.05) !important;
  font-weight: 700 !important;
  border-left: 4px solid var(--navy) !important;
  padding-left: 1.5rem !important;
}

/* Buttons */
.btn-magnetic { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-family: 'Montserrat', sans-serif; transition: transform .12s ease-out, box-shadow .3s, background .25s; will-change: transform; white-space: nowrap; }
.btn-yellow { background: var(--amber); color: var(--ink); box-shadow: 0 14px 40px rgba(242,200,42,.30); }
.btn-yellow:hover { background: #ffdb4a; box-shadow: 0 18px 50px rgba(242,200,42,.45); }
.btn-outline-cyan { border: 1.5px solid rgba(20,184,212,.6); color: var(--cyan); background: rgba(20,184,212,.04); }
.btn-outline-cyan:hover { background: rgba(20,184,212,.12); border-color: var(--cyan); }
.btn-outline-cyan .arr, .btn-yellow .arr { transition: transform .25s; display: inline-block; }
.btn-magnetic:hover .arr { transform: translateX(4px); }
.btn-cyan { background: var(--cyan); color: var(--ink); }
.btn-cyan:hover { background: #38d4ec; }
.btn-wa { background: #25D366; color: var(--ink); }
.btn-wa:hover { background: #1ebe5a; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(40px); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .mesh-blob, .fab-wa, .hero-tag, .scroll-dot, .marquee-track { animation: none !important; }
}

/* Animations */
@keyframes floatSlow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.animate-float-slow   { animation: floatSlow 6s ease-in-out infinite; }
.animate-float-slower { animation: floatSlow 9s ease-in-out infinite; }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(242,200,42,.55); } 50% { box-shadow: 0 0 0 18px rgba(242,200,42,0); } }
.animate-glow-pulse { animation: glowPulse 2.5s ease-in-out infinite; }
@keyframes mesh1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,-40px) scale(1.15); } }
@keyframes mesh2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,60px) scale(1.1); } }
@keyframes mesh3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,40px) scale(1.2); } }
.animate-mesh-1 { animation: mesh1 22s ease-in-out infinite; }
.animate-mesh-2 { animation: mesh2 26s ease-in-out infinite; }
.animate-mesh-3 { animation: mesh3 30s ease-in-out infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.animate-marquee { animation: marquee 60s linear infinite; }

/* Marquee */
.marquee-wrap { position: relative; overflow: hidden; }
.marquee-wrap::before, .marquee-wrap::after { content:""; position: absolute; top: 0; bottom: 0; width: 100px; z-index: 2; pointer-events: none; }
.marquee-wrap::before { left: 0;  background: linear-gradient(to right, #fff, transparent); }
.marquee-wrap::after  { right: 0; background: linear-gradient(to left,  #fff, transparent); }
.marquee-track { display: flex; gap: 70px; width: max-content; align-items: center; }
.marquee-track > * { flex-shrink: 0; opacity: .55; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.marquee-track > *:hover { opacity: 1; filter: grayscale(0); }
.marquee-track img { height: 56px; width: auto; object-fit: contain; }

/* Form fields (dark) */
.form-field input, .form-field textarea, .form-field select {
  width: 100%; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px; padding: 14px 16px; color: #fff; font-family: 'Open Sans', sans-serif; font-size: 15px;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(255,255,255,.35); }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--cyan); background: rgba(20,184,212,.05); box-shadow: 0 0 0 4px rgba(20,184,212,.12); }
.form-field label { display: block; font-size: 12px; font-family: 'Montserrat', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.55); margin-bottom: 8px; }

/* FAB WhatsApp */
.fab-wa { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 32px rgba(37,211,102,.45); animation: faWaPulse 3s ease-in-out infinite; transition: transform .2s; }
.fab-wa:hover { transform: scale(1.08); }
.fab-wa svg { width: 30px; height: 30px; }
@keyframes faWaPulse { 0%,100% { box-shadow: 0 12px 32px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); } 50% { box-shadow: 0 12px 32px rgba(37,211,102,.45), 0 0 0 20px rgba(37,211,102,0); } }

/* Hero tags (reusable across pages with constellation) */
.hero-tag {
  position: absolute; padding: 12px 22px 12px 34px; border-radius: 999px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .12em; color: #fff;
  background: rgba(15,20,36,.78); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 2px solid var(--tag-color-border, var(--cyan));
  box-shadow: 0 0 30px var(--tag-color-glow, rgba(20,184,212,.45)), 0 0 60px var(--tag-color-glow-outer, rgba(20,184,212,.18)), 0 12px 32px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06);
  white-space: nowrap; z-index: 5;
  transition: transform .2s, border-color .3s, box-shadow .3s, text-shadow .3s;
}
.hero-tag::before {
  content:""; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%;
  background: var(--tag-color, var(--cyan));
  box-shadow: 0 0 12px var(--tag-color, var(--cyan)), 0 0 20px var(--tag-color-glow, rgba(20,184,212,.6));
  animation: tagDotPulse 2s ease-in-out infinite;
  transition: background-color .3s, box-shadow .3s;
}
@keyframes tagDotPulse {
  0%,100% { box-shadow: 0 0 8px var(--tag-color, var(--cyan)), 0 0 16px var(--tag-color-glow, rgba(20,184,212,.5)); opacity: 1; }
  50% { box-shadow: 0 0 16px var(--tag-color, var(--cyan)), 0 0 28px var(--tag-color-glow, rgba(20,184,212,.8)); opacity: .85; }
}

/* Blog card */
.blog-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 18px; overflow: hidden; transition: transform .3s, box-shadow .3s; display: block; color: #1F2937; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -20px rgba(15,73,127,.20); }
.blog-img { height: 200px; overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.blog-card:hover .blog-img img { transform: scale(1.1); }
.blog-card .arr { display: inline-block; transition: transform .25s; }
.blog-card:hover .arr { transform: translateX(4px); }

/* Case card */
.case-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; overflow: hidden; transition: border-color .3s, transform .3s; }
.case-card:hover { border-color: rgba(20,184,212,.4); }
.case-img { height: 240px; overflow: hidden; }
.case-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.case-card:hover .case-img img { transform: scale(1.06); }

/* Recognition grid */
.recog-item img { height: 60px; width: auto; max-width: 160px; object-fit: contain; opacity: .5; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .3s; }
.recog-item:hover img { opacity: 1; filter: grayscale(0); transform: scale(1.05); }

/* Process steps (Cómo trabajamos) */
.step-card { position: relative; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 28px; transition: border-color .3s, transform .3s; }
.step-card:hover { border-color: rgba(20,184,212,.4); transform: translateY(-2px); }
.step-num { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 56px; line-height: 1; color: var(--cyan); opacity: .35; letter-spacing: -.04em; }

/* Article (blog/case) prose */
.prose-at { font-family: 'Open Sans', sans-serif; color: var(--graphite); font-size: 18px; line-height: 1.7; }
.prose-at h2 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 32px; letter-spacing: -.02em; color: var(--graphite); margin: 56px 0 18px; line-height: 1.2; }
.prose-at h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 22px; color: var(--graphite); margin: 36px 0 14px; line-height: 1.25; }
.prose-at p  { margin-bottom: 20px; }
.prose-at ul { list-style: none; padding-left: 0; margin: 20px 0; }
.prose-at ul li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.prose-at ul li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(20,184,212,.5); }
.prose-at a  { color: var(--navy); border-bottom: 1px solid rgba(15,73,127,.2); transition: color .25s, border-color .25s; }
.prose-at a:hover { color: var(--cyan); border-color: var(--cyan); }
.prose-at blockquote { margin: 36px 0; padding: 18px 24px; border-left: 4px solid var(--cyan); background: var(--soft); border-radius: 0 12px 12px 0; font-style: italic; color: var(--graphite); }
.prose-at img { border-radius: 16px; margin: 28px 0; box-shadow: 0 20px 50px -20px rgba(15,73,127,.25); }

/* Scrollbar custom */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }
